Skip to main content

Tokenisation Specifics

Quick summary

Token formats, aliases, and how to create and use tokens across payment scenarios.


Token Formats

A token's format defines what the token string looks like when it is returned to your system. Your merchant account has a default format configured. You can override it per-request using the tokenFormat parameter.

Why format matters

Choosing the right format matters for a few reasons:

  • Masked card display — formats that preserve the first 6 and last 4 digits of the PAN allow you to show customers a recognisable card reference (e.g. 411111XXXXXX1111) without storing the real number.
  • Database compatibility — ensure your token storage field length matches the format's maximum length.
  • Compliance requirements — formats that retain original card digits may have different compliance implications. Confirm with your compliance team.

Available formats

FormatStructureLengthExample
F6L4ANFirst 6 + last 4 of PAN + 6 alphanumeric16411111m9fb0d1111
F6L4AFirst 6 + last 4 of PAN + 6 alpha16411111jbkzWI1111
F6L4FFirst 6 + last 4 of PAN + 6 numeric164111119890761111
F2L4ANFirst 2 + last 4 of PAN + 10 alphanumeric1641Be44uGTx0k1111
F2L4AFirst 2 + last 4 of PAN + 10 numeric164121329524851111
19D-PFX9-PASSPrefix 9 + mod-10 + chars 4–9 from PAN + 6 variable + last 4199494111116921481111
ALPHANUMERIC088 alphanumeric characters8A5fG6sn4
16N16 numeric digits161234567890123456
13N13 numeric digits131234567890123
F6L3AFirst 6 + last 3 of PAN + 6 alpha16411111ABCDEFG111

Aliases

An alias is a custom string you assign to a token, allowing you to reference it by your own identifier (e.g. a customer ID or account number) instead of the system-generated token value.

This is useful when you want to avoid storing two identifiers — you can map a token directly to an ID that already exists in your system, such as a CRM customer number.

Token:  tokenABC
Alias: CUST-67890

Both are valid in any cardToken field:
cardToken=tokenABC
cardToken=CUST-67890

Key points

RuleDescription
UniquenessAliases must be unique within your merchant account — attempting to assign a duplicate alias will return an error
ImmutabilityOnce set, an alias cannot be removed — only updated to a different value
CompatibilityAliases can be used anywhere a card token is accepted (API, Hosted Payment Page, batch)

Creating Tokens

There are three ways to create a token via the Hosted Payment Page. Which you use depends on whether you need to charge the card at the same time as capturing it.

Token only (no payment)

Store a card for later use without charging it immediately. This is common for account sign-up flows or subscription onboarding where the first charge happens at a later date.

onlyTokenise=true
tokenControl.token=true
tokenControl.tokenFormat=F6L4AN
How it works

Setting onlyTokenise=true renders a card-capture-only page. No payment occurs regardless of any amount or txnType values passed alongside it.


Using Tokens in Payments

Once a token exists, it replaces the card number (pan) and expiry date in any payment request. Pass it as the cardToken field across any of the following channels:

ChannelHow to useNotes
Transaction APIPass cardToken in place of pan and expiryDateCVC is not required for token-based payments
Hosted Payment PagePass cardToken as a URL/form parameterCustomer sees a payment confirmation rather than a card entry form
Batch processingInclude cardToken in the batch file in place of card detailsUseful for bulk recurring billing runs

Recurring Transactions

For ongoing billing (subscriptions, instalments, automatic renewals), tokens work alongside the recurring transaction type to simplify processing:

Simplified processing

  • No expiry date required — the token holds the card reference
  • No CVC required — CVC validation is only required at the point of initial card capture
  • ECM indicator — recurring transactions must use a second ECM digit of 2 (e.g. X2), which signals to CommBank Connected Payments that this is a merchant-initiated transaction

Restricted Characters

The following characters must not be used in any field (merchant reference, customer ID, metadata, token aliases, etc.) unless explicitly permitted — they will return a validation error.

Characters to avoid

Prohibited characters: ! $ £ * ^ { } ~ \

Safe characters: alphanumeric (A–Z, a–z, 0–9), hyphen -, underscore _, period .


Payment Page Parameters

The following parameters control tokenisation behaviour on the Hosted Payment Page. Pass them as URL parameters or form fields alongside your standard payment parameters.

ParameterTypeDescriptionExample
onlyTokeniseBooleanRender card-capture page only — no payment is processedtrue
cardTokenStringToken or alias to use for payment instead of card detailstokenABC
tokenControl.tokenBooleanGenerate a token for the card details providedtrue
tokenControl.tokenFormatStringToken format to use; falls back to account default if omittedF6L4AN
tokenControl.tokenUsageLimitIntegerNumber of uses before token is automatically destroyed; omit for a permanent token4
tokenControl.channelStringFree-text reference stored alongside the token — useful for tracking which system or flow created itCust4433221

Next Steps

GuideDescription
Tokenisation OverviewIntroduction to tokenisation concepts and integration options
Integration GuideStep-by-step implementation instructions for both Web and API methods
API ReferenceComplete API endpoint documentation