# Apple Pay

Phase 1: Initiate process

Before implementation, you must contact Intergiro to start the process. Intergiro will assist with the initial steps required from both Apple and VISA.

Phase 2: Steps required

The following steps need to be completed prior to integration:

  • Entitlement and Whitelisting Request
  • Entitlement configuration
  • Splash screen and Apple Pay Mark control logic to be implemented in your application

Details about these steps can be found in the official Apple documentation.

Phase 3: Integration

Start the integration according to the technical documentation below.

Phase 4: Certification

Apple Pay certification must be completed before going live. This certification will need to be booked by your company and carried out by an authorised certifier. Intergiro can advise but cannot book this on your company’s behalf.


Apple Pay tokenization is initiated by calling the following endpoint with card ID you wish to tokenize:

 




POST /v3/cards/a1c5ad61-5506-4c90-ab93-11221af2abdc/apple_pay/tokenize

Content-Type: application/json
Authorization: Bearer <access_token>

Which responds with a pending Consent:

 



 




HTTP 412 Precondition Failed

{
  "consent": {
    "id": "e1dd9cd7-1650-42b3-8496-a970fb40ed3f",
    "status": "pending"
  }
}

Use the following endpoint with consent.id you got from response to the previous request:

 




POST /v3/consents/e30b2da8-879d-4d9d-b9f9-7c461500245f

Content-Type: application/json
Authorization: Bearer <access_token>

Response:

 




 




HTTP 200 OK

{
  "method": {
    "redirect_url": "https://3d.staging.intergiro.tech/...",
    "token": "YW55IGNhcm5hbCBwbGVhc3Vy",
    "expires_at": "2021-07-27T12:00:33+02:00"
  }
}

Using the method.token you can call the Intergiro.launch() method on the iOS Mobile SDK:





 

import IntergiroSDK

Intergiro.setPublicKey("<PUBLIC_KEY>")

Intergiro.launch(token: "YW55IGNhcm5hbCBwbGVhc3Vy", callback: completion)

This in turn will open a UI provided by Intergiro where the Apple Pay provisioning flow takes place.

Depending on what happened within the SDK UI, the callback may return a payload or an error. For a list of possible error codes, see the IntergiroError enum.

When provisioning was successful and the card was added to Apple Pay, the callback returns:

{
  "status": "approved"
}

When provisioning was not successful for any reason, the callback returns:

{
  "status": "error"
}