Wallets API

Request Apple Pay payment session

When integrating Apple Pay in your own checkout on the web, you need to provide merchant validation. This is normally done using Apple's Requesting an Apple Pay Session. The merchant validation proves to Apple that a validated merchant is calling the Apple Pay Javascript APIs.

To integrate Apple Pay via Mollie, you will have to call the Mollie API instead of Apple's API. The response of this API call can then be passed as-is to the completion method, completeMerchantValidation.

Before requesting an Apple Pay Payment Session, you must place the domain validation file on your server at: https://[domain]/.well-known/apple-developer-merchantid-domain-association. Without this file, it will not be possible to use Apple Pay on your domain.

Each new transaction requires a new payment session object. Merchant session objects are not reusable, and they expire after five minutes.

Payment sessions cannot be requested directly from the browser. The request must be sent from your server. For the full documentation, see the official Apple Pay JS API documentation.

post/v2/wallets/applepay/sessions

Headers

idempotency-keystring
Example:123e4567-e89b-12d3-a456-426

A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Request body

validationUrlstring required

The validationUrl you got from the ApplePayValidateMerchant event.

A list of all valid host names for merchant validation is available. You should white list these in your application and reject any validationUrls that have a host name not in the list.

domainstring required

The domain of your web shop, that is visible in the browser's location bar. For example pay.myshop.com.

profileIdstring

The identifier referring to the profile this entity belongs to.

Most API credentials are linked to a single profile. In these cases the profileId can be omitted in the creation request. For organization-level credentials such as OAuth access tokens however, the profileId parameter is required.

Example request

{
  "validationUrl": "https://apple-pay-gateway-cert.apple.com/paymentservices/paymentSession",
  "domain": "pay.myshop.com",
  "profileId": "pfl_5B8cwPMGnU"
}

Response

The Apple Pay payment session object generated by Apple. This object, as mentioned in the Apple's Documentation, is opaque, so we are not defining a response schema.

Changes

Changed in 2 of the 78 revisions of this API.3

    • added the non-success response with the status

      response-non-success-status-added

    • the endpoint scheme security advancedAccessToken was added to the API

      api-security-added

    • the endpoint scheme security organizationAccessToken was removed from the API

      api-security-removed

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 78 revisions, 9 have no diff computed.