Menu

Worldpay STS tokens (WPG)

Worldpay STS Worldwide Payment Gateway (WPG) token examples are shown below. Each example includes a request and a response.

Note: eCheck is not supported for Worldpay STS (WPG) tokens.


Headers

Include theTMS-specific headersin all of your requests.

Tokenize card

Tokenize card request and response examples are shown below.

You must enter the shopper.id if you are using Shopper tokens. Do not include it if you are using Merchant tokens.

The following are required:

  • cardDetails.cardNumber
  • cardDetails.expirationDate
  • addressDetails.name

Request

Copied!
{
    "shopper": {
        "id": "merchant"
    },
    "token": {
        "payloadType": "Card"
    },
    "cardDetails": {
        "cardNumber": "4532216360040126",
        "expirationDate": "12/26"
    },
    "addressDetails": {
        "name": "Joe Smith",
        "address1": "123 Main St",
        "address2": "Building 6",
        "address3": "Apt 2",
        "city": "Austin",
        "country": "US",
        "state": "TX",
        "postalCode": "78759"
    },
    "outputTokenProviderProfileIds": [
        "Your_Worldpay_Profile"
    ]
}

Response

Copied!
{
    "tokens": [{
        "statusCode": "100",
        "tokenProvider": "Worldpay Token Provider",
        "profileId": "Your Worldpay_Profile",
        "value": "9962009509476413974",
        "payloadType": "Card",
        "expirationDate": "2021-07-20T11:34:17Z"
    }],
    "statusCode": "100",
    "requestId": "7B7yAe50C1NPHrfqfeiw"
}

Detokenize card

Detokenize card request and response examples are shown below.

You must enter the shopperId if you are using Shopper tokens. Do not include it if you are using Merchant tokens.

Request

GET https://cert-tesapi.paymetric.com/api/tokens/9962009509476413974?profileId=Worldpay_Profile&payloadType=Card&shopperId=123

Response

Copied!
{
    "cardDetails": {
        "cardNumber": "4532216360040126",
        "expirationDate": "10/21"
    },
    "addressDetails": {
        "name": "US TEST"
    },
    "statusCode": "100",
    "requestId": "5bwV8TCbYkmNfTy1Lu6KA"
}