Search Overlay

ApplePay Token Processing

You can use Paysafe to process Apple Pay transactions. You will have direct integration with Apple Pay to initiate the transaction. Once you receive the encrypted Apple Pay token from Apple Pay server, you will pass it to Paysafe Payments API to process the transaction. Paysafe will process the transaction and return success or failed response.

You will have to use Paysafe Business Portal to generate Apple Pay processing certificate. This solution will work only when you use a Paysafe generated certificate. 

The following image shows the processing of Apple Pay token. 

To process a payment request:

Pass Apple Pay Encrypted token inside object "applePay.applePayPaymentToken"

  1. Create a Payment Handle with the transactionType parameter set to PAYMENT and the paymentType parameter set to CARD.

    • POST: paymenthub/v1/paymenthandles
    {
    "merchantRefNum": "a82e071b451147645c5a",
    "transactionType": "PAYMENT",
    "amount": 123,
    "currencyCode": "USD",
    "accountId": "1016343990",
    "applePay": {
    "applePayPaymentToken": {
    "token": {
    "paymentData": {
    "data": "crc1wsC.....0ieF",
    "signature": "MIAGC......AAAAAAAA=",
    "header": {
    "publicKeyHash": "jaI8zb3+bTPrkEHLe/edIBuRjWbkRm1YKtUXX/FuIRw=",
    "ephemeralPublicKey": "MFkwEw....CQ==",
    "transactionId": "c85....31"
    },
    "version": "EC_v1"
    },
    "paymentMethod": {
    "displayName": "MasterCard 1470",
    "network": "MasterCard",
    "type": "credit"
    },
    "transactionIdentifier": "C852F15513DD58F97B6B4094E3F897087D95D8F1FE08DC00BC39179AAE434E31"
    }
    }
    },
    "paymentType": "CARD",
    "profile": {
    "firstName": "Vishnu",
    "lastName": "Vardhan",
    "email": "vishnu@paysafe.com",
    "phone": "1231231231",
    "dateOfBirth": {
    "day": 1,
    "month": 7,
    "year": 1990
    }
    },
    "returnLinks": [
    {
    "rel": "on_completed",
    "href": "https://google.com/checkout/v2/pages/redirect-success.html",
    "method": "GET"
    },
    {
    "rel": "on_failed",
    "href": "https://google.com/checkout/v2/pages/redirect-error.html",
    "method": "GET"
    },
    {
    "rel": "default",
    "href": "https://google.com/checkout/v2/pages/redirect-success.html",
    "method": "GET"
    }
    ],
    "dupCheck": false,
    "billingDetails": {
    "country": "US",
    "zip": "94404",
    "state": "CA",
    "city": "Cupertino",
    "street": "20735 Stevens Creek Blvd",
    "street2": "Montessori"
    }
    }
  2. You will receive paymentHandleToken in response with status of PAYABLE

  3. Use the paymentHandleToken returned in the response to process the Payment request via Payments API using the private key. You must initiate a POST request to the endpoint: POST: paymenthub/v1/payments

  4. Funds are immediately requested from the card issuer with the next Paysafe batch Settlement run after the settlement request is completed.

On this Page