Skip to main content
Apple Pay provides a secure and seamless payment method that enables your customers to pay using their iPhone, iPad, Apple Watch, or Mac devices. Learn how to implement Apple Pay with Cashfree Payments based on your technical requirements and business needs. Cashfree offers three methods to integrate Apple Pay:
  • Hosted checkout: Use Cashfree’s pre-built checkout page where customers can select Apple Pay as a payment option.
  • Direct integration: Integrate Apple Pay directly into your application, decrypt the payment payload on your servers, and send the decrypted payment details to Cashfree for authorisation.
  • Orchestrator: If you are integrating via an orchestrator, contact your orchestrator partner to configure Apple Pay within their platform. Ensure that Cashfree is set up as the payment processor on the orchestrator’s dashboard, and request that they enable Apple Pay routing through Cashfree.
To enable Apple Pay payments for your customers, contact your Cashfree account manager or submit the support form.
This requires no additional development work from you and is suitable for quick implementation with minimal setup. If you use api.cashfree.com, no additional integration work is required. Cashfree ensures seamless processing of Apple Pay transactions.

Benefits

Hosted checkout offers the following benefits:
  • Minimal development effort: No Apple Pay-specific coding required.
  • Automatic updates: New Apple Pay features are automatically available.
  • Reduced maintenance: Cashfree manages certificates and compliance.
  • Enhanced security: All sensitive data handled by Cashfree’s PCI-compliant infrastructure.

Implementation

Follow these steps to implement Apple Pay with hosted checkout:
1

Create an order

Create an order using the Cashfree Create Order API:
curl -X POST 'https://api.cashfree.com/pg/orders' \
  -H 'Content-Type: application/json' \
  -H 'x-api-version: 2023-08-01' \
  -H 'x-client-id: YOUR_CLIENT_ID' \
  -H 'x-client-secret: YOUR_CLIENT_SECRET' \
  -d '{
    "order_id": "order_001",
    "order_amount": 100.00,
    "order_currency": "INR",
    "customer_details": {
      "customer_id": "customer_001",
      "customer_name": "John Doe",
      "customer_email": "john@example.com",
      "customer_phone": "+919876543210"
    }
  }'
2

Redirect to checkout

Redirect your customers to the checkout address returned in the order creation response. Apple Pay is automatically displayed for eligible users.

Device compatibility

Apple Pay is shown automatically for customers using the following supported devices:
  • iPhone with Touch ID or Face ID.
  • iPad with Touch ID or Face ID.
  • Apple Watch.
  • Mac with Touch ID or Mac paired with eligible Apple devices.
  • Safari browser on supported devices.

Apple guidelines

Follow Apple’s official guidance for both design and technical implementation when enabling Apple Pay. Ensure that the UI, button usage, flows, and web and app behaviours meet Apple’s Human Interface Guidelines and implementation standards.

Compatibility

Apple Pay availability depends on issuer support, device and browser capability, and the shopper’s country or region where Apple Pay is supported. See Apple’s resources for the latest details:

Customer visibility

Apple Pay appears as a payment option when the shopper has added an eligible card to Apple Wallet and is using a compatible device and browser in a supported region.

Security and compliance

Apple Pay integration requires attention to security best practices and compliance requirements: Certificate management
  • Apple Pay certificates expire every 25 months.
  • Store private keys in hardware security modules when possible.
  • Limit certificate access to authorised personnel only.
Data protection
  • Apple Pay uses device-specific tokens instead of actual card numbers.
  • Transactions require Touch ID, Face ID, or device passcode.
  • All communications use TLS encryption.
Compliance requirements
  • PCI DSS compliance required only for direct integration.
  • Avoid storing Apple Pay tokens; they are single-use.
  • Ensure compliance with local payment regulations.

Troubleshooting

Review these common issues and their resolutions when implementing Apple Pay: Apple Pay button not appearing
  • Verify device compatibility and Safari browser usage.
  • Check Apple Pay wallet has cards added.
  • Ensure HTTPS is enabled on your domain.
Certificate errors
  • Regenerate CSR from your payment processor’s dashboard.
  • Verify the certificate has not expired (25-month validity).
  • Ensure correct merchant ID association.
Payment failures
  • Check 3DS authentication requirements.
  • Verify supported networks match customer’s card.
  • Validate payment amounts and currency codes.
Error codes
Error codeDescriptionResolution
INVALID_MERCHANT_IDMerchant ID not recognisedVerify Apple Pay configuration with Cashfree
CERTIFICATE_EXPIREDPayment processing certificate expiredRenew certificate through Apple Developer portal
UNSUPPORTED_DEVICEDevice does not support Apple PayGuide customer to supported payment methods

Best practices

Follow these practices for optimal Apple Pay implementation:
  • Progressive enhancement: Show Apple Pay only when available.
  • Clear labelling: Use Apple’s official button designs and guidelines.
  • Error handling: Provide clear feedback for failed transactions.
  • Performance: Minimise steps between button tap and payment completion.
For additional support or questions about Apple Pay integration, contact the Cashfree Payments support team through the support form or see the API documentation.