Skip to content

Wallet token decryption API (1.0.0)

This API enables you to decrypt Apple Pay and Google Pay payment tokens on your backend systems. The decryption service processes encrypted wallet tokens and returns the decrypted payment data, including card details, cryptograms, and authentication information necessary for transaction processing.

Use cases

You may want to decrypt wallet token payloads for several reasons:

  • Transaction processing: Extract the payment account number (PAN/DPAN) and cryptogram required to authorise transactions through payment processors.
  • Fraud detection and risk assessment: Access device identifiers, authentication data, and assurance details to perform custom fraud screening and risk analysis.
  • Compliance and audit requirements: Retrieve transaction amounts, currency codes, and authentication responses for regulatory reporting and record-keeping.
  • Custom payment workflows: Implement specialised payment logic, such as split payments, conditional routing, or multi-step authorisation processes.
  • Token vault integration: Store decrypted payment credentials in a secure token vault for recurring payments or subscription management.
  • 3D Secure processing: Access cryptograms and ECI indicators for transactions requiring additional authentication steps.
Download OpenAPI description
Languages
Servers
Production environment
https://api-services.pxp.io/api/v1
Sandbox environment
https://api-services.test.pxp.io/api/v1

Decrypt a wallet payment token

Request

Decrypts an encrypted payment token from Apple Pay or Google Pay. This endpoint allows you to process wallet payment tokens on your backend, extracting the necessary payment and authentication data required for transaction authorisation. The decryption process validates the token integrity and returns structured payment information specific to the wallet provider.

Path
walletstringrequired

The wallet provider type. Specify ApplePay for Apple Pay tokens or GooglePay for Google Pay tokens.

Enum"ApplePay""GooglePay"
Example: ApplePay
Bodyapplication/jsonrequired

The encrypted wallet token and associated site identifier.

tokenstringnon-emptyrequired

The encrypted payment token provided by the wallet provider (Apple Pay or Google Pay). This token contains the encrypted payment data that needs to be decrypted to process the transaction.

Example: "encrypted-token-string-here"
sitestring[ 1 .. 100 ] charactersrequired

Your unique site identifier, as assigned by PXP. This value is used to validate the decryption request against your configuration.

Example: "SITE-1"
curl -i -X POST \
  https://api-services.pxp.io/api/v1/wallets/ApplePay/decrypt-token \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "eyJzaWduYXR1cmUiOiJNSUFHQ1NxR1NJYjNEUUVIQXFDQU1JQUNBUUV4RHpBTkJnbGdoa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U80SDFSL2VrZVBLOVVWTWp0RHprbG1DUGoxWEpOV0pmQzFtUGNrdjcvUllwMmVaL0hJbXUxT29JcDdJN0JNN29rSkJaQlhxeGpTZlBhZ2JtaW1IQ0lSQUdPZ01RN0RGd2F0OGhDK3FhRmVkd01hN2J4QW5QMTJzTlN4dzZMNUZnLzNUTE9VV0pCSEw4Mjc0QXpjN3lsNlVBWk9ENmwyV21ZRmI1MEdVQ3RieGRxTmdyenhTL0lUUTUxL2lieFRqSGlsZlJSQ05RbHBRQzk1dUdYSnhPRXJpZm1GZy90U2YxWXpqRDJCZ0NEYnhkcVNIZk5qPSIsInZlcnNpb24iOiJFQ192MSJ9",
    "site": "SITE-1"
  }'

Responses

Successful decryption

Bodyapplication/json
One of:

The decrypted Apple Pay payment token containing all necessary payment and authentication data for processing the transaction.

decryptedAtstring(date-time)required

The timestamp when the token was decrypted, in ISO 8601 format with UTC timezone.

Example: "2025-10-09T04:44:37.7062965Z"
applicationPrimaryAccountNumberstring^[0-9]{13,19}$required

The device-specific account number (DPAN) or funding primary account number (FPAN) for the payment card. This number is used to process the transaction and may differ from the actual card number.

Example: "5204240492932939"
applicationExpirationDatestring^[0-9]{6}$required

The expiration date of the payment card, in YYMMDD format.

Example: "280930"
currencyCodestring^[0-9]{3}$required

The currency code for the transaction, in ISO 4217 format.

Example: "840"
transactionAmountnumber(decimal)>= 0required

The transaction amount in the smallest currency unit (e.g., cents for USD). For example, 2599 represents $25.99.

Example: 2599
cardholderNamestring or null

The name of the cardholder as it appears on the card. May be null if not provided by Apple Pay.

Example: "John Doe"
deviceManufacturerIdentifierstringrequired

A unique identifier for the device manufacturer, used for fraud detection and device verification.

Example: "050110030273"
paymentDataTypestringrequired

The type of payment data included in the token, indicating the authentication method used.

Enum"3DSecure""EMV"
Example: "3DSecure"
paymentDataobjectrequired

The payment cryptogram and additional authentication data required for transaction authorisation. This is a flexible object that may contain various properties depending on the payment data type.

paymentData.​onlinePaymentCryptogramstring

The cryptogram generated by the secure element for online payment authentication. This is used to verify the authenticity of the transaction.

Example: "APTMvCowhE0lATGzpcW9AoABFA=="
paymentData.​eciIndicatorstring

The Electronic Commerce Indicator (ECI) value for 3D Secure transactions.

Example: "7"
paymentData.​property name*anyadditional property
authenticationResponsesArray of objectsrequired

An array of authentication responses from various verification methods. May be empty if no additional authentication was performed.

authenticationResponses[].​merchantIdentifierstring or null

The merchant identifier associated with the authentication.

authenticationResponses[].​authenticationDatastring or null

Authentication data provided during the verification process.

authenticationResponses[].​transactionAmountstring or null

The transaction amount associated with this authentication response.

merchantTokenIdentifierstring or null

A unique identifier for merchant tokens, used when the payment is associated with a recurring or subscription payment.

Example: "MTK-1234567890"
merchantTokenMetadataobject or null

Additional metadata associated with the merchant token, used for recurring or subscription payments. Contains card artwork and metadata provided by the issuer.

siteIdstring<= 20 charactersrequired

The site identifier that was used for the decryption request.

Example: "SITE-1"
Response
application/json
{ "decryptedAt": "2025-10-09T04:44:37.7062965Z", "applicationPrimaryAccountNumber": "5204240492932939", "applicationExpirationDate": "280930", "currencyCode": "840", "transactionAmount": 2599, "cardholderName": null, "deviceManufacturerIdentifier": "050110030273", "paymentDataType": "3DSecure", "paymentData": { "onlinePaymentCryptogram": "APTMvCowhE0lATGzpcW9AoABFA==" }, "authenticationResponses": [], "merchantTokenIdentifier": null, "merchantTokenMetadata": null, "siteId": "SITE-1" }