The Create Token page is the tokenisation counterpart of the Widget: a PayChoice-hosted form in an iframe that stores the card or bank account and hands your page the token. Use it when you want to keep a payment method on file — for a subscription, say — without charging it immediately.
Embed it
- Credit card:
{baseURL}/tokenization/card/{merchant_guid}
- Bank account:
{baseURL}/tokenization/bank/{merchant_guid}
Only the merchant GUID is needed; there’s no public key.
Any string, echoed back as iframe_id in every message, so you can tell iframes apart when a page has several.
The form shows the methods enabled for your merchant account. On the card form, name, number and expiry are required; CVV is optional. On the bank form, name and account number are required, plus BSB for Australian merchants.
Receive the token
Results are sent to window.parent via postMessage. Always check event.origin against the base URL you embedded. Every message uses the same envelope:
Then attach it
The page stores the token but doesn’t link it to a customer. Send the token to your server and attach it to the customer so it persists and can be used for subscriptions and invoices; otherwise it expires after first use like any other token.