Choose which card gets charged.
POST
/billing/payment-methods/default
const url = 'https://api.siteqwality.com/billing/payment-methods/default';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"payment_method_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siteqwality.com/billing/payment-methods/default \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "payment_method_id": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
payment_method_id
required
string
Example generated
{ "payment_method_id": "example"}Responses
Section titled “ Responses ”Default card updated
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
Account has no Stripe customer
Internal server error