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

Customer Cards

List customer_cards

get

List customer cards

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
sortstringOptional

Sort field (prefix with - for descending)

Example: -created_at
Responses
200

Successful response with paginated list

application/json
get/v2/customers/{customer_id}/cards
GET /v2/customers/{customer_id}/cards HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": 789,
      "customer_id": 12345,
      "is_active": true,
      "is_three_d_secure_supported": true,
      "type": "Visa",
      "last_four": "4242",
      "exp_month": "12",
      "exp_year": "2025",
      "address_zip": "10001",
      "country": "US",
      "fingerprint": "text",
      "cardholder_name_first": "John",
      "cardholder_name_last": "Doe",
      "address_street1": "123 Main St",
      "address_street2": "Apt 4B",
      "address_city": "New York",
      "address_state": "NY",
      "address_country": "US",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-20T14:45:00Z",
      "is_in_use": true,
      "active_subscription_count": 2,
      "active_paymentplan_count": 1,
      "gateway_id": 1,
      "stripe_paymentmethod_id": "text",
      "stripe_customer_id": "text",
      "paypal_billing_agreement_id": "text",
      "paypal_payer_id": "text",
      "paypal_customer_id": "text",
      "paypal_token_id": "text",
      "is_incompatible": true,
      "is_test_broken": true
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "pages": 6
  }
}

Add card to customer

post

Add a new payment card to customer using tokenized card data from payment gateway

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
customer_idstringRequired

Customer ID

Body
payment_gatewaystring · enumRequiredPossible values:
tokenany · nullableOptional
Responses
201

Created successfully

application/json
any · nullableOptional
post/v2/customers/{customer_id}/cards
POST /v2/customers/{customer_id}/cards HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41

{
  "payment_gateway": "stripe",
  "token": null
}

No content

Delete customer card

delete

Delete a payment card. Card must not be in use by active subscriptions or payment plans.

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
customer_idstringRequired

Customer ID

card_idstringRequired

Card ID to delete

Responses
204

Deleted successfully

No content

delete/v2/customers/{customer_id}/cards/{card_id}
DELETE /v2/customers/{customer_id}/cards/{card_id} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated