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 NoahPay API endpoint can be used to retrieve the opaque Apple Pay session object.

Request Details

PropertyDescription
MethodGET
URLSandbox: https://paynow.pmnts-sandbox.io/v2/apple_pay/payment_session

Production: https://paynow.pmnts.io/v2/apple_pay/payment_session
AuthenticationRefer to Authentication

Request Parameters

ParameterTypeDescription
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

Example Request

curl https://paynow.pmnts-sandbox.io/v2/apple_pay/payment_session\?url\=https://apple-pay-gateway-cert.apple.com/paymentservices/startSession\&domain_name\=noahpay.com -u TEST:TEST

Example Response

{
  "epochTimestamp": 1597042910373,
  "expiresAt": 1597046510373,
  "merchantSessionIdentifier": "<identifier>",
  "nonce": "<nonce>",
  "merchantIdentifier": "<merchant-identifier>",
  "domainName": "noahpay.com",
  "displayName": "NoahPay",
  "signature": "<signature>"
}