Detach a payment method

Requests the deletion of a stored payment method from a customer record.

If the payment method has no active mandates, the payment method is permanently deleted and cannot be reattached.

If the payment method has active mandates, the payment method is not deleted. The usage is set to OFF_SESSION, so the payment method can only be used for merchant-initiated transactions.

SecurityOAuth2
Request
path Parameters
id
required
string <UUID>

The unique identifier of the payment method.

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

The identifier of the location.

Request Body schema: application/json
customerId
string

The unique identifier for the customer record that identifies the customer in the Toast platform. The identifier is used to retrieve the payment cards saved to a customer’s profile.

Responses
200

Request processed. The payment method was either deleted (no active mandates associated) or retained with the usage value set to OFF_SESSION (active mandates associated).

403

Your Toast API client does not have permission to detach the saved payment method.

404

The specified saved payment method was not found.

500

Internal server error.

post/v1/payment-methods/{id}/detach
Request samples
application/json
{
  • "customerId": "string"
}
Response samples
application/json
{
  • "id": "string",
  • "type": "string",
  • "card": {
    }
}