Welcome to Zuora Product Documentation

Explore our rich library of product information

Approaches to creating tokenized Credit Card payment methods

This document outlines various approaches to creating tokenized credit card payment methods using API operations, including tokenizing PAN data, passing existing tokens, and processing payments with tokenization.

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.