Create an Apple Pay Single-Use Token

POST /customervault/v1/applepaysingleusetokens

The Customer Vault API allows you to create single-use tokens, which are then used with an Apple device to process a purchase through the Card Payments API. Single-use tokens are valid for only 15 minutes and are not consumed by verification.

You have to generate a new single-use token for each Card Payments API transaction you wish to process.

The example below shows you how to create an Apple Pay single-use token. In the response, you will find a paymentToken value that you would include with your authorization or purchase request.

Before trying the example, you should:

  • Replace the API key (after the u) with your API key for single-use tokens.
  • Replace the value for the data element with valid PassKit encrypted payment data.
  • Replace the value for the signature element with valid payment signature and header data.
  • Replace the values for the header sub-elements with valid values from the iOS device.
Value Required? Type Description
applePayPaymentToken Yes object The payment data object generated from the iOS device for Apple Pay.
Value Type Description
applePayPaymentToken object This is the payment data object generated from the iOS device for Apple Pay.
card object These are the details of the virtual card.
id string This is the ID for the request.
paymentToken string This is the single-use payment token that will be used for the Authorization/Purchase request.
timeToLiveSeconds integer This is the period of time the single-use token is valid before expiration, in seconds, returned in the response.
transaction object The Apple Pay transaction details.

See our full API Reference section for a complete description.

Did you find this page useful?