Delete a card 

Connect
External Account Cards
Delete a card

You can delete cards from a connected account where controller.requirement_collection is application (includes Custom accounts).

There are restrictions for deleting a card with default_for_currency set to true. You cannot delete a card if any of the following apply:

  • The card’s currency is the same as the connected account’s default_currency.
  • There is another external account (card or bank account) with the same currency as the card.

To delete a card, you must first replace the default external account by setting default_for_currency with another external account in the same currency.

Parameters

  • idstringRequired

    Unique identifier for the external account to be deleted.

Returns

Returns the deleted card object.

DELETE /v1/accounts/:id/external_accounts/:id
Stripe.api_key = 'sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2'
deleted = Stripe::Account.delete_external_account(
'acct_1032D82eZvKYlo2C',
'card_1NAz2x2eZvKYlo2C75wJ1YUs',
)
Response
{
"id": "card_1NAz2x2eZvKYlo2C75wJ1YUs",
"object": "card",
"deleted": true
}