To save and display a customer's saved cards, you must first create
a customer record. To create a customer record, send a POST
request to the /v1/customers
endpoint of the customers API to create a CustomerResponse.
The CustomerResponse contains the customer
description, externalReferenceId, and
id. The id is the unique identifier of the
customerId, which identifies the customer in the Toast
platform and can be used to create or update a payment intent. To display
a customer's saved cards in the iframe, include the
customerId in the request to create a payment intent.
|
Note |
|
When a customer record is created, this does not create a customer profile in the Toast platform. The customer record is used to match the customer to their saved cards. |
Example request body to create a customer record
{
"externalReferenceId": "john.smith@email.com",
"description": "John Smith"
}|
Represents the customer's identity in your integration. This
can be the primary key for your customer, an unique UUID, an email
address, or any other value to help correlate the generated
|
|||
|
A brief description of the customer, such as an email address, name, or phone number. |
Example response body to create a customer record
{
"id": "4b2dfc5a-88a3-11ee-b9d1-0242ac120002",
"externalReferenceId": "john.smith@email.com",
"description": "John Smith"
}|
The unique identifier for the customer record that identifies
the customer in the Toast platform and allows them to choose from
the payment cards saved to their profile. Your integration should
store the
|
|||
|
Represents the customer's identity in your integration. |