Set default card
The card charged when a request names none, including a scheduled invoice.
Response contract
The successful wire shape and errors an integration should branch on.
Payment method
application/jsonidstringrequired- Unique payment-method identifier.
object"payment_method"required- Stable resource discriminator.
customerIdstringrequired- Customer that owns this method.
brandstringrequired- Card brand.
last4stringrequired- Last four digits only.
expMonthintegerrequired- Expiration month.
expYearintegerrequired- Four-digit expiration year.
isDefaultbooleanrequired- Whether this is the customer default.
createdAtstringrequired- ISO 8601 creation timestamp.
Example response
{
"id": "pm_01JEXAMPLE",
"object": "payment_method",
"customerId": "cus_01JEXAMPLE",
"brand": "visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2030,
"isDefault": true,
"createdAt": "2026-08-10T20:49:51.653Z"
}Error responses
401
authentication_failedThe key is missing, malformed, revoked, or invalid for this environment.
403
permission_deniedThe key does not have paymentMethods.setDefault.
404
not_foundThe resource does not exist for this merchant.
422
invalid_requestOne or more request fields are invalid.