# Apple Pay

To embed the card tokenization for Apple Pay into your mobile application you need to integrate with:

# Adding card to Apple Pay

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 the response of 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, so that the card can be added to Apple Pay.