API reference / Payment methods
List saved payment methods
GET
/v1/payment-methods Newest first. Filter by your customer's ID to show their saved cards.
Query parameters
per_pageintegerItems per page, 25 by default; values above 100 become 100.At least 1Default: 25cursorstringThenext_cursororprev_cursorfrom the previous page.Up to 1024 charactersdate_fromstring (date)Start date (Asia/Manila), inclusive. Send withdate_to.date_tostring (date)End date (Asia/Manila), inclusive.customer_idstringYour own ID for the customer, exact match.Up to 64 charactersstatusstringPENDINGuntil your customer saves it and their bank confirms it;ACTIVE(chargeable);FAILEDwhen that never happens;REMOVED.One of:PENDINGACTIVEFAILEDREMOVEDexpires_bystringOnly cards that expire in this month or earlier (YYYY-MM). Run it each month to ask those customers for a new card.Pattern: ^\d{4}-\d{2}$
Headers
AuthorizationstringRequiredBearerplus your API key. See Authentication.
Responses
200 OK
A page of saved payment methods.
What data holds
payment_methodsarray of objects16 fields in
payment_methodsidstringtypestringOne of:CARDstatusstringPENDINGuntil your customer saves it and their bank confirms it;ACTIVE(chargeable);FAILEDwhen that never happens;REMOVED.One of:PENDINGACTIVEFAILEDREMOVEDcustomerobject3 fields in
customeridstringnamestring | nullemailstring | null
cardobject | nullOnce saved. Never the card number.4 fields in
cardbrandstringFrom the card processor.One of:VISAMASTERCARDJCBlast4stringexp_monthinteger | nullThe expiry month your customer typed. Ask them for a new card before it passes (expires_byon the list).At least 1At most 12exp_yearinteger | nullFour digits.
labelstring | nullTo show your customer.next_actionobject2 fields in
next_actiontypestring | nullOne of:REDIRECTcheckout_urlstring (uri) | nullWeav's save page, whilePENDING.
success_urlstring (uri) | nullcancel_urlstring (uri) | nullwebhook_urlstring | nullexpires_atstring (date-time) | nullWhen the save link ends, whilePENDING.activated_atstring (date-time) | nullfailed_atstring (date-time) | nullremoved_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
paginationobject4 fields in
paginationper_pageintegerRequirednext_cursorstring | nullRequiredprev_cursorstring | nullRequiredis_last_pagebooleanRequired
401 Unauthorized
Missing, malformed or unknown API key (code 4010000).
403 Forbidden
The key can't make this request (code 4030000): an address outside the key's IP allowlist, a live key before your live mode is on, or an account that isn't active. A live key sent from a browser is refused (code 4030001): keep live keys on your server.
422 Unprocessable Content
One or more fields are invalid (code 4220000), or the channel is off (4220101) or doesn't take the currency (4220102).