session
HTTP method: POST
This is the step to receive Apple Pay session. By invoking this method we will reach Apple Pay with Merchant key and certificate to retrieve a session which should be used to proceed with Apple Pay payment.
Returned session object should be used in session.completeMerchantValidation(JSON.parse(merchantSession));
Required parameters
Parameter | Description | Type |
---|---|---|
terminal | The title of your terminal which was configured with Apple Pay. | string |
validationUrl | Validation URL which was is passed from requestSession ApplePayValidateMerchantEvent.validationURL |
string |
domain | The domain from which you are initializing the request, which requires to be verified. Otherwise, the request will use the default domain specified in the terminal. | string |
Return XML example
<APIResponse version="20170228"> <Header> <Date>2018-02-22T15:47:54+01:00</Date> <Path>API/cardWallet/session</Path> <ErrorCode>0</ErrorCode> <ErrorMessage/> </Header> <Body> <Result>Success</Result> <ApplePaySession><![CDATA[ { "epochTimestamp": 1519310874452, "expiresAt": 1519318074452, "merchantSessionIdentifier": "SSH9C72...F0F94927C24", "nonce": "b780c456", "merchantIdentifier": "7E2A...883B7491568F", "domainName": "devgateway.devaltapaysecure.dk", "displayName": "ApplePay Test", "signature": "308006092a8...feec63000000000000" }]]> </ApplePaySession> </Body> </APIResponse>