Prerequisites
Before implementing Apple Pay with this option, ensure you meet the following requirements.- Active Apple Developer Program membership.
- Registered Apple Merchant ID.
- HTTPS-enabled website or mobile application.
- Valid SSL/TLS certificate.
- PCI DSS compliance for handling decrypted payment data.
- Apple Pay Payment Processing Certificate.
- Merchant Identity Certificate (web only).
- Technical capability to implement the Apple Pay SDK.
Set up your Apple Developer account
Complete the following setup process in your Apple Developer account.1
Create Apple Merchant ID
- Log in to your Apple Developer account.
- Navigate to Certificates, Identifiers & Profiles > Identifiers.
- Select + to create a new Merchant ID.
- Select Merchant IDs and select Continue.
- Enter a unique identifier and description.
- Select Register to create your Merchant ID.
2
Create payment processing certificate
- In your Merchant ID settings, find Apple Pay Payment Processing Certificate.
- Select Create Certificate.
- Generate a CSR using OpenSSL:
- Upload the CSR file to Apple.
- Download the signed certificate (
.cerfile). - Store the signed certificate and private key securely on your servers.
3
Create Merchant Identity Certificate (web only)
- In your Merchant ID settings, find Apple Pay Merchant Identity Certificate.
- Select Create Certificate.
- Generate a CSR using OpenSSL:
- Upload the CSR file to Apple.
- Download the signed certificate (
.cerfile). - Install this certificate on your server. It is used for two-way TLS when calling Apple’s merchant session API.
4
Register your domain (web only)
- In your Merchant ID settings, navigate to Merchant Domains.
- Add your checkout domains where you want to accept Apple Pay as a payment option.
- Download the domain verification file from Apple.
- Host the file at this exact path on your domain:
- Select Verify in the Apple Developer portal to register the domains with Apple.
Implement Apple Pay on web and iOS
Implement Apple Pay using the following steps, depending on your platform.- Web
- iOS
Implement Apple Pay in your web application using the following JavaScript steps:
1
Check Apple Pay availability
2
Load the Apple Pay button
3
Create the payment request and initiate the session
4
Handle merchant validation
Your server calls Apple’s merchant session API directly, using your Merchant Identity Certificate over a two-way TLS connection.
5
Handle payment authorisation
After the customer authenticates with Face ID or Touch ID, Apple Pay fires the
onpaymentauthorized event with the encrypted payment token. Send the encrypted payment token to your server for decryption.Decrypt on your server and authorise via Cashfree
Decrypt the Apple Pay token on your servers, following Apple’s decryption specification.Enable on the Merchant Dashboard
Complete the following steps to enable Apple Pay for your Merchant ID at Cashfree.1
Log in
Log in to the Merchant Dashboard.
2
Navigate to Apple Pay settings
Navigate to Settings > Payment Methods > Apple Pay.
3
Select Merchant Decrypts
Select Custom Checkout > Merchant Decrypts.
4
Activate
Select Activate. Apple Pay gets enabled for your Merchant ID.