Set default payment method
Sets or clears the customer’s default payment method. Pass null for default_payment_method to clear it. The method must already be attached to the customer.
Authorizations
A merchant secret key (sk_…) sent as Authorization: Bearer <key>.
Headers
A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.
255Merchant ID when an authorized Platform acts for a connected Merchant. Omit when authenticating directly as that Merchant.
^mer_[0-9A-Za-z]{14}$Path Parameters
The customer id (cus_…).
Body
Payment method id (pm_…). Pass null to clear the default.
Response
The updated customer.
Unique customer identifier (cus_…).
customer Whether this customer was created with a live (true) or test (false) key.
The immutable logical billing clock attached at creation; null when this customer uses wall-clock time.
Empty string when not set.
Empty string when not set.
Empty string when not set.
Billing address; null when not set.
Shipping details; null when not set.
How the customer was created (for example api).
api, checkout, import, dashboard, platform Payment configuration stored for the customer.
True when the customer has been soft-deleted.
Unix epoch seconds.

