Skip to main content

Direct applepay

Direct applePay will give you more freedom on how to control applepay button in your application, however it will require more configurtion from your side, we will guide on how you can enable and use direct applepay

note

In order to work with direct applepay you will have to use S2S API

Prerequisite

  • Provide the following to the support team
    • Merchant Identifier
    • Country
    • Shop Name `the name of the store that will be display on the customer device
      all of these data can be found on your Apple Pay Developer account
  • Certificates
    • Generated Apple Pay certificate
    • Private Key
    • Merchant supported Network by default [Mada,Visa,Mastercard] are enabled.

Using Direct applepay

note

Before using Apple Pay via S2S API , you should review next section carefully. There is a description on how you can obtain Apple Pay payment token (it refers to the official Apple Pay documentation for web, Apple Pay documentation for apps) it will walk you through how to setup your account and environment, etc..

note

Apple Pay on the web or Apple Pay using Passkit are similar in terms of environment setup and requirements, however make sure to follow details for your platform, the explaintion below for applepay on the web however in case you are using PassKit it will be the same with minor changes.

1- Each payment must be checked for applepay accesibility. 2- Show applepay button to your payers 3- Validate the merchant identity 4- Provide a payment request and create a session 5- Recieve applepay payment token (paymentData object)

After you implements Apple Pay tokens generation on your site/app you need to pass it the paymentData object you received from apple in the SALE request:

  • brand= applepay
  • parameters[paymentToken] - Apple Pay payment token

Request example

curl –d "action=SALE&client_key=c2b8fb04-110f-11ea-bcd3-0242c0a85004&brand=applepay&order_id=ORDER12345&order_amount=100
&order_currency=USD&order_description=Product&payer_ip=127.0.0.0&return_url=https//:apple.com&identifier=0987654321
&parameters[paymentToken]= {"paymentData":{"data":"sSnxW26Va2jj0+QqIrK6zyBve6z3L5j6mNk3iaVcfUwmz76\/bu8008BfkRRp7wZvsUtmrMbaHv0MCNCTW70QLAvLCw61kNidMNEzu2r4rGOXUGJQMMvgPgjXuRafWA8628HcOrrrvAtoljlaAbm\/8ucZVNhDdOFRgfCENqI13GVXhit2sNsN9MsgMsN4odCl7qX837RfJoXgCv7OC00L9ciqpqlMV0pc7jXb2XWN47DCyyRwja5OGMMHuD+heQ8OwCDq5g1mDBww6Neeubl6zpksdNafBjhtEl4nDJ1nPH6IJET4uPgcbgii9rkaEI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W4JkG9jdptrUmprzlOjvF3iK7JOt3wom28HS1MLwrWIKNY7R3Mmp\/tJqMeInAwZZWgXCXXmnujA3Bcig==","transactionId":"d71de566079d19b44545fa7aa3be682f916f995f5de585021fa9af8cb115a461"},"version":"EC_v1"},"paymentMethod":{"displayName":"Visa 6244","network":"Visa","type":"credit"},"transactionIdentifier":"d71de566079d19b44545fa7aa3be682f916f995f5de585021fa9af8cb115a461"}","transactionId":"5145cb84015f49a24e9add4752737b6b3124e9cf98f3ab247c4f4a8017f17286"},"version":"EC_v1"},"paymentMethod":{"displayName":"Visa 0224","network":"Visa","type":"debit"},"transactionIdentifier":"5145CB84015F49A24E9ADD4752737B6B3124E9CF98F3AB247C4F4A8017F17286"}
[&hash=](http://client.site.com/return.php&recurring_init=Y&hash=02cdb60b5c923e06c1b1d71da94b2a39)"a1a6de416405ada72bb47a49176471dc"[ https://test.apiurl.com](https://test.apiurl.com/) -k

We recommend checking out the demo provided by Apple for Apple Pay: https://applepaydemo.apple.com/