Apple Pay Web Integration (API Integration)
Apple Pay Web Integration#
This document describes how to integrate Apple Pay on the Web using the UseePay payment gateway.
It is intended for external merchants and developers.
1. Overview#
Apple Pay Web integration allows customers to complete payments directly on the merchant website (onsite checkout) without redirection.High-Level Flow#
1.
Merchant obtains Apple Pay domain certificate from UseePay
2.
Merchant backend retrieves Apple Pay configuration from UseePay
3.
Frontend initializes ApplePaySession using provided configuration
4.
Merchant validation is completed via UseePay
5.
Apple Pay token is submitted to UseePay to complete payment
2. Prerequisites#
Before integration, ensure the following are completed:Apple Pay is enabled for your UseePay merchant account
Apple Pay merchant identifier is registered
Domain verification certificate is issued and installed
HTTPS is enabled on the payment page domain
Integration is performed on Safari (macOS / iOS)
3. Integration Architecture#
Frontend → Merchant Backend → UseePay → AppleFrontend must not call UseePay APIs directly
Merchant backend is responsible for:
4. Step-by-Step Integration#
Step 1: Retrieve Apple Pay Configuration#
POST /v1/payment_method_configurations/apple_payRetrieve required Apple Pay parameters:{
"apple_pay": {
"configuration": {
"merchant_identifier": "merchant.com.example.useepay",
"merchant_name": "Example Store"
},
"allowed_card_networks": ["visa", "masterCard", "amex"],
"allowed_card_auth_methods": ["supports3DS", "supportsCredit"]
}
}
Step 2: Provide Configuration to FrontendMerchant backend should expose a simplified configuration:{
"payment_method": "applepay",
"merchant_identifier": "merchant.com.example.useepay",
"supported_networks": ["visa", "masterCard", "amex"],
"merchant_capabilities": ["supports3DS", "supportsCredit"]
}
Step 3: Check Apple Pay Availability
(Frontend)If false, Apple Pay should not be displayed.Step 4: Build ApplePayPaymentRequestStep 5: Merchant Validation(Frontend → Backend → UseePay → Apple)Step 6: Payment Authorization & Confirmation(Frontend → Backend → UseePay)Backend confirms payment:5. Security & Compliance#
Apple Pay tokens must not be modified
All UseePay API calls must occur on the merchant backend
Apple Pay integration complies with PCI DSS SAQ-A
Domain verification and HTTPS are mandatory
6. Common Integration Issues#
| Issue | Cause | Resolution |
|---|
| Apple Pay button not visible | Unsupported device | Use Safari with active card |
| Merchant validation failure | Domain mismatch | Ensure hostname matches |
| Invalid merchantIdentifier | Incorrect configuration | Verify with UseePay |
| Session validation error | Redirect or caching | Disable redirects & caching |
7. Testing Checklist#
Apple Pay button appears on supported devices
Merchant validation succeeds
Apple Pay token received correctly
Payment status is succeeded
8. Support#
For Apple Pay activation, domain verification, or technical support, please contact:Modified at 2025-12-25 03:44:31