openapi: 3.0.3
info:
  title: Wallet token decryption API
  description: >-
    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.
  version: 1.0.0
servers:
  - url: https://api-services.pxp.io/api/v1
    description: Production environment
  - url: https://api-services.test.pxp.io/api/v1
    description: Sandbox environment
paths:
  /wallets/{wallet}/decrypt-token:
    post:
      summary: Decrypt a wallet payment token
      description: >-
        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.
      operationId: decrypt-wallet-token
      parameters:
        - name: wallet
          in: path
          description: >-
            The wallet provider type. Specify `ApplePay` for Apple Pay tokens or
            `GooglePay` for Google Pay tokens.
          required: true
          schema:
            type: string
            enum:
              - ApplePay
              - GooglePay
            example: ApplePay
      requestBody:
        description: The encrypted wallet token and associated site identifier.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
                - siteId
              properties:
                token:
                  type: string
                  description: >-
                    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
                  minLength: 1
                siteId:
                  type: string
                  description: >-
                    Your unique site identifier, as assigned by PXP. This value
                    is used to validate the decryption request against your
                    configuration.
                  example: SITE-1
                  maxLength: 20
            examples:
              ApplePay:
                summary: Apple Pay token decryption request
                value:
                  token: >-
                    eyJzaWduYXR1cmUiOiJNSUFHQ1NxR1NJYjNEUUVIQXFDQU1JQUNBUUV4RHpBTkJnbGdoa2dCWlFNRUFnRUZBRENBQmdrcWhraUc5dzBCQndFQUFLQ0FNSUlEV2pDQ0FrS2dBd0lCQWdJSWRrdXpHbmkzK0lBd0NnWUlLb1pJemowRUF3SXdlakV1TUMwR0ExVUVBd3dtUVhCd2J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FhRmVkd01hN2J4QW5QMTJzTlN4dzZMNUZnLzNUTE9VV0pCSEw4Mjc0QXpjN3lsNlVBWk9ENmwyV21ZRmI1MEdVQ3RieGRxTmdyenhTL0lUUTUxL2lieFRqSGlsZlJSQ05RbHBRQzk1dUdYSnhPRXJpZm1GZy90U2YxWXpqRDJCZ0NEYnhkcVNIZk5qPSIsInZlcnNpb24iOiJFQ192MSJ9
                  siteId: SITE-1
              GooglePay:
                summary: Google Pay token decryption request
                value:
                  token: >-
                    eyJzaWduYXR1cmUiOiJNRVlDSVFEVEFBajNxL2lqdWZaUUNKd0xtZTBzOFJBR01xNkM3T1BFUW5PQldraE9NUUloQU90d2JoSUVtM2N5VkRsbEE3MVpPWFpiOGVmMDRhWkI4VzdwRnRUQlJoUUxJIiwiaW50ZXJtZWRpYXRlU2lnbmluZ0tleSI6eyJzaWduZWRLZXkiOiJ7XCJrZXlWYWx1ZVwiOlwiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFQ3dDc1lRcHo0bHZucHdPUUdOSllGU2YwOEhIelByTWllaXU0R3ZUNUprRmVDR1NZUjkzY3NZaHpjbXlzOWFnMFkrRkdxS21NSVJ1WkI0UnExV2dvT3c9PVwiLFwia2V5RXhwaXJhdGlvblwiOlwiMTc2MTExOTgxMTc4N1wifSIsInNpZ25hdHVyZXMiOlsiTUVVQ0lRRGllQU1lMThXdlVCSTh0RWhwS3JSM3VrTEhOeW9pbUdneGJ5Q0RxU3FpZlFJZ0FJS3dhbzNDUUNsbXhQazJZdXE0bXhGOEE1Uy8zOTA3N2pKTmE0dFliVGM9Il19LCJwcm90b2NvbFZlcnNpb24iOiJFQ3YyIiwic2lnbmVkTWVzc2FnZSI6IntcImVuY3J5cHRlZE1lc3NhZ2VcIjpcIjNkbXNaaGZNbFFUMC9rQkxORzJydHdJcTkxRTlxZ0VaOERpc0lvNG9TRng0akFCd1o5aUJQbVdxOW5YNGgvQVFpSUJNOHF0eXR0SVFYQlNWVXg3eVlBZHF0RUVjR1ZEOU9oMmhWbVMvWkRuRHJWQjZLTlU3b3dkWjBMaGNqY2hLUjVvMW5nWkpqWGI5Y2R0ZnBtb1NWcWhGNzV5eGtVWFVyNnVEL3Q0Y0t2TVNVZ3dNZTNxdlJiQU5qVEhwWktaT1A4QjNzYWhVdVRZRW9JODEzdkNlU3V1bXFheFFMQS9nbzl3cS9VNG9iSzExcERQUm84NDNHNVFraHhPMkdJWjkycEpLQ3V6OHArR3gvSm9aYmROSE1xSGZVaDBLb1ZrME1CQmdqUHZqMFRBZ0xXV0o4Nm5sVnBBOGREZ0dyUzFvblFjR1VSRlJjNm5OTnlmS3d2MzFqUzU2TG1WSlhPL21YL3ZVelZDbGlUaFl5aUhqcTJWYzdqZkxYRkJ3QTVwUlpBOWV3WGI3cGhXRlNQN2xLODF1T0t5RWFWenppOHhNb0N6ekNhMkRHU3JGK09YU2xoRE9CZ0ZzK1k2MXRWMFwvZU1SSlArNWxzM3FqTmZWYzJocWpBdWUzQXcyOWZxQUVRPT1cIixcImVwaGVtZXJhbFB1YmxpY0tleVwiOlwiQkdsSjdHbW9raWo1RnZmZXRmQnphZHFKS1BaNE5leGptdldPaXRpeEFjWG1jL1VvM0d0aEF0bVVldGg1YS80TDI4U3pjUlE0TnQvb0p5cjdGVnd1aGJHUT1cIixcInRhZ1wiOlwicGJOMlwvVnJFVjlwUW1GblwvRDMwcmRUSjNSdjdqZTk4MldPdWFPRGNRa3dFPVwifSJ9
                  siteId: SITE-1
      responses:
        '200':
          description: Successful decryption
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/applePayDecryptedToken'
                  - $ref: '#/components/schemas/googlePayDecryptedTokenDPAN'
                  - $ref: '#/components/schemas/googlePayDecryptedTokenFPAN'
              examples:
                ApplePay:
                  summary: Decrypted Apple Pay token
                  value:
                    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
                GooglePayDPAN:
                  summary: Decrypted Google Pay token (DPAN)
                  value:
                    gatewayMerchantId: getFromUnitySession
                    messageExpiration: '1761028346476'
                    messageId: >-
                      AH2EjtdTFaP1MbWiWkIW4c1s594s5XelUTFVViOjj3X_Gs8GQCLiTXc-bnqvlKHe8TntL6yyaV-I5digQgbvrRxxjBv7il60Ll70k6nwyhGYUvyoGxcsLFo
                    paymentMethod: CARD
                    paymentMethodDetails:
                      expirationYear: 2030
                      expirationMonth: 12
                      pan: '4713747730076631'
                      authMethod: PAN_ONLY
                      assuranceDetails:
                        cardHolderAuthenticated: false
                        accountVerified: true
                GooglePayFPAN:
                  summary: Decrypted Google Pay token (FPAN)
                  value:
                    gatewayMerchantId: getFromUnitySession
                    messageExpiration: '1761027987591'
                    messageId: >-
                      AH2EjtdR_Fe2nseX21CbUY93yi6cY33QEsiSPHa7-K6pQXxO9O37AdGwVAI0p53p54GLukiZU2wEJrxfQUUP6KH1yXIf0ejuEtjMLeSbYhTQh7zhOLrzeQg
                    paymentMethod: CARD
                    paymentMethodDetails:
                      expirationYear: 2030
                      expirationMonth: 12
                      pan: '4012002436599751'
                      authMethod: PAN_ONLY
                      assuranceDetails:
                        cardHolderAuthenticated: false
                        accountVerified: true
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Indicates a client-side error where the request could not be
                  processed due to malformed syntax, invalid data, or missing
                  required information. This response occurs when the encrypted
                  token is invalid, the wallet type is not supported, or
                  required parameters are missing.
                properties:
                  correlationId:
                    type: string
                    description: >-
                      A unique identifier for tracking the request through the
                      system.
                    example: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                  details:
                    type: array
                    description: Additional details about the error.
                    items:
                      type: string
                  errorCode:
                    type: string
                    description: A specific error code identifying the type of error.
                    example: WALLET0001
                  errorReason:
                    type: string
                    description: A human-readable description of the error.
                    example: Invalid encrypted token format
                required:
                  - correlationId
                  - errorCode
                  - errorReason
              example:
                correlationId: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                details: []
                errorCode: WALLET0001
                errorReason: Invalid encrypted token format
        '401':
          description: Unauthorised
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Indicates an unauthorised request due to failed authentication
                  or missing credentials. The request cannot be processed
                  without proper authentication details.
                properties:
                  correlationId:
                    type: string
                    description: >-
                      A unique identifier for tracking the request through the
                      system.
                    example: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                  details:
                    type: array
                    description: Additional details about the error.
                    items:
                      type: string
                  errorCode:
                    type: string
                    description: A specific error code identifying the type of error.
                    example: WALLET0002
                  errorReason:
                    type: string
                    description: A human-readable description of the error.
                    example: Authentication failed
                required:
                  - correlationId
                  - errorCode
                  - errorReason
              example:
                correlationId: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                details: []
                errorCode: WALLET0002
                errorReason: Authentication failed
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Indicates that the request is understood but refused by the
                  server, often due to insufficient permissions or the site not
                  being configured for wallet token decryption.
                properties:
                  correlationId:
                    type: string
                    description: >-
                      A unique identifier for tracking the request through the
                      system.
                    example: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                  details:
                    type: array
                    description: Additional details about the error.
                    items:
                      type: string
                  errorCode:
                    type: string
                    description: A specific error code identifying the type of error.
                    example: WALLET0003
                  errorReason:
                    type: string
                    description: A human-readable description of the error.
                    example: Site not authorised for wallet decryption.
                required:
                  - correlationId
                  - errorCode
                  - errorReason
              example:
                correlationId: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                details: []
                errorCode: WALLET0003
                errorReason: Site not authorised for wallet decryption.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Occurs when the specified site or wallet configuration cannot
                  be found in the system.
                properties:
                  correlationId:
                    type: string
                    description: >-
                      A unique identifier for tracking the request through the
                      system.
                    example: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                  details:
                    type: array
                    description: Additional details about the error.
                    items:
                      type: string
                  errorCode:
                    type: string
                    description: A specific error code identifying the type of error.
                    example: WALLET0004
                  errorReason:
                    type: string
                    description: A human-readable description of the error.
                    example: Site configuration not found
                required:
                  - correlationId
                  - errorCode
                  - errorReason
              example:
                correlationId: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                details: []
                errorCode: WALLET0004
                errorReason: Site configuration not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Indicates that an unexpected error occurred on the server
                  while processing the decryption request. This may include
                  cryptographic failures or system unavailability.
                properties:
                  correlationId:
                    type: string
                    description: >-
                      A unique identifier for tracking the request through the
                      system.
                    example: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                  details:
                    type: array
                    description: Additional details about the error.
                    items:
                      type: string
                  errorCode:
                    type: string
                    description: A specific error code identifying the type of error.
                    example: WALLET0005
                  errorReason:
                    type: string
                    description: A human-readable description of the error.
                    example: Decryption service unavailable
                required:
                  - correlationId
                  - errorCode
                  - errorReason
              example:
                correlationId: 81f32b80-2ba0-4430-8ecd-0b559274ba9c
                details: []
                errorCode: WALLET0005
                errorReason: Decryption service unavailable
components:
  schemas:
    applePayDecryptedToken:
      title: Apple Pay
      type: object
      description: >-
        The decrypted Apple Pay payment token containing all necessary payment
        and authentication data for processing the transaction.
      properties:
        decryptedAt:
          type: string
          format: date-time
          description: >-
            The timestamp when the token was decrypted, in ISO 8601 format with
            UTC timezone.
          example: '2025-10-09T04:44:37.7062965Z'
        applicationPrimaryAccountNumber:
          type: string
          description: >-
            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'
          pattern: ^[0-9]{13,19}$
        applicationExpirationDate:
          type: string
          description: The expiration date of the payment card, in `YYMMDD` format.
          example: '280930'
          pattern: ^[0-9]{6}$
        currencyCode:
          type: string
          description: The currency code for the transaction, in ISO 4217 format.
          example: '840'
          pattern: ^[0-9]{3}$
        transactionAmount:
          type: integer
          description: >-
            The transaction amount in the smallest currency unit (e.g., cents
            for USD). For example, 2599 represents $25.99.
          example: 2599
          minimum: 0
        cardholderName:
          type: string
          nullable: true
          description: >-
            The name of the cardholder as it appears on the card. May be null if
            not provided by Apple Pay.
          example: John Doe
        deviceManufacturerIdentifier:
          type: string
          description: >-
            A unique identifier for the device manufacturer, used for fraud
            detection and device verification.
          example: '050110030273'
        paymentDataType:
          type: string
          description: >-
            The type of payment data included in the token, indicating the
            authentication method used.
          enum:
            - 3DSecure
            - EMV
          example: 3DSecure
        paymentData:
          type: object
          description: >-
            The payment cryptogram and additional authentication data required
            for transaction authorisation.
          properties:
            onlinePaymentCryptogram:
              type: string
              description: >-
                The cryptogram generated by the secure element for online
                payment authentication. This is used to verify the authenticity
                of the transaction.
              example: APTMvCowhE0lATGzpcW9AoABFA==
            eciIndicator:
              type: string
              description: >-
                The Electronic Commerce Indicator (ECI) value for 3D Secure
                transactions.
              example: '7'
          required:
            - onlinePaymentCryptogram
        authenticationResponses:
          type: array
          description: >-
            An array of authentication responses from various verification
            methods. May be empty if no additional authentication was performed.
          items:
            type: object
            properties:
              type:
                type: string
                description: The type of authentication performed.
              result:
                type: string
                description: The result of the authentication.
        merchantTokenIdentifier:
          type: string
          nullable: true
          description: >-
            A unique identifier for merchant tokens, used when the payment is
            associated with a recurring or subscription payment.
          example: MTK-1234567890
        merchantTokenMetadata:
          type: string
          nullable: true
          description: >-
            Additional metadata associated with the merchant token, if
            applicable.
          example: '{"subscription_id":"sub_123"}'
        siteId:
          type: string
          description: The site identifier that was used for the decryption request.
          example: SITE-1
          maxLength: 20
      required:
        - decryptedAt
        - applicationPrimaryAccountNumber
        - applicationExpirationDate
        - currencyCode
        - transactionAmount
        - deviceManufacturerIdentifier
        - paymentDataType
        - paymentData
        - siteId
    googlePayDecryptedTokenDPAN:
      type: object
      title: Google Pay (DPAN)
      description: >-
        The decrypted Google Pay payment token containing a Device Primary
        Account Number (DPAN). This represents a tokenized card number specific
        to the device.
      properties:
        gatewayMerchantId:
          type: string
          description: >-
            The merchant identifier as configured in the Google Pay gateway.
            This value is retrieved from the Unity session.
          example: getFromUnitySession
        messageExpiration:
          type: string
          description: >-
            The expiration timestamp for the decrypted message in milliseconds
            since Unix epoch. After this time, the decrypted data should not be
            used.
          example: '1761028346476'
          pattern: ^[0-9]+$
        messageId:
          type: string
          description: >-
            A unique identifier for the payment message, used for tracking and
            debugging purposes.
          example: >-
            AH2EjtdTFaP1MbWiWkIW4c1s594s5XelUTFVViOjj3X_Gs8GQCLiTXc-bnqvlKHe8TntL6yyaV-I5digQgbvrRxxjBv7il60Ll70k6nwyhGYUvyoGxcsLFo
        paymentMethod:
          type: string
          description: The payment method type used for the transaction.
          enum:
            - CARD
            - TOKENIZED_CARD
          example: CARD
        paymentMethodDetails:
          type: object
          description: >-
            Details about the payment method, including card details and
            authentication status.
          properties:
            expirationYear:
              type: integer
              description: The card's expiry year.
              example: 2030
              minimum: 2000
              maximum: 2099
            expirationMonth:
              type: integer
              description: The card's expiry month.
              example: 12
              minimum: 1
              maximum: 12
            pan:
              type: string
              description: >-
                The Device Primary Account Number (DPAN) - a tokenized card
                number specific to this device. This is different from the
                actual card PAN.
              example: '4713747730076631'
              pattern: ^[0-9]{13,19}$
            authMethod:
              type: string
              description: The authentication method used for the transaction.
              enum:
                - PAN_ONLY
                - CRYPTOGRAM_3DS
              example: PAN_ONLY
            cryptogram:
              type: string
              description: >-
                The 3D Secure cryptogram for authenticated transactions. Only
                present when authMethod is CRYPTOGRAM_3DS.
              example: AgAAAAAABk4DWZ4C28yUQAAAAAA=
            eciIndicator:
              type: string
              description: >-
                The Electronic Commerce Indicator for 3D Secure transactions.
                Only present when authMethod is CRYPTOGRAM_3DS.
              example: '07'
            assuranceDetails:
              type: object
              description: >-
                Details about the level of assurance provided by Google Pay for
                this transaction.
              properties:
                cardHolderAuthenticated:
                  type: boolean
                  description: >-
                    Whether the cardholder was authenticated using their device
                    credentials (biometric, PIN, or pattern).
                  example: false
                accountVerified:
                  type: boolean
                  description: >-
                    Whether the card account was verified by the issuing bank
                    when added to Google Pay.
                  example: true
              required:
                - cardHolderAuthenticated
                - accountVerified
          required:
            - expirationYear
            - expirationMonth
            - pan
            - authMethod
            - assuranceDetails
      required:
        - gatewayMerchantId
        - messageExpiration
        - messageId
        - paymentMethod
        - paymentMethodDetails
    googlePayDecryptedTokenFPAN:
      type: object
      title: Google Pay (FPAN)
      description: >-
        The decrypted Google Pay payment token containing a Funding Primary
        Account Number (FPAN). This represents the actual card number on file
        with the issuer.
      properties:
        gatewayMerchantId:
          type: string
          description: >-
            The merchant identifier as configured in the Google Pay gateway.
            This value is retrieved from the Unity session.
          example: getFromUnitySession
        messageExpiration:
          type: string
          description: >-
            The expiration timestamp for the decrypted message in milliseconds
            since Unix epoch. After this time, the decrypted data should not be
            used.
          example: '1761027987591'
          pattern: ^[0-9]+$
        messageId:
          type: string
          description: >-
            A unique identifier for the payment message, used for tracking and
            debugging purposes.
          example: >-
            AH2EjtdR_Fe2nseX21CbUY93yi6cY33QEsiSPHa7-K6pQXxO9O37AdGwVAI0p53p54GLukiZU2wEJrxfQUUP6KH1yXIf0ejuEtjMLeSbYhTQh7zhOLrzeQg
        paymentMethod:
          type: string
          description: The payment method type used for the transaction.
          enum:
            - CARD
            - TOKENIZED_CARD
          example: CARD
        paymentMethodDetails:
          type: object
          description: >-
            Details about the payment method, including card details and
            authentication status.
          properties:
            expirationYear:
              type: integer
              description: The card's expiry year.
              example: 2030
              minimum: 2000
              maximum: 2099
            expirationMonth:
              type: integer
              description: The card's expiry month.
              example: 12
              minimum: 1
              maximum: 12
            pan:
              type: string
              description: >-
                The Funding Primary Account Number (FPAN). This is the actual
                card number on file with the card issuer. This should be handled
                with appropriate PCI DSS security measures.
              example: '4012002436599751'
              pattern: ^[0-9]{13,19}$
            authMethod:
              type: string
              description: The authentication method used for the transaction.
              enum:
                - PAN_ONLY
                - CRYPTOGRAM_3DS
              example: PAN_ONLY
            cryptogram:
              type: string
              description: >-
                The 3D Secure cryptogram for authenticated transactions. Only
                present when authMethod is CRYPTOGRAM_3DS.
              example: AgAAAAAABk4DWZ4C28yUQAAAAAA=
            eciIndicator:
              type: string
              description: >-
                The Electronic Commerce Indicator for 3D Secure transactions.
                Only present when authMethod is CRYPTOGRAM_3DS.
              example: '07'
            assuranceDetails:
              type: object
              description: >-
                Details about the level of assurance provided by Google Pay for
                this transaction.
              properties:
                cardHolderAuthenticated:
                  type: boolean
                  description: >-
                    Whether the cardholder was authenticated using their device
                    credentials (biometric, PIN, or pattern).
                  example: false
                accountVerified:
                  type: boolean
                  description: >-
                    Whether the card account was verified by the issuing bank
                    when added to Google Pay.
                  example: true
              required:
                - cardHolderAuthenticated
                - accountVerified
          required:
            - expirationYear
            - expirationMonth
            - pan
            - authMethod
            - assuranceDetails
      required:
        - gatewayMerchantId
        - messageExpiration
        - messageId
        - paymentMethod
        - paymentMethodDetails
