Remove a card
Removes a saved card. If it was the default and other cards remain,
the first remaining card becomes the default first. remaining is
how many cards are left.
With no card left and no credit, the organization is charged nothing
more but, once the month's free allowance is spent, its outbound
notifications stop after a grace period (see
dispatch_grace_ends_at on the summary).
Requires the billing:payment:write scope.
Authorization
Parameters
Path parameters
idstring requiredThe card's ID, from the list of saved cards.
Responses
200
The card was removed.
dataobjectremainingintegerCards still saved.
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
403
The key lacks the scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
404
The card is not saved for this organization (CARD_NOT_FOUND).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
429
Too many requests (RATE_LIMITED). Wait for Retry-After seconds.
Retry-AfterintegerSeconds to wait before retrying.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
502
The payment provider did not accept the change (CARD_UPDATE_FAILED). Retry later.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
503
Payments are not enabled on this environment (PAYMENTS_DISABLED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
Example request
curl -X DELETE 'https://evohub.io/api/v1/billing/payment-methods/pm_1QExampleMc4444' \
-H 'Authorization: Bearer <TOKEN>'
