Apple Pay Testing
Test Apple Pay in Fin staging — hosted checkout and embedded integration.
Validate Apple Pay in Test Mode before switching to Live Mode. Test both integration paths:
- Hosted checkout: Zero merchant-side Apple Pay code or domain verification.
- Embedded integration: Your checkout page displays the Apple Pay button and handles Apple Pay merchant validation and tokenization.
API base URL:
https://api.digetpay.com/v1(the same for Test and Live)
Use your Test API Key (x-api-key) for all Test Mode requests. Never use your Live API Key while testing.
Apple Pay tests require a compatible Apple device or Safari environment and a test card configured in Apple Wallet. Availability may also depend on the Apple Pay test environment and device configuration.
Do not use your Live API Key, live Apple Pay merchant IDs, or live merchant domains when testing Apple Pay in Test Mode.
Test matrix
flowchart TD Start[Apple Pay test plan] --> HC[Hosted checkout] Start --> EI[Embedded integration] HC --> Safari[Safari on iPhone/iPad] HC --> QR[Chrome desktop QR flow] EI --> Domain[Domain verification] EI --> Validation[Merchant validation] EI --> Token[Apple Pay token] Token --> Sale[Embedded sale API]
| Scenario | Path | Expected result |
|---|---|---|
| Safari on iPhone/iPad | Hosted | Apple Pay button appears → native Apple Pay sheet opens → payment succeeds |
| Chrome on desktop | Hosted | QR code appears → scan with iPhone → Apple Pay opens in Safari → payment succeeds |
| Merchant checkout + Apple Pay JS | Embedded | Apple Pay button appears → merchant validation succeeds → token generated → token sent to merchant server |
Missing customerPhone | Hosted | Apple Pay button does not appear |
| Unverified domain | Embedded | Apple Pay button does not appear or merchant validation fails |
| Invalid Apple Pay token | Embedded | Sale API rejects the request |
Hosted checkout validation
Hosted checkout requires no Apple Pay code and no merchant-side domain verification.
- Create a payment link using
POST /payment/checkout/intiatewith your Test API Key. - Include the required
customerPhonein the request. - Open the returned
redirectUrlon a compatible Apple device using Safari. - Confirm that the Apple Pay button is displayed.
- Select Apple Pay and complete the payment using your configured test Wallet card.
- Confirm the transaction status with the status API.
- Do not treat the browser redirect or a webhook notification alone as confirmation of payment.
Desktop QR flow
Test the hosted checkout from Chrome on a desktop browser:
- Open the hosted checkout in Chrome.
- Confirm that the Apple Pay desktop QR option is displayed when supported.
- Scan the QR code using a compatible iPhone.
- Complete the Apple Pay payment on the iPhone.
- Verify the final transaction status with the status API.
Code: Hosted Checkout Code (PHP)
Embedded integration validation
Before testing an embedded Apple Pay transaction, confirm that your merchant domain has been configured correctly.
- Confirm that the Apple Pay domain association file is publicly accessible at:
https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association- Confirm that the domain has been successfully verified in Apple Developer.
- Open your checkout page in Safari on a compatible Apple device.
- Confirm that the Apple Pay button is displayed.
- Start the Apple Pay payment flow.
- Confirm that merchant validation succeeds.
- Generate the Apple Pay payment token.
- Send the token to your server.
- Your server sends the required payment request to DigetPay using your Test API Key.
- Confirm that the embedded sale API returns the expected result, such as APPROVED or the applicable 3DS HTML response.
- Confirm that your Test webhook endpoint receives the transaction update notification.
- Verify the final order status with the transaction status API before fulfilling the order.
Never send the Apple Pay payment token directly from the browser to DigetPay. Keep token processing and payment API credentials on your server.
Code: Apple Pay Code (PHP)
Test Mode settings
| Setting | Value |
|---|---|
| API base URL | https://api.digetpay.com/v1 |
| API key | Test API Key (x-api-key) |
| Success / failure URLs | Your own HTTPS pages, for example https://yourstore.com/checkout/success and https://yourstore.com/checkout/failure |
| Redirect | Use the redirectUrl returned by the API |
| Webhook | Test Webhook Configuration |
Testing Guide → | Go-Live Checklist →
Common failures
| Symptom | Likely cause | What to check |
|---|---|---|
| No Apple Pay button — Hosted | Missing or invalid customerPhone | Confirm customerPhone is included when creating the payment link |
| No Apple Pay button — Embedded | Domain verification or browser/device issue | Confirm domain verification, HTTPS, and Safari/device compatibility |
| Association file returns 404 | Incorrect file path or web server configuration | Verify the exact /.well-known/ path |
| Merchant validation fails | Apple Pay merchant configuration or certificate issue | Confirm the Merchant ID, domain registration, and certificate configuration |
| Payment token rejected | Invalid token handling or incorrect token mapping | Confirm the token is passed unchanged to your server and the correct DigetPay API is used |
| Transaction status not updated | Webhook or status-check issue | Check your Test webhook configuration and verify the transaction using the status API |
| Works in Test Mode but not Live Mode | Live domain or merchant configuration incomplete | Confirm your Live API Key, Merchant ID, domain verification, and DigetPay's live registration of your domain |
Test completion checklist
Before considering Apple Pay testing complete, verify:
- Test API Key is being used.
- Hosted checkout tested successfully.
- Hosted checkout tested with
customerPhone. - Desktop QR flow tested where applicable.
- Embedded domain verification completed.
- Apple Pay button appears on the embedded checkout.
- Merchant validation succeeds.
- Apple Pay token is generated successfully.
- Token is processed server-side.
- Embedded sale API returns the expected response.
- Test webhook notification is received successfully.
- Transaction status is confirmed through the status API.
- No Live API Key or live domains were used during Test Mode testing.
Next steps
Updated about 2 months ago

