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 staging x-api-key for 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]
ScenarioPathExpected result
Safari on iPhone/iPadHostedApple Pay button appears → native Apple Pay sheet opens → payment succeeds
Chrome on desktopHostedQR code appears → scan with iPhone → Apple Pay opens in Safari → payment succeeds
Merchant checkout + Apple Pay JSEmbeddedApple Pay button appears → merchant validation succeeds → token generated → token sent to merchant server
Missing customerPhoneHostedApple Pay button does not appear
Unverified domainEmbeddedApple Pay button does not appear or merchant validation fails
Invalid Apple Pay tokenEmbeddedSale API rejects the request

Hosted checkout validation

Hosted checkout requires no Apple Pay code and no merchant-side domain verification.

  1. Create a payment link using POST /payment/checkout/intiate.
  2. Include the required customerPhone in the request.
  3. Open the returned redirectUrl on a compatible Apple device using Safari.
  4. Confirm that the Apple Pay button is displayed.
  5. Select Apple Pay and complete the payment using your configured test Wallet card.
  6. Confirm the transaction status using the status API or the configured webhook.
  7. Do not treat the browser redirect alone as confirmation of payment.

Desktop QR flow

Test the hosted checkout from Chrome on a desktop browser:

  1. Open the hosted checkout in Chrome.
  2. Confirm that the Apple Pay desktop QR option is displayed when supported.
  3. Scan the QR code using a compatible iPhone.
  4. Complete the Apple Pay payment on the iPhone.
  5. Verify the final transaction status using the status API or webhook.

Desktop QR →

Code: Hosted Checkout Code (PHP)


Embedded integration validation

Before testing an embedded Apple Pay transaction, confirm that your merchant domain has been configured correctly.

  1. Confirm that the Apple Pay domain association file is publicly accessible at:
https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association
  1. Confirm that the domain has been successfully verified in Apple Developer.
  2. Open your checkout page in Safari on a compatible Apple device.
  3. Confirm that the Apple Pay button is displayed.
  4. Start the Apple Pay payment flow.
  5. Confirm that merchant validation succeeds.
  6. Generate the Apple Pay payment token.
  7. Send the token to your server.
  8. Your server sends the required payment request to DigetPay.
  9. Confirm that the embedded sale API returns the expected result, such as APPROVED or the applicable 3DS HTML response.
  10. Confirm that your webhook receives the transaction update.
  11. 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

SettingValue
API basehttps://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

SymptomLikely causeWhat to check
No Apple Pay button — HostedMissing or invalid customerPhoneConfirm customerPhone is included when creating the payment link
No Apple Pay button — EmbeddedDomain verification or browser/device issueConfirm domain verification, HTTPS, and Safari/device compatibility
Association file returns 404Incorrect file path or web server configurationVerify the exact /.well-known/ path
Merchant validation failsApple Pay merchant configuration or certificate issueConfirm the Merchant ID, domain registration, and certificate configuration
Payment token rejectedInvalid token handling or incorrect token mappingConfirm the token is passed unchanged to your server and the correct DigetPay API is used
Transaction status not updatedWebhook or status-check issueCheck webhook configuration and verify the transaction using the status API
Works in staging but not productionProduction domain or merchant configuration incompleteConfirm 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


Did this page help you?