Set a default payment method for a customer

Sets a payment method as the customer's default payment method for a specific application context.

SecurityOAuth2
Request
path Parameters
id
required
string <uuid>

The unique identifier of the customer record.

header Parameters
Toast-Restaurant-External-ID
required
string

The identifier of the restaurant location.

Request Body schema: application/json
contextName
required
string

The unique integration provided context name that the payment method should be set as the default for.

paymentMethodId
required
string <uuid>

The unique identifier of the payment method.

Responses
200

Successful operation. Payment method set as the default.

400

The request was not correctly formed or left empty.

404

The customer record does not exist, or the payment method was not found, or the payment method does not belong to the customer.

500

Internal server error.

post/v1/customers/{id}/payment-methods/defaults
Request samples
application/json
{
  • "paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",
  • "contextName": "string"
}
Response samples
application/json
{
  • "paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",
  • "contextName": "string"
}