Sample - Stripe API
DELETE/v1/customers/{customer}/cards/{id}

Delete a customer's card

Deletes a card or other payment source stored on a customer. Provide the customer and source identifiers to remove the specified source, and use expand if you need expanded fields in the response. The response identifies the deleted payment source.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 1 body field
customerstringrequired
The unique identifier of the customer that owns the payment source. The value must be no more than 5,000 characters.
idstringrequired
The unique identifier of the card or payment source to delete.

Optional form parameters for expanding fields in the deleted payment source response.

expandarray<string>optional
Specifies which fields in the response should be expanded.

2 status codes
200Returns the deleted payment source object, which may be a card, bank account, or other supported source type.
defaultError response.
errorobjectrequired

Error handling

customer must be no more than 5,000 characters, and id must identify the payment source to delete. Each expand value must be no more than 5,000 characters when expansion is requested.