Customer Cards
List customer cards
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.
Page number
1Items per page (max 100)
25Sort field (prefix with - for descending)
-created_atSuccessful response with paginated list
Unauthorized - Authentication is required or has failed
Forbidden - You do not have permission to access this resource
Internal Server Error - An unexpected error occurred
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 a new payment card to customer using tokenized card data from payment gateway
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.
Customer ID
Created successfully
Bad Request - The request was invalid or malformed
Unauthorized - Authentication is required or has failed
Forbidden - You do not have permission to access this resource
Not Found - The requested resource does not exist
Conflict - The request conflicts with the current state of the resource
Internal Server Error - An unexpected error occurred
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 a payment card. Card must not be in use by active subscriptions or payment plans.
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.
Customer ID
Card ID to delete
Deleted successfully
No content
Unauthorized - Authentication is required or has failed
Forbidden - You do not have permission to access this resource
Not Found - The requested resource does not exist
Internal Server Error - An unexpected error occurred
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