Apple Pay Testing
Test Apple Pay in Fin staging — hosted checkout and embedded integration.
Validate Apple Pay before production using the Fin staging environment. 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.
Fin staging API:
https://fin-api.digetpay.com/v1
Use your Fin stagingx-api-keyfor all staging requests. Never use production credentials in staging.
Apple Pay staging 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 production merchant IDs, production API keys, or production domains when testing Apple Pay in Fin staging.
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/intiate. - 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 using the status API or the configured webhook.
- Do not treat the browser redirect 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 using the status API or webhook.
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.
- Confirm that the embedded sale API returns the expected result, such as APPROVED or the applicable 3DS HTML response.
- Confirm that your webhook receives the transaction update.
- Verify the final order status using the transaction status returned by DigetPay.
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)
Staging URLs
| Setting | Value |
|---|---|
| API base | https://fin-api.digetpay.com/v1 |
| Success URL (Fin) | https://fin-admin.digetpay.com/pay/checkout/success |
| Failure URL (Fin) | https://fin-admin.digetpay.com/pay/checkout/failure |
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 webhook configuration and verify the transaction using the status API |
| Works in staging but not production | Production domain or merchant configuration incomplete | Confirm production credentials, Merchant ID, domain verification, and DigetPay production registration |
Test completion checklist
Before considering Apple Pay testing complete, verify:
- Fin staging credentials are 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.
- Webhook is received successfully.
- Transaction status is confirmed through the status API or webhook.
- No production credentials or domains were used during staging tests.
Next steps
Updated about 1 month ago

