Apple Pay

 

Process Apple Pay

Please ensure you have followed the steps outlined in Domain Verification for Apple Pay before implementing Apple Pay.

As Apple Pay required biometrics authentication, it will not need tot go through 3ds checks.

POST /pay/v1/applepay

Headers

Content-Type string
Content type.

Authorization string
Access token generated from create token request.

User-Agent string
User agent.

Accept string
Accept

Accept-Encoding string
Accept encoding.

Accept-Charset string
Accept charset.

 

Attributes

payment_intent string
Payment intent token.

paymentToken string
Payment token generated from Create apple Payment Token request.

type string (optional)
Type 1 is ECOM payment and type 2 is MOTO. For Apple Pay, the value must be 1.

resource string
The resource value for apple pay must be “applepay”.

amount float (optional)
Payment amount. If not present, it will fetch value from Intent resource.

customer_email string (optional)
Customer email. If not present, it will fetch value from Intent resource.

customer_name string (optional)
Customer name. If not present, it will fetch value from Intent resource.

customer_address string (optional)
User’s address details. If not present, it will fetch value from Intent resource.

customer_postcode string (optional)
User’s postcode. If not present, it will fetch value from Intent resource.

transaction_unique string
Transaction unique.

device_timezone integer
Device timezone value which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.

device_capabilities string
Device capabilities which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.

device_accept_language string
Device accept language which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.

device_screen_resolution string
Device accept language which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.

remote_address string
Remote address which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.

merchant_data json (optional)
The merchant can add custom key value pairs in JSON format, for example:

{ "my_order_id": 123, "fancy_note": "Order complete", "card_discount": false }

Request

POST https://secure.blinkpayment.co.uk/api/pay/v1/applepay HTTP/1.1 Content-Type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG... User-Agent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", Accept: "*/*" Accept-Encoding: "gzip, deflate, br" Accept-Charset: "" { "payment_intent": "pi_Swhc84aSLtUGppvPARX...", "paymentToken": "eyJwYXltZW50VG9rZW4iOns...", "type": 1, "amount": 1.1, "resource": "applepay", "customer_email": "random@email.com", "customer_name": "A Smith", "transaction_unique": "PHnRNzjUw...", "device_timezone" : "-330", "device_capabilities" : "javascript", "device_accept_language" : "en-GB", "device_screen_resolution" : "1366x768x24", "remote_address" : "123.123.123.123", "merchant_data": "{\"my_order_id\": \"cc-12345678\"}" }

Response

HTTP/1.1 200 OK Content-Type: application/json { "acsform": "<form id="form3ds22" method="post" action="https://acs.********"><input type="hidden" name="creq" value="********"> <input type="hidden" name="threeDSPageSessions[427**************][bfreq]" value="*******"> <input type="hidden" name="threeDSPageSessions[427**************][threeDSRef]" value="****"> <input id="btnSubmit" type="submit" class="button expanded btn btn-primary" value="Process Payment"> </form>" }

HTML Page

Response