List the cards on file.
GET
/billing/payment-methods
const url = 'https://api.siteqwality.com/billing/payment-methods';const options = {method: 'GET', 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 GET \ --url https://api.siteqwality.com/billing/payment-methods \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Cards on file
Media type application/json
object
payment_methods
required
Array<object>
object
id
required
string
brand
required
string
last4
required
string
exp_month
required
integer format: int64
exp_year
required
integer format: int64
is_default
required
boolean
is_expired
required
True once the card’s expiry month has passed. Surfaced so the list can flag it before a renewal fails rather than after.
boolean
Example generated
{ "payment_methods": [ { "id": "example", "brand": "example", "last4": "example", "exp_month": 1, "exp_year": 1, "is_default": true, "is_expired": true } ]}Missing or invalid authentication
Account has no Stripe customer
Internal server error