Remove a card.
DELETE
/billing/payment-methods/{payment_method_id}
const url = 'https://api.siteqwality.com/billing/payment-methods/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.siteqwality.com/billing/payment-methods/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” payment_method_id
required
string
Stripe payment method id
Responses
Section titled “ Responses ”Card removed
Media type application/json
object
ok
required
Always true. Present because a successful response with an empty body
hands the dashboard’s request wrapper a falsy data, which reads as a
failure at the call site.
boolean
Example generated
{ "ok": true}Missing or invalid authentication
Caller is not a super admin
Removing the only card on a paid subscription
Internal server error