- 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.
- Hosted Checkout
- Direct Integration
This requires no additional development work from your side and is suitable for quick implementation with minimal setup. If your TLD is
api.cashfree.com
, no integration efforts are required from your end. Cashfree ensures seamless processing of Apple Pay transactions.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:
2
Redirect to checkout
Redirect your customers to the checkout address returned in the order creation response. Apple Pay will be automatically displayed for eligible users.
Device compatibility
Apple Pay will be 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, ensuring the UI, button usage, flows, and web/app behaviors 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. Refer to Apple’s resources for the latest details:- Countries and regions where Apple Pay is available.
- Issuers and participating banks that support Apple Pay.
- Supported devices and browsers for Apple Pay on the web and in apps.
Customer visibility
Apple Pay appears as a payment option when the shopper has already added an eligible card to Apple Wallet on a compatible region, device, and browser configuration.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.
- 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.
- PCI DSS compliance required only for direct integration.
- Avoid storing Apple Pay tokens; they’re 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.
- Regenerate CSR from your payment processor’s dashboard.
- Verify certificate hasn’t expired (25-month validity).
- Ensure correct merchant ID association.
- Check 3DS authentication requirements.
- Verify supported networks match customer’s card.
- Validate payment amounts and currency codes.
Error Code | Description | Resolution |
---|---|---|
INVALID_MERCHANT_ID | Merchant ID not recognised | Verify Apple Pay configuration with Cashfree |
CERTIFICATE_EXPIRED | Payment processing certificate expired | Renew certificate through Apple Developer portal |
UNSUPPORTED_DEVICE | Device doesn’t support Apple Pay | Guide customer to supported payment methods |
Best practices
Follow these recommended 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.