Skip to main content

Tokenize Credit Card payment methods on Worldpay 1.4

Zuora

Tokenize Credit Card payment methods on Worldpay 1.4

To tokenize Credit Card payment methods, use one of the approaches described in this article.

Token field mapping

Worldpay field Zuora field
paymentTokenId tokens > tokenId
authenticatedShopperId tokens > secondTokenId

Approaches to creating tokenized Credit Card payment methods

Approach Description Example
Use the API operation that supports creating payment methods, such as Create a payment method, to tokenize PAN data

Pass in the following required card information and set tokenize to true:

  • type
  • cardHolderInfo
  • cardNumber
  • cardType
  • expirationMonth
  • expirationYear

Tokens are generated and stored in Zuora along with the PAN data. Tokens are used in the subsequent recurring payments.

{
  "cardHolderInfo": {
    "cardHolderName": "Amy Lawrence"
  },
  "cardNumber": "378282246310005",
  "cardType": "Visa",
  "expirationMonth": "03",
  "expirationYear": "2030",
  "securityCode": "7377",
  "type": "CreditCard",
  "tokenize": true
}
Use the API operation that supports creating payment methods, such as Create a payment method, to pass in existing tokens

Pass in paymentTokenId through tokens > tokenId.

Pass in authenticatedShopperId through tokens > secondTokenId.

Pass in the masked card number through cardMaskNumber

Pass in the following required fields:

  • type
  • cardType

Tokens are stored in Zuora and used in subsequent payments.

{
  "cardType": "Visa",
  "cardMaskNumber": "37828XXXX310005",
  "type": "CreditCard",
  "tokens": {
    "tokenId" : "99171682776484228",
    "secondTokenId": "761f4ea3-3610-4d98-ae94-1245fea264f7",
    "gatewayType": "Worldpay"
  }
}

Use the API operation that supports creating payment methods, such as Create a payment method, to pass in existing tokens and PAN data

 

Pass in the following required card information:

  • type
  • cardHolderInfo
  • cardNumber
  • cardType
  • expirationMonth
  • expirationYear

Pass in paymentTokenId through tokens > tokenId.

Pass in authenticatedShopperId through tokens > secondTokenId.

Pass in the masked card number through cardMaskNumber

Tokens are stored in Zuora along with the PAN data. Tokens are used in the subsequent payments.

{
  "accountKey": "8a8d90cd93680d79019368215c85005d",
  "cardHolderInfo": {
  "cardHolderName": "Amy Lawrence"
  },
  "cardNumber": "378282246310005",
  "cardType": "Visa",
  "cardMaskNumber": "37828XXXX310005",
  "expirationMonth": "03",
  "expirationYear": "2030",
  "securityCode": "7377",
  "type": "CreditCard",
  "tokens": {
    "tokenId" : "99171682776484228",
    "secondTokenId": "761f4ea3-3610-4d98-ae94-1245fea264f7",
    "gatewayType": "Worldpay"
  }
}
Tokenize payment methods when processing payments On the configuration page of your Worldpay 1.4 gateway instance, select Tokenize payment method. With this setting enabled, tokens are generated and stored for Credit Card payment methods when processing payments through UI, API, or Payment Pages 2.0.  

Validate tokenized Credit Card payment methods

For tokenized payment methods, you must validate them in Zuora so that payments made with these payment methods are successful. To validate tokenized payment methods, enable the following settings on the gateway instance configuration page:

  • Verify new payment method
  • Verify updated payment method