List saved payment methods
Overview
Lists saved cards and bank accounts. Each entry includes the payment type, last four digits, expiry date and customer label. Full account numbers and payment tokens are never returned. knows_default indicates whether the default method is known. If false, no method is marked as default. New payment methods are collected during checkout.
Permissions
Requires the account permission billing.read (View billing).
Authorization
Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.
Send it as Bearer <token>.
Response 200
application/jsonThe record, as a JSON object. There is no envelope.
The value of knows_default.
Saved payment methods with masked details for identification.
Show child attributesHide child attributes
The id ID.
The type of operation or resource.
Whether the resource is card.
The customer's own label for it, where they gave one.
The payment gateway identifier, such as stripe or paypal_payments.
The value of gateway_name.
What the customer met when they saved this: card, paypal or other. Classified from the gateway rather than from type, because the two disagree on the cases that matter - a PayPal billing agreement is stored as a card, and PayPal also operates a plain card form. Null where the row names no gateway.
The value of card_type.
The value of last_four.
The value of expiry_date.
True once the month printed above has been and gone.
The value of bank_name.
Whether the resource is default.
Whether renewals are charged to this payment method automatically. Null if the billing system cannot provide this information.
The value of last_updated.
Errors
- 401
- The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- 403
- Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- 429
- Too many requests. The
Retry-Afterheader says how many seconds to wait. Limits are per account, so several keys on one account share them.
Still stuck? Contact our team
View as Markdown