Hosted Checkout
The easiest way to use Apple Pay is by using the Dintero checkout solution, where we handle the entire payment flow for you. If you are already using Dintero checkout, you just need to enable Apple Pay.
Note that if you use the embedded checkout flow you need to verify your own domain before you can use Apple Pay. If you are not able to verify the domain you can still accept payments via Apple Pay by using the pop-out or redirect payment flows.
Getting Started
To use Apple Pay as a payment method, you must comply with Apple Pay's Acceptable Use Guidelines and accept their terms of service. You also need to set up a Dintero account.
Enable Apple Pay on Your Dintero Account
During your onboarding you will be able to select Apple Pay as a payment method. If it's not enabled, you can go to settings and payment methods. From there, you can enable Apple Pay as a payment method for your account. If you use payment profiles, ensure that Apple Pay is added to the relevant profiles.
Authentication Methods
Apple Pay transactions are authenticated on the user's device using biometric authentication (Face ID, Touch ID) or a device passcode. This authentication is a core security feature of Apple Pay and provides a high level of security. Dintero's hosted checkout solution handles this authentication process seamlessly on behalf of the merchant.
Since Apple Pay transactions are already authenticated on the device, they benefit from "liability shift," which means the merchant is protected from fraudulent chargebacks. This security feature eliminates the need for an additional 3-D Secure authentication step, creating a faster and more streamlined checkout experience. Dintero's hosted checkout handles this process automatically.
Embedding the checkout on your own domain
Domain verification is only needed if you use the embedded the checkout on your own website. If you use pop-out or redirect then domain verification is not required.
To verify that a website is authorized to process Apple Pay on the web for a specific merchant, Apple requires a domain association file to be hosted on the merchant's domain. This file is placed in the standardized .well-known directory.
Use the this file for domain Apple Pay domain verification.
- Serve the file from
https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association - The recommended MIME type is
text/plain; charset=utf-8.
Note: The file has no extension (e.g., .txt or .json), which can sometimes cause issues with certain web server configurations. If your server struggles to serve a file without an extension, you may need to add a specific MIME type or a URL rewrite rule.
When the file is served from your domain contact integration@dintero.com and we will update your account with support for your custom domain.
One click Apple pay in Checkout Express
For Checkout Express sessions we support a one click Apple Pay checkout flow where the customer can pay by clicking an Apple Pay button that is shown above the customer data form. When the customer clicks this button the session is updated with customer details from Apple Pay and the customer selects a shipping option in the Apple Pay UI.
Since Apple Pay's express features behaves a bit differently from the default Checkout Express flow this requires an opt in property in the payment session configuration, the allow_express_wallet_payment must be set to true.
Apple Pay can still be used for payment in Express Checkout when this flag is not set. Apple Pay will then be shown next to the other payment options after the customer has entered their address details manually.
One click Apple Pay requirements for your shipping address callback endpoint
Your endpoint must support returning shipping options when the session.order.shipping_address in the request body from Dintero’s systems contains only country and postal_code.
See also full documentation for the shipping address callback endpoint.
Testing
Sandbox Environment
You can test Apple Pay in a sandbox environment to simulate payments without charging any real cards. Dintero provides a test mode that allows you to trigger a test Apple Pay payment sheet, so you can confirm that the integration works as expected.
Production Testing
When you are ready to test in production, you can enable Apple Pay for your production environment. These payments will actually charge the card, so you should test with a small amount and be prepared to cancel or refund the transaction after testing.
To avoid exposing Apple Pay to customers while testing, you can use a payment profile that includes Apple Pay, and only use this profile for your testing purposes.