Payment methods
A payment method is a card or bank account a customer pays with. A payment with new card or bank details creates one, which can be saved to charge again later, such as for a subscription.
The PaymentMethod object
- Name
object
- Type
- "payment_method",
- Description
- The object's type.
- Name
id
- Type
- string,
- Description
- Unique identifier for the object.
- Name
live
- Type
- boolean,
- Description
trueif the object is live, orfalseif it's in a sandbox.
- Name
created_at
- Type
- integer,
- Description
- When the object was created, in milliseconds since the Unix epoch.
- Name
active
- Type
- boolean,
- Description
- Whether the payment method is saved for future payments.
- Name
allow_redisplay
- Type
- enum,
- Description
- Whether the payment method is offered to the customer at checkout and on invoice payment pages.
- Properties
- Name
apple_pay
- Type
- empty object or null,
- Description
- Present when
typeisapple_pay.
- Name
billing_details
- Type
- object,
- Description
- Billing details for the payment method.
- Properties
- Name
card
- Type
- object or null,
- Description
- The card, when
typeiscard. - Properties
- Name
customer
- Type
- string or Customer or null,
- Description
- Expandable. The customer the payment method belongs to.
- Name
type
- Type
- enum,
- Description
- The type of payment method.
- Properties
- Name
us_bank_account
- Type
- object or null,
- Description
- The bank account, when
typeisus_bank_account. - Properties
The PaymentMethod object
Get a payment method
Retrieve a payment method by its ID.
Required parameters
- Name
id
- Type
- string,
- Description
- The ID of the payment method to retrieve.
Optional parameters
- Name
expand
- Type
- object,
- Description
- Related objects to expand in the response.
- Properties
Returns
Returns the payment method.
Retrieve a payment method
Response example
List all payment methods
Retrieve a paginated list of payment methods.
Optional parameters
- Name
expand
- Type
- object,
- Description
- Related objects to expand in the response.
- Properties
- Name
ending_before
- Type
- string,
- Description
- The ID of the object to list before, for pagination.
- Name
starting_after
- Type
- string,
- Description
- The ID of the object to list after, for pagination.
- Name
limit
- Type
- integer, at least 1, at most 1000, default is 50
- Description
- The maximum number of objects to return, from 1 to 1000. Defaults to 50.
- Name
filters
- Type
- object, object, or object,
- Description
- Properties
Returns
Returns a list of payment methods.
List all payment methods
Response example
Update a payment method
Updates change a payment method’s customer, billing details or allow_redisplay.
Bias offers a saved payment method back to its customer in Checkout and on invoice payment pages only when allow_redisplay is always. That’s set when the customer chooses to save it. To offer one saved another way, such as through the API or for a subscription, set allow_redisplay to always here or when you create the payment.
Required parameters
- Name
id
- Type
- string,
- Description
- The ID of the payment method to update.
Optional parameters
- Name
expand
- Type
- object,
- Description
- Related objects to expand in the response.
- Properties
- Name
billing_details
- Type
- object,
- Description
- Billing details for the payment method.
- Properties
- Name
customer
- Type
- string or null,
- Description
- The customer the payment method belongs to.
- Name
allow_redisplay
- Type
- enum,
- Description
- Whether the payment method is offered to the customer at checkout and on invoice payment pages.
- Properties
Returns
Returns the updated payment method.
Update a payment method
Response example
Deactivate a payment method
Deactivating a payment method permanently stops it from being charged. Subscriptions and unpaid invoices that used it charge the customer’s default_payment_method instead.
Required parameters
- Name
id
- Type
- string,
- Description
- The ID of the payment method to deactivate.
Returns
Returns the deactivated payment method.