Skip to main content
PATCH
Set one of a customer’s saved cards as their default. The default card is listed first in List Cards with is_default: true and is preselected in the payment iframe’s saved-card list. The customer can still choose another card at checkout. PATCH /v1/cards/{id}/default · Authenticated with your secret key. The card identifies the customer, so the card ID is all you need to send. Get card IDs from List Cards or the card.saved webhook.
If no default has been set, or the default card is deleted, the customer’s oldest active card is preselected until you set a new default.

Path parameters

string
required
The card to make the default (card_id from List Cards). It must be an active card saved through your merchant account.

Response

boolean
Whether the default was set.
string
The card that is now the customer’s default.

Error responses

Authorizations

Authorization
string
header
required

Your secret key: sk_test_* (sandbox) or sk_live_* (production).

Path Parameters

id
string
required

The card to make the default (card_id from List Cards). Must be an active card saved through your merchant account.

Response

Default card set

success
boolean
default_card_id
string

The card that is now the customer's default