Create an Apple Pay wallet token
North America—United States and Canada
An Apple Pay® token is a unique, single-use code that represents an Apple Pay wallet. It securely processes payments without exposing the actual wallet details or directly handling sensitive information. Use this token as the payment source in single-payment endpoints, such as create a charge or pay for an order.
Prerequisites
Create an ecommerce app integration in the Global Developer Dashboard. See Get started with the Global Developer Dashboard.
Create a single-pay Apple Pay wallet token
- Generate a PAKMS key.
- Send a POST request to the /v1/tokens endpoint.
- Expand the
encryptedWallet
object. - Enter information in the required fields.
Field | Description |
---|---|
applePayPaymentData | Displays encrypted Apple Pay payment data information. Note: See the Apple Pay PassKit Payment token documentation for up-to-date details. |
data | Encrypted payment data. |
header | Apple pay payment data header. |
ephemeralPublicKey | Ephemeral public key in bytes. EC_v1 only. |
publicKeyHash | Hash of the X.509 encoded public key bytes of the merchant’s certificate. |
transactionId | Transaction identifier, generated on the device. |
signature | Signature of the payment and header data. The signature includes the signing certificate, its intermediate CA certificate, and information about the signing algorithm. |
version | Version information about the payment token. The token uses EC_v1 for ECC-encrypted data and RSA_v1 for RSA-encrypted data. |
apikey | Public Ecommerce API key associated with a specific merchant and developer app. Use Retrieve an Ecommerce API key or PAKMS key to generate this key. |
In response, a single-pay Apple Pay wallet token returns. This token is alphanumeric and begins with clv_. Example: clv_1ABCDefgHI23jKL4m5nOPqR
Request example
curl --request POST \
--url 'https://token-sandbox.dev.clover.com/v1/tokens' \
--header 'accept: application/json' \
--header 'apikey: {apiAccessKey}' \
--header 'content-type: application/json' \
--data '{
"encryptedWallet": {
"applePayPaymentData": {
"version": "{}",
"data": "{}",
"signature": "{}",
"header": {
"ephemeralPublicKey": "{}",
"publicKeyHash": "{}",
"transactionId": "{}"
}
},
"address_line1": "{}",
"address_zip": "{}"
}
}'
'
Response example
{
"id": "clv_1AbcDefgHijkLmnoPQRs",
"object": "token",
"card": {
"exp_month": "05",
"exp_year": "2025",
"first6": "400551",
"last4": "0004",
"brand": "VISA",
"address_line1": "123 Main Street",
"address_zip": "11235"
}
}
Updated 8 days ago