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

Delete a customer's payment source

Deletes a payment source attached to a customer. Provide customer and id to identify the source, and use expand if the deleted source response should include expanded fields.

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

2 parameters · 1 body field
customerstringrequired
The customer identifier that owns the payment source.
idstringrequired
The payment source identifier to delete.

Optional deletion parameters.

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

2 status codes
200Returns the deleted payment source object, including deletion state and the source's identifying details.
defaultError response.
errorobjectrequired

Error handling

customer must identify the customer and id must identify the payment source to delete. Each expand value must be a string no longer than 5000 characters.