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.
- Merchant Identity Certificate (web only), which you set up yourself.
- Technical capability to implement the Apple Pay SDK.
Set up certificates with Apple and Cashfree
Complete the following setup process across your Apple Developer account and the Cashfree Merchant Dashboard.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.
Download the CSR from the Cashfree Merchant Dashboard
- Log in to the Merchant Dashboard.
- Navigate to Settings > Payment Methods > Apple Pay.
- Select Custom Checkout > Cashfree Decrypts > I have my own Apple Developer Account.
- Select Download CSR. Cashfree generates a unique CSR for your merchant account.
Upload the CSR to Apple and download the signed certificate
- In your Apple Developer account, navigate to your Merchant ID settings.
- Find Apple Pay Payment Processing Certificate > Create Certificate.
- Upload the CSR file downloaded from the Merchant Dashboard.
- Download the signed certificate (
.cerfile) from Apple.
Upload the signed certificate to the Cashfree Merchant Dashboard
- Return to the Merchant Dashboard.
- Upload the signed
.cerfile. - Cashfree validates the certificate and activates Apple Pay for your account.
Set up the Merchant Identity Certificate (web only)
- In your Merchant ID settings on the Apple Developer portal, find Apple Pay Merchant Identity Certificate.
- Select Create Certificate.
- Generate a CSR using OpenSSL:
- Upload the CSR to Apple, and download the signed certificate (
.cerfile). - Install the Merchant Identity Certificate on your server. It is used for two-way TLS with Apple during merchant validation.
Register your domain (web only)
- In your Merchant ID settings on the Apple Developer portal, 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
Check Apple Pay availability
Load the Apple Pay button
Create the payment request and initiate the session
Handle merchant validation
Handle payment authorisation
onpaymentauthorized event with the encrypted payment token. Pass the encrypted token to your server, then call the Cashfree Authorisation Only API with the encrypted data. Cashfree decrypts it and processes authorisation on your behalf.