Skip to main content
If you want to keep a customer’s card or bank account on file without holding the sensitive details yourself, store them with the token endpoints. PayChoice holds the details and returns a token you use in later charges instead of the raw card or account data.
Tokens expire after their first use unless they are attached to a customer under Recurring billing. Attach them if you intend to charge more than once.
If you’d rather not touch card or account details at all, the Create Token page captures them on a PayChoice-hosted form and returns the same token.

Store a credit card

Returns HTTP 200 on v4 and 201 Created on v5. merchant_guid sits at the top level, outside card. card_type is one of Visa, MasterCard, AmericanExpress, DinersClub, Jcb, Discover, BankCard or Unknown. Pass card.token as card_token on Create a charge in place of the card[...] fields.

Store a bank account

bank[bsb] is not required for New Zealand accounts; supply the full 15–16 digit account number instead. This response has no paging fields. Pass bank.bank_token as bank_token on a bank charge.

Retrieve and remove

Retrieve returns the stored details with any empty fields omitted; on the card endpoint expiry_month and expiry_year come back as integers. A token that has been removed returns 410 Gone, which is a reliable way to check whether a token is still usable before charging it.

Next