Get the default payment method for a customer

Returns the default payment method for a customer.

SecurityOAuth2
Request
path Parameters
contextName
required
string

The unique integration provided context name for the default payment method.

id
required
string <uuid>

The unique identifier of the customer record.

header Parameters
Toast-Restaurant-External-ID
required
string <string>

The identifier of the restaurant location.

Toast-Session-Secret
string

A unique and randomized identifier attached to a payment intent used to retrieve a customer's payment method data.

Responses
200

Successful operation. Returns information about a customer's default payment method.

404

The customer record does not exist.

500

Internal server error.

get/v1/customers/{id}/payment-methods/defaults/{contextName}
Request samples
curl -i -X GET \
  'https://toast-api-server/v1/customers/{id}/payment-methods/defaults/{contextName}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Toast-Restaurant-External-ID: string' \
  -H 'Toast-Session-Secret: string'
Response samples
application/json
{
  • "paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",
  • "contextName": "string"
}