For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGuidesAPI ReferenceChangelog
HomeGuidesAPI ReferenceChangelog
  • Quotes API
  • Products API
  • Policies API
  • Card Token API
      • POSTCreate a token for a credit card
  • Users API
LogoLogo
Card Token APICredit Card

Create a token for a credit card

POST
https://cardtoken-api.wng-test.com/tokenise
POST
/tokenise
$curl -X POST https://cardtoken-api.wng-test.com/tokenise \
> -H "Content-Type: application/json" \
> -d '{
> "source": "source",
> "pan": "pan",
> "expiryMonth": 1,
> "expiryYear": 1
>}'
200Successful
1{
2 "outcome": "accepted",
3 "token": "token"
4}
This service generates a credit card token for use during payments.
Was this page helpful?
Previous

Generate access token for protected actions using credentials

Next
Built with

Request

This endpoint expects an object.
sourcestringRequired=2 characters
Specifies the source system for this request
panstringRequiredformat: "^[0-9]{13,19}$"
Card PAN to be tokenised
expiryMonthintegerRequired1-12
expiryYearintegerRequired>=2018
cardHolderNamestringOptional
The name of the card holder, as printed on the card

Response

OK
outcomeenum
The outcome of the tokenise request
Allowed values:
tokenstring

The tokenised value for the card specified in the request. Tokens are single-use only.