For the complete documentation index, see llms.txt. This page is also available as Markdown.

Payments

Payment management

List payments

get

Retrieve a paginated list of payments

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Query parameters
pageintegerOptional

Page number

Example: 1
per_pageinteger · max: 100Optional

Items per page (max 100)

Example: 25
includestringOptional

Comma-separated list of expansions: customer, order

Example: customer,order
filter[status]stringOptional

Filter by status (exact match). Valid values: pending, succeeded, failed, refunded, disputed, dispute_refunded.

filter[status.in]stringOptional

Filter by status (comma-separated list). Fetches many records in one request instead of one request per id.

Example: pending,succeeded
filter[status.nin]stringOptional

Filter by status (excluding a comma-separated list)

filter[order_id]stringOptional

Filter by order_id (exact match).

filter[order_id.gte]stringOptional

Filter by order_id (greater than or equal)

filter[order_id.lte]stringOptional

Filter by order_id (less than or equal)

filter[order_id.in]stringOptional

Filter by order_id (comma-separated list). Fetches many records in one request instead of one request per id.

Example: 101,102,103
filter[order_id.nin]stringOptional

Filter by order_id (excluding a comma-separated list)

filter[customer_id]stringOptional

Filter by customer_id (exact match).

filter[customer_id.gte]stringOptional

Filter by customer_id (greater than or equal)

filter[customer_id.lte]stringOptional

Filter by customer_id (less than or equal)

filter[customer_id.in]stringOptional

Filter by customer_id (comma-separated list). Fetches many records in one request instead of one request per id.

Example: 101,102,103
filter[customer_id.nin]stringOptional

Filter by customer_id (excluding a comma-separated list)

filter[gateway_id]stringOptional

Filter by gateway_id (exact match).

filter[gateway_id.gte]stringOptional

Filter by gateway_id (greater than or equal)

filter[gateway_id.lte]stringOptional

Filter by gateway_id (less than or equal)

filter[gateway_id.in]stringOptional

Filter by gateway_id (comma-separated list). Fetches many records in one request instead of one request per id.

Example: 101,102,103
filter[gateway_id.nin]stringOptional

Filter by gateway_id (excluding a comma-separated list)

filter[currency]stringOptional

Filter by currency (exact match).

filter[currency.contains]stringOptional

Filter by currency (contains)

filter[created_at]stringOptional

Filter by created_at (exact match).

filter[created_at.gte]stringOptional

Filter by created_at (greater than or equal)

filter[created_at.lte]stringOptional

Filter by created_at (less than or equal)

filter[updated_at]stringOptional

Filter by updated_at (exact match).

filter[updated_at.gte]stringOptional

Filter by updated_at (greater than or equal)

filter[updated_at.lte]stringOptional

Filter by updated_at (less than or equal)

sortstringOptional

Sort field (prefix with - for descending)

Example: -created_at
Responses
200

Successful response with paginated list

application/json
get/v2/payments
GET /v2/payments HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": 789,
      "order_id": 123,
      "customer_id": 12345,
      "source_id": 1,
      "source": {
        "id": 1,
        "card_id": 1,
        "gateway_id": 1,
        "stripe_source_id": "text",
        "stripe_paymentmethod_id": "text",
        "paypal_billing_agreement_id": "text",
        "created_at": "2026-01-01T00:00:00.000Z",
        "updated_at": "2026-01-01T00:00:00.000Z",
        "stripe_customer_id": "text",
        "paypal_payer_id": "text",
        "paypal_customer_id": "text",
        "paypal_token_id": "text",
        "nmi_customer_vault_id": "text",
        "authentication": null,
        "customer_id": 1,
        "is_active": true,
        "is_three_d_secure_supported": true,
        "type": "text",
        "last_four": "text",
        "exp_month": "text",
        "exp_year": "text",
        "address_zip": "text",
        "country": "text",
        "fingerprint": "text",
        "cardholder_name_first": "text",
        "cardholder_name_last": "text",
        "address_street1": "text",
        "address_street2": "text",
        "address_city": "text",
        "address_state": "text",
        "address_country": "text"
      },
      "gateway_id": 1,
      "initial_payment_id": 1,
      "stripe_charge_id": "ch_1abc123",
      "stripe_invoice_id": "text",
      "stripe_paymentintent_id": "pi_1abc123",
      "paypal_order_id": "text",
      "paypal_capture_id": "text",
      "is_manual": true,
      "is_3ds_in_progress": true,
      "amount": 4999,
      "amount_paid": 4999,
      "amount_refunded": 0,
      "currency": "USD",
      "failure_reason": "text",
      "has_pending_retry": true,
      "refunded_at": "2026-01-01T00:00:00.000Z",
      "status": "succeeded",
      "is_3ds": true,
      "can_skip": true,
      "nmi_transaction_id": "text",
      "is_startup_fee": true,
      "failure_code": "text",
      "payment_method_type": "klarna",
      "financing_installments_count": 4,
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z",
      "attempts": [
        {
          "id": 1,
          "order_id": 1,
          "initial_payment_id": 1,
          "amount": 1,
          "amount_paid": 1,
          "amount_refunded": 1,
          "currency": "text",
          "status": "text",
          "failure_reason": "text",
          "has_pending_retry": true,
          "created_at": "2026-01-01T00:00:00.000Z",
          "updated_at": "2026-01-01T00:00:00.000Z"
        }
      ]
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "pages": 6
  }
}

Get payments

get

Retrieve a single payments by ID

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idintegerRequired

payments ID

Example: 12345
Query parameters
includestringOptional

Comma-separated list of expansions: customer, order

Example: customer,order
Responses
200

Successful response

application/json
idintegerRequired

Payment ID

Example: 789
order_idintegerRequired

Associated order ID

Example: 123
customer_idinteger · nullableOptional

Customer who made the payment (sourced from the parent order; included for convenience so customer-centric reporting doesn't require a second hop through /v2/orders)

Example: 12345
source_idinteger · nullableOptional

Payment source (card) ID (database field)

gateway_idinteger · nullableOptional

Payment gateway ID

initial_payment_idinteger · nullableOptional

Initial payment ID (for retries)

stripe_charge_idstring · max: 255 · nullableOptional

Stripe charge ID

Example: ch_1abc123
stripe_invoice_idstring · nullableOptional

Stripe invoice ID

stripe_paymentintent_idstring · max: 255 · nullableOptional

Stripe PaymentIntent ID

Example: pi_1abc123
paypal_order_idstring · max: 255 · nullableOptional

PayPal order ID

paypal_capture_idstring · max: 255 · nullableOptional

PayPal capture ID

is_manualboolean · nullableOptional

Whether payment was manually recorded

is_3ds_in_progressbooleanOptional

Whether 3D Secure authentication is in progress

amountintegerOptional

Total payment amount in cents

Example: 4999
amount_paidintegerRequired

Amount successfully paid in cents

Example: 4999
amount_refundedintegerOptional

Amount refunded in cents

Example: 0
currencystring · enum · nullableOptional

Payment currency code

Example: USDPossible values:
failure_reasonstring · nullableOptional

Human-readable failure reason

has_pending_retrybooleanOptional

Whether a retry is pending

refunded_atstring · date-time · nullableOptional

Refund timestamp

statusstring · enum · nullableOptional

Payment status

Example: succeededPossible values:
is_3dsbooleanOptional

Whether 3D Secure was used

can_skipbooleanOptional

Whether payment can be skipped

nmi_transaction_idstring · max: 255 · nullableOptional

NMI transaction ID

is_startup_feebooleanOptional

Whether this is a startup/setup fee

failure_codestring · max: 255 · nullableOptional

Gateway-specific failure code

payment_method_typestring · max: 255 · nullableOptional

What actually paid this charge, as the gateway reports it (e.g. card, apple_pay, klarna, afterpay_clearpay). Null when unknown or not recorded — clients should fall back to the card display.

Example: klarna
financing_installments_countinteger · nullableOptional

Number of installments for a financing (BNPL) payment. Null for non-financing payments.

Example: 4
created_atstring · date-time · nullableOptional

Creation timestamp

updated_atstring · date-time · nullableOptional

Last update timestamp

get/v2/payments/{id}
GET /v2/payments/{id} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 789,
  "order_id": 123,
  "customer_id": 12345,
  "source_id": 1,
  "source": {
    "id": 1,
    "card_id": 1,
    "gateway_id": 1,
    "stripe_source_id": "text",
    "stripe_paymentmethod_id": "text",
    "paypal_billing_agreement_id": "text",
    "created_at": "2026-01-01T00:00:00.000Z",
    "updated_at": "2026-01-01T00:00:00.000Z",
    "stripe_customer_id": "text",
    "paypal_payer_id": "text",
    "paypal_customer_id": "text",
    "paypal_token_id": "text",
    "nmi_customer_vault_id": "text",
    "authentication": null,
    "customer_id": 1,
    "is_active": true,
    "is_three_d_secure_supported": true,
    "type": "text",
    "last_four": "text",
    "exp_month": "text",
    "exp_year": "text",
    "address_zip": "text",
    "country": "text",
    "fingerprint": "text",
    "cardholder_name_first": "text",
    "cardholder_name_last": "text",
    "address_street1": "text",
    "address_street2": "text",
    "address_city": "text",
    "address_state": "text",
    "address_country": "text"
  },
  "gateway_id": 1,
  "initial_payment_id": 1,
  "stripe_charge_id": "ch_1abc123",
  "stripe_invoice_id": "text",
  "stripe_paymentintent_id": "pi_1abc123",
  "paypal_order_id": "text",
  "paypal_capture_id": "text",
  "is_manual": true,
  "is_3ds_in_progress": true,
  "amount": 4999,
  "amount_paid": 4999,
  "amount_refunded": 0,
  "currency": "USD",
  "failure_reason": "text",
  "has_pending_retry": true,
  "refunded_at": "2026-01-01T00:00:00.000Z",
  "status": "succeeded",
  "is_3ds": true,
  "can_skip": true,
  "nmi_transaction_id": "text",
  "is_startup_fee": true,
  "failure_code": "text",
  "payment_method_type": "klarna",
  "financing_installments_count": 4,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "attempts": [
    {
      "id": 1,
      "order_id": 1,
      "initial_payment_id": 1,
      "amount": 1,
      "amount_paid": 1,
      "amount_refunded": 1,
      "currency": "text",
      "status": "text",
      "failure_reason": "text",
      "has_pending_retry": true,
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}

Refund a payment

post

Refund a payment on an order. refund_amount is required — pass the payment's full remaining refundable balance for a full refund.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Payment ID

Body
refund_amountintegerRequired

Amount to refund as a whole number of the smallest currency unit ($10.00 USD = 1000; ¥1500 JPY = 1500). Fractions are rejected. Must not exceed the payment's remaining refundable balance.

itemsnumber[]Optional

Array of order item IDs to mark as refunded

do_affiliate_adjustmentbooleanOptional

Whether to adjust affiliate commissions

skip_integration_actionsbooleanOptional

Skip the merchant's own automations for this refund. The refund is still recorded and order-sync integrations (tax, CRM deal and contact sync) still run. Developer-platform Event Webhooks are still delivered; the merchant's own "Send Webhook" automation action is an automation and does NOT run. The choice is stored on the payment, so a later refund of the same payment made outside Spiffy inherits it — the last choice made through Spiffy wins.

notesstringOptional

Internal notes for the refund

Responses
200

Successful response

application/json
any · nullableOptional
post/v2/payments/{id}/refund
POST /v2/payments/{id}/refund HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 109

{
  "refund_amount": 1,
  "items": [
    1
  ],
  "do_affiliate_adjustment": true,
  "skip_integration_actions": true,
  "notes": "text"
}

No content

Retry a failed payment

post

Queue a retry for a failed payment. Only the original failed payment (not subsequent attempts) can be retried.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Payment ID

Responses
200

Successful response

application/json
any · nullableOptional
post/v2/payments/{id}/retry
POST /v2/payments/{id}/retry HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated