Get Apple Pay Session

Get an opaque Apple Pay session object that can be used to call the Apple Pay Javascript SDK's completeMerchantValidation method

In order to display the Apple Pay payment sheet when integrating Apple Pay on the Web, you will need to retrieve an opaque Apple Pay session object. The following Fat Zebra API endpoint can be used to retrieve the opaque Apple Pay session object.

Request Details

Request Parameters

urlStringThe Validation URL provided by the Apple Pay JS SDK's onvalidatemerchant event handler

The Validation URL provided must come from one of the whitelist Apple Pay domains or a 400 Bad Request response will be returned
domain_nameStringThe fully qualified domain name of your website that initiated the Apple Pay payment sheet via an Apple Pay button
display_nameString, maximum 64 UTF-8 charactersThe display name for the merchant in the Apple Pay Session. This will be displayed in the Touch Bar, and in the Payment Sheet when displayed to the customer

Example Request

curl\?url\=\&domain_name\ -u TEST:TEST

Example Response

  "epochTimestamp": 1597042910373,
  "expiresAt": 1597046510373,
  "merchantSessionIdentifier": "<identifier>",
  "nonce": "<nonce>",
  "merchantIdentifier": "<merchant-identifier>",
  "domainName": "",
  "displayName": "Fat Zebra",
  "signature": "<signature>"