List saved cards. Only the account owner can call this
const url = 'https://api.pingram.io/account/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.pingram.io/account/payment-methods \ --header 'Authorization: Bearer <token>'List saved cards. Only the account owner can call this.
Authorizations
Responses
200
Successful response
GET /account/payment-methods and POST /account/payment-methods/assign response.
object
Saved card you can assign to this account or other accounts you own.
object
Card brand, such as visa or mastercard.
Card this account is billed on, when one is set.
Card new accounts you create will use by default.
How many of your accounts can use these cards, including this one.
Examplegenerated
{ "paymentMethods": [ { "id": "example", "brand": "example", "last4": "example", "expMonth": 1, "expYear": 1 } ], "thisAccountPaymentMethodId": "example", "defaultForNewAccountsPaymentMethodId": "example", "sharedAccountCount": 1}400
Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}401
Unauthorized
402
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}500
Internal Server Error
502
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}