Apple Pay


What is Apple Pay

Apple Pay is the payment system associated with Apple devices. Apple Pay will securely store the credit card data on the device. Paying on a website will be matters of seconds, from the moment a user clicks on “pay with Apple Pay” to the reception of the payment.

More info on building Apple Pay on you app and web sites can be found on Apple Developer.

Apple Pay is currently available only for Gestpay Professional version.

How to enable on Gestpay

In order to pay with Apple Pay and Gestpay, you must have an account on Apple Developer. For details on how to do this, please refer to Configuring your Environment on Apple website.

To interact with Gestpay you need:

Then, ask Gestpay customer care to enable Apple Pay on your account.

How to use with Gestpay

GestPay allows authorization requests by sending the Payment Token Package (applePayPKPaymentToken) directly.

Generate the CSR (Certificate Signing Request)

If you want Gestpay to handle the Payment Token Package for you, one or more Payment Processing Certificates must be uploaded to your merchant profile.

Payment Processing Certificate can be generated through Apple Pay Member Center. To generate the certificates a CSR is needed (Certificate Signing Request). The CSR required can be downloaded in the Configuration > Environment > Payment Methods section by selecting Apple Pay payment method.



Once the certificate has been generated you can upload it by clicking on Add Payment Processing Certificate.

Perform the payment

The first step to perform a payment is to obtain a Payment Token Package from your buyer’s environment.

Once you have received a Payment Token Package from Apple, you can call callPagamS2S with the relevant data.

Note that, if using Apple Pay, no Credit Card or Token data are needed.

<callPagamS2S>
  <!-- mandatory data -->
  <shopLogin>9000002</shopLogin>
  <uicCode>242</uicCode><!-- code for euro -->
  <amount>24.21</amount>
  <shopTransactionId>MYSHOP-0001</shopTransactionId>
  <!-- insert here data from Apple Pay -->
  <applePay> 
    <applePayPKPaymentToken>
    {
      "paymentData": {
        "data": "Q0tfx6QzXdx...",
        "signature": "MIAGCSqGSIb3DQEHAq...",
        "header": {
          "publicKeyHash": "b9OHKov7pD...",
          "ephemeralPublicKey": "MFkwE...",
          "transactionId": "df9ea7239074..."
        },
        "version": "EC_v1"
      },
      "transactionIdentifier": "DF9EA72390...",
      "paymentMethod": {
        "network": "Visa",
        "type": "debit",
        "displayName": "Visa0492"
      }
    }
    </applePayPKPaymentToken>
  </applePay>
  <!-- fill the remaining fields with usual data --> 
  ...
</callPagamS2S>

For a real example of Payment Token Package, contained in applePayPKPaymentToken, click here.

The most important field in this process is applePayPKPaymentToken. Here is a description:

Key Value Description
applePayPKPaymentToken string contains a UTF-8 serialization of a plain-text JSON dictionary.

Once you have submitted callPagamS2S, Gestpay will behave exactly as always and your payment will be processed.