Detach a payment method

Requests removal of a stored payment method from a customer record.

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

If the payment method has active mandates, it is not deleted. Instead, its usage is set to OFF_SESSION (if it was not already), so that it can continue to be used for mandate-driven payments. The 200 response is returned in both cases; callers cannot distinguish between a deletion and a mandate-retained outcome from the response alone.

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 restaurant 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) or retained with usage set to OFF_SESSION (active mandates present).

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": {
    }
}