---
title: "apple-pay/link-apple-pay"
method: POST
path: "/apple-pay/link-apple-pay"
tags: ["Digital Wallet Endpoints"]
---

# apple-pay/link-apple-pay

`POST /apple-pay/link-apple-pay`

## Request

- Base URL: `https://earthnode-dev.vopay.com/api/v2`
- URL: `https://earthnode-dev.vopay.com/api/v2/apple-pay/link-apple-pay`
- Auth: none declared

This endpoint links an Apple Pay payment token to your VoPay account and returns the VoPay token used to charge it. It is called by the iQ11 iframe once the customer has authorized the payment in the Apple Pay sheet, and is authenticated by the IframeKey rather than by account credentials.

## Request body `application/x-www-form-urlencoded`

- object
  - `IframeKey` string, required: The key of the iQ11 iframe the payment was authorized in
  - `PaymentToken` string, required: Apple's PKPayment token as JSON, from the ApplePaySession onpaymentauthorized event. Only the encrypted paymentData member is stored; the token may be sent whole or as paymentData on its own
  - `CardHolderName` string: Name on the card, from the Apple Pay billing contact
  - `MaskedCardNumber` string: Masked card number, from the Apple Pay payment method display name
  - `CardBrand` string: Card network reported by Apple Pay, for example Visa or MasterCard
  - `Email` string: Email address from the Apple Pay billing contact

## Response `200`

- object
  - `Success` boolean, required: True if the request was successful, false if it failed
  - `ErrorMessage` string, required: Contains a description of the error if the request failed
  - `Token` string: The Apple Pay token to charge with apple-pay/charge

---

[API](https://skmtc.dev/vopay/apis/payment-methods.md) - [All operations](https://skmtc.dev/vopay/apis/payment-methods/llms.txt) - [OpenAPI document](https://skmtc.dev/vopay/apis/payment-methods/revisions/b566c8002410?raw)
