Using Apple Pay (Hosted Page/Fields)

Introduction

Apple Pay is a safe, reliable, and high success rate payment method that is extremely popular in Japan and abroad. Additionally, it can be quite simple to implement via KOMOJU. At this stage, KOMOJU only supports Apple Pay via Visa and Mastercard branded cards registered in the end user's Apple Wallet.

Eligibility and Onboarding

At this stage, you need to be a Japan-based merchant to use Apple Pay via KOMOJU. In addition, you need to be using either KOMOJU Hosted Page, KOMOJU Hosted Fields, or KOMOJU Payments API. We will be detailing the implementation details in sections below.

Additionally, you need to be fully approved to accept Visa and Mastercard Credit Card payments before being able to apply to use Apple Pay. Once you are approved for Visa and Mastercard, the Apple Pay toggle will be available under the "Payment Details" section of your KOMOJU Dashboard. Simply toggle it on to get onboarded to Apple Pay.

Hosted Page

Once onboarded to Apple Pay, if you use the KOMOJU Hosted Page, you can simply add the apple_pay payment type to your session creation payment_types. This is all that is needed!

This will allow the end user to pick Apple Pay from the list of possible payment methods.

If you create a session with only Apple Pay as a payment method, the user will immediately get the familiar, Apple-branded "Pay with Apple Pay" button.

We also have special handling should you create a session with just Apple Pay and Credit Card, where the end user is given the choice on a single page, rather than via an upstream payment selection dialogue. This can be very powerful and increase payment success rate.


Hosted Fields

To use Apple Pay with Hosted Fields, you will need to create a session in the same way as described in the above "Hosted Page" section. Additionally, because you will be hosting the fields within a page that is in your own domain, you need to register your domain with Apple. We have provided an easy interface to do so.

  1. Download the Apple Domain Association file

  2. Place the file at the following path, within your domain and any other subdomains you may place hosted fields under:

    /.well-known/apple-developer-merchantid-domain-association

  3. The file must have Content-Type: text/plain in the header, be externally accessible, not be password protected, not be behind a proxy or redirect. Example of a file hosted correctly: https://komoju.com/.well-known/apple-developer-merchantid-domain-association

  4. Log into your KOMOJU Dashboard, and navigate to "Settings" on the left-hand bar. Then scroll down to "External Connections" and click on "Get Started" next to "Setup Apple Pay for API"

  5. In the following page, click on "Register New Domain"

  6. Input your full domain or subdomain name and click register

  7. The domain appears in the list as registered

  8. Repeat steps 2-7 for each domain or subdomain you will be using Apple Pay from


Once the above is done, you will be able to accept Apple Pay payments via Hosted Fields. Simple use the apple_pay slug when creating the Session for your Hosted Fields.