Apple Pay Native Integration
Introduction
To provide a better user experience for your Apple Pay users, MyFatoorah provides Apple Pay native integration.
MyFatoorah Apple Pay Native Integration provides the Apple Pay button to your website. This button can be placed on your checkout page. When your customers click the button, MyFatoorah will direct the customers to the Apple Pay payment sheet to complete the payment. Then you can smoothly complete the payment using ExecutePayment endpoint by following the below steps.

Apple Pay Button

Apple Pay Payment Sheet Page
1. Initial Contact & CSR File Request
- You will need to contact the MyFatoorah tech team to request a CSR (Certificate Signing Request) file.
Note: The CSR file will be used for generating the necessary certificates for Apple Pay.
2. Generate Payment Processing Certificate (PPC)
- Once you have a CSR file, they need to use it to generate the Payment Processing Certificate (PPC) with Apple Pay.
- This is an essential step to ensure that you can securely process payments using Apple Pay.
Steps for Payment Processing Certificate Generation
https://developer.apple.com/help/account/capabilities/configure-apple-pay/
3. Share PPC with MyFatoorah
- After generating the PPC, you must send it back to the MyFatoorah tech team.
- This allows MyFatoorah to install the certificate.
4. Installation and Confirmation
- Once the PPC is received, MyFatoorah’s tech team will install the certificate on their server.
- After successful installation, MyFatoorah tech team will confirm the installation with the vendor to complete the integration.
5. Start Using Apple Pay Integration
After the confirmation from MyFatoorah, you can proceed with the next steps in the integration process:
a. Call the InitiateSession Endpoint
After you call the InitiateSession endpoint, you will get a SessionId and the CountryCode.
{
"IsSuccess": true,
"Message": "Initiated Successfully!",
"ValidationErrors": null,
"Data": {
"SessionId": "dfc6a3c3-df09-44cb-9c6a-0a6375752da6",
"CountryCode": "KWT",
"CustomerTokens": []
}
}
b. Update Session with Apple Pay Token
You then need to update the session with the Apple Pay Token. This token authenticates and authorizes the payment transaction.
{
"SessionId": "{{SessionId}}",
"Token": "{\"paymentData\":{\"data\":\"LtkwRCNbGEWItmzLUqhI3QRafxrHgfZqqBC96Sw0kceza3tk1exVyDSlGD6OBYnLRArECd3CIa0ifke040JC9/UwcO3WulNR0bn9GZFGS6zL8QCkEI0t1CPfnhta2YD+FGnV7yXdnk81y/aWwYQG2044n2L/wog+rifQsssDmXc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",\"header\":{\"publicKeyHash\":\"SysfkV8a2ep5wmCAL4iS+gOexTs38Kz3EnlsguSBAiE=\",\"ephemeralPublicKey\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8xVra1KL01656womGIPVdfxv8AMGaSXOIbgH+cTi30D86uBPvG6Cy1LEIwXvr9g3EBYEXpskuKI+dv7DU3o9hw==\",\"transactionId\":\"9ff74188b13962f31b01dbd015cf0c91a6ff63d1f10492fe1b56f2deccdb8884\"},\"version\":\"EC_v1\"},\"paymentMethod\":{\"displayName\":\"MasterCard 8095\",\"network\":\"MasterCard\",\"type\":\"credit\"},\"transactionIdentifier\":\"9ff74188b13962f31b01dbd015cf0c91a6ff63d1f10492fe1b56f2deccdb8884\"}",
"TokenType": "applepay"
}
{
"IsSuccess": true,
"Message": null,
"ValidationErrors": null,
"Data": {
"SessionId": "2e1d470b-1c8b-4495-bb79-a32ef8f222c5",
"CountryCode": "KWT"
}
}
c. Call the Execute Payment Endpoint
Then, you need to send the SessionId to your server to process the actual transaction, which should be done in your backend environment using ExecutePayment endpoint.
Parameters conflict
Do not pass the PaymentMethodId parameter in the ExecutePayment request and use the SessionId parameter instead. As PaymentMethodId overwrite SessionId.
The "SessionId" you receive from InitiateSession Endpoint can not be used directly in ExecutePayment Endpoint.
Updated about 15 hours ago
