Create/Update Token Details

Create/Update a token using the OnlinePay Tokenisation Service.

If a token exists for the card already, it is updated with the information in the request. Otherwise, a new token is created for the given card.

Body Params
uuid
required

The token scope under which this token was created.

string
required

The cardholder data encrypted using the OnlinePay provided public key. This can be obtained using either Verifone.JS solution or OnlinePay Checkout in capture mode.

The data to encrypt is a JSON with possible tags being cardNumber, sequenceNumber, cardholderName, startMonth, startYear, expiryMonth, expiryYear, cvv. This should be a single JSON line and should not contain any spaces. Read Secure card capture key for details.

Additionally, a tag called captureTime must be presenting indicating the time the card was captured in UTC in format RFC 3339, section 5.6. eg. 2019-08-24T14:15:22Z. Encrypted card is valid for only 15 minutes.

string

Represents a Card type or brand. It should correspond to a consistent name, the list of standard names is as follows:

ValueDescription
AMEXAmerican Express
JCBJapan Credit Bureau
MASTERCARDMasterCard
VISAVisa
string
enum
Defaults to REUSE

Token type

Allowed:
string
enum
Defaults to INTERNAL

The type of Reuse Token. This indicates if the reuse token is an internal OnlinePay type or an external Third-Party type.

Allowed:
date

When this Token will expire.

string
required
token_context
object

The context and identifiers related to the token request. Mandatory for external Third-Party tokens. Use of the /v2/card endpoint:

  • If reuse_token_type = INTERNAL => then token_scope mandatory; token_context optional, and only token_context.entity_id would be used (if provided);
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json

Terms and conditions Website requirements Other fees and charges

This information is a general statement for information purposes only and should only be used as a guide. While all care has been taken in preparation of this document, no member of the Westpac Group, nor any of their employees or directors gives any warranty of accuracy or reliability nor accepts any liability in any other way, including by reason of negligence for any errors or omissions contained herein, to the extent permitted by law. Unless otherwise specified, the products and services described are available only in Australia.

© Westpac Banking Corporation ABN 33 007 457 141 AFSL and Australian credit licence 233714.