When the merchant validation event is triggered from the Apple pay js library a request to the provider will be needed to obtain the merchant session object that is needed to validate the merchant session. The provider API in turn shall call Apple endpoint “startSession” to get an apple session and return it.
Request
Path Params
providerBaseURL
string
required
The root URL of the payment provider’s API. All API requests such as Apple Pay initiation, payment execution, and refunds will be sent relative to this base URL.
Example:
https://api.paymentprovider.com
Query Params
validationUrl
string
optional
The validation URL provided by the Apple Pay JS API during the merchant validation event. This URL must be sent to the provider so they can obtain a merchant session from Apple.
The display name of the merchant that will appear in the Apple Pay payment sheet.
Example:
Zid Store
domainName
string
optional
The domain associated with the merchant's Apple Pay transactions. This domain must be registered with Apple Pay via the provider.
Example:
store.zid.sa
publishableApiKey
string
optional
The merchant’s public API key provided by the payment provider. It’s used to identify and authenticate the merchant on the client side during Apple Pay initialization.
Example:
pk_test_abc123xyz
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.paymentprovider.com/applepay/initiate?validationUrl=https://apple-pay-gateway.apple.com/paymentservices/startSession&displayName=Zid Store&domainName=store.zid.sa&publishableApiKey=pk_test_abc123xyz'
Responses
🟢200OK
application/json
Body
merchantSession
object
required
Object containing Apple Pay session details, used to complete merchant validation via the Apple Pay JS API.