# Apple Pay on iOS

Accept Apple Pay in your iOS application using Finix.

This guide details how to get started accepting Apple Pay in an iOS application using the Finix API.

Dues and Assessments
We recommend that you pass the address field listed in the steps below. If the address is not passed, you will be charged additional dues and assessments per transaction from the card network.

## Step 1: Onboard with Apple

Start by familiarizing yourself with [the prerequisites](/guides/online-payments/digital-wallets/apple-pay) for using Apple Pay with Finix.

## Step 2: Register on the Finix Dashboard

Before you can begin accepting Apple Pay, you need to first verify and register your application with Apple. You can complete this step with the Finix Dashboard.

Core Customers
If you are a Core customer, instead of Steps 1 or 2 please go to the Application you want to accept Apple Pay.

Application Level
To register on the Finix Dashboard on the [Application Level](https://docs.finix.com/guides/online-payments/digital-wallets/apple-pay):

1. Log in to your [Finix Dashboard](https://finix.payments-dashboard.com/Login) and click **Developer.**
2. Click **Alt Payment Methods** tab.
3. Click **Add iOS Application** and follow the on-screen instructions to [create a payment processing certificate](https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay#3735192).

4. Enter an iOS application name.
![Apple Pay iOS Application Name](/assets/apple_pay_ios_application_name.14eac8e44ad0f6b3f9cf2b164f377bbcaff7299ec97862fd2062ca14bc092c56.08ff7529.png)
5. Download the Certificate Signing Request (CSR) file.
![Apple Pay iOS Download Certificate](/assets/apple_pay_ios_download_file.82454d895ac5fd660487c718b6573b5aa0dedb3c2aa30343815c1ad0340e0bf3.08ff7529.png)
You must keep this modal open while you are completing steps 6 through 9 on the Apple Developer Portal.
6. Go to your [Apple Developer Portal](https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757&path=%2Faccount%2Fresources%2Fidentifiers%2Flist%2Fmerchant&rv=1).
7. Select the [Apple Merchant ID](https://developer.apple.com/help/account/capabilities/configure-apple-pay#create-a-merchant-identifier) you'd like to add this certificate to, then click **'Create Certificate'** in the **Apple Pay Payment Processing Certificate** section.
8. When it prompts you to upload a Certificate Signing Request, choose the file you just downloaded in step 5 (step 2 on the modal).
9. Click **Activate** to enable the certificate, then click **Download** to save it to your computer.
![Apple Pay iOS Obtain Certificate](/assets/apple_pay_ios_obtain_certificate.dce7092ee7ad4b60df741d8ba40ca6cc9798a031b3e90bb92a984df7846f5ca4.08ff7529.png)
10. Upload the payment processing certificate from step 9.
![Apple Pay iOS Upload Certificate](/assets/apple_pay_ios_upload_certificate.4a2083654256e556cfc79b5f571ad780d5862a243472ae9df8f1e5f9a427b693.08ff7529.png)


Merchant Level
To register on the Finix Dashboard on the [Merchant Level](https://docs.finix.com/guides/online-payments/digital-wallets/apple-pay):

1. Log in to your [Finix Dashboard](https://finix.payments-dashboard.com/Login) and select Merchant Account
2. Click **Data Resources** and **Identities**
3. Select a **Seller** Identity
4. Click **Alt Payment Methods** tab.
5. Click **Add iOS Application** and follow the on-screen instructions to [create a payment processing certificate](https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay#3735192).

6. Enter an iOS application name.
![Apple Pay iOS Application Name](/assets/apple_pay_ios_application_name.14eac8e44ad0f6b3f9cf2b164f377bbcaff7299ec97862fd2062ca14bc092c56.08ff7529.png)
7. Download the Certificate Signing Request (CSR) file.
![Apple Pay iOS Download Certificate](/assets/apple_pay_ios_download_file.82454d895ac5fd660487c718b6573b5aa0dedb3c2aa30343815c1ad0340e0bf3.08ff7529.png)
You must keep this modal open while you are completing steps 6 through 9 on the Apple Developer Portal.
8. Go to your [Apple Developer Portal](https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757&path=%2Faccount%2Fresources%2Fidentifiers%2Flist%2Fmerchant&rv=1).
9. Select the [Apple Merchant ID](https://developer.apple.com/help/account/capabilities/configure-apple-pay#create-a-merchant-identifier) you'd like to add this certificate to, then click **'Create Certificate'** in the **Apple Pay Payment Processing Certificate** section.
10. When it prompts you to upload a Certificate Signing Request, choose the file you just downloaded in step 5 (step 2 on the modal).
11. Click **Activate** to enable the certificate, then click **Download** to save it to your computer.
![Apple Pay iOS Obtain Certificate](/assets/apple_pay_ios_obtain_certificate.dce7092ee7ad4b60df741d8ba40ca6cc9798a031b3e90bb92a984df7846f5ca4.08ff7529.png)
12. Upload the payment processing certificate from step 9.
![Apple Pay iOS Upload Certificate](/assets/apple_pay_ios_upload_certificate.4a2083654256e556cfc79b5f571ad780d5862a243472ae9df8f1e5f9a427b693.08ff7529.png)


## Step 3: Add Apple Pay Button

Once your app is registered, it’s authorized to accept Apple Pay payments. You can now add an [Apple Pay button](https://developer.apple.com/documentation/passkit/apple_pay/offering_apple_pay_in_your_app#:~:text=Add%20the%20Apple%20Pay%20Button) to your iOS app’s checkout flow to give customers a seamless payment experience.

## Step 4: Make a Payment Request to Apple

When the buyer taps the Apple Pay button, your iOS app creates a payment calling the `startPayment` method of Apple's `PaymentHandler`. Ensure to include the `requiredBillingContactFields`, `name` and `postalAddress` to collect billing information.

For full implementations details, see [Apple's PassKit documentation](https://developer.apple.com/documentation/passkit/apple_pay/offering_apple_pay_in_your_app#:~:text=calling%20the%20startPayment).

Collecting Address
If address is not collected, fees will apply.

When a buyer authorizes a payment, Apple's completion handler reports the **success** or **failure** of the payment. **Successful** payments return a payment token that you need to include in your request to Finix to create a `Payment Instrument`.

## Step 5: Use a Buyer Identity

A buyer identity is required before you can proceed with the next steps. You can either create a new buyer identity through the Finix API, or use an existing one you’ve already created.

Buyer Identity Data
All buyer Identity fields are optional. However, Finix recommends including basic information (name, email, address, and phone) to make payment operations easier.

details
summary
Use an existing buyer
1. Log in to your [Finix Dashboard](https://finix.payments-dashboard.com/Login).
2. In the left sidebar, select **Data Resources** → **Identities**.
3. Search for the buyer identity you want to use.
  - Confirm the Role is **Buyer**.
  - Option to use filters to quickly narrow down results.
4. Copy the Buyer Identity (e.g. `IDjWktr7BPDGhz4amrPJZoXg` )


details
summary
Create a new buyer

```shell Buyer Identity Request
curl -i -X POST \
  -u USfdccsr1Z5iVbXDyYt7hjZZ:313636f3-fac2-45a7-bff7-a334b93e7bda \
  https://finix.sandbox-payments-api.com/identities \
  -H 'Content-Type: application/json' \
  -H 'Finix-Version: 2022-02-01' \
  -d '{
    "entity": {
      "phone": "7145677613",
      "first_name": "John",
      "last_name": "Smith",
      "email": "finix_example@finix.com",
      "personal_address": {
        "city": "San Mateo",
        "country": "USA",
        "region": "CA",
        "line2": "Apartment 7",
        "line1": "741 Douglass St",
        "postal_code": "94114"
      }
    },
    "identity_roles": [
      "BUYER"
    ],
    "tags": {
      "key": "value"
    },
    "type": "PERSONAL"
  }'
```


```json Buyer Identity Response
{
  "id": "IDmkDvJfxZWMEK56FDFtbozo",
  "created_at": "2024-08-09T09:34:36.87Z",
  "updated_at": "2024-08-09T09:34:36.87Z",
  "application": "APgPDQrLD52TYvqazjHJJchM",
  "entity": {
    "ach_max_transaction_amount": 0,
    "amex_mid": null,
    "annual_card_volume": 0,
    "business_address": null,
    "business_name": null,
    "business_phone": null,
    "business_tax_id_provided": false,
    "business_type": null,
    "default_statement_descriptor": null,
    "discover_mid": null,
    "dob": null,
    "doing_business_as": null,
    "email": "finix_example@finix.com",
    "first_name": "John",
    "has_accepted_credit_cards_previously": false,
    "incorporation_date": null,
    "last_name": "Smith",
    "max_transaction_amount": 0,
    "mcc": null,
    "ownership_type": null,
    "personal_address": {
      "line1": "741 Douglass St",
      "line2": "Apartment 7",
      "city": "San Mateo",
      "region": "CA",
      "postal_code": "94114",
      "country": "USA"
    },
    "phone": "7145677613",
    "principal_percentage_ownership": null,
    "short_business_name": null,
    "tax_authority": null,
    "tax_id_provided": false,
    "title": null,
    "url": null
  },
  "identity_roles": [],
  "tags": {
    "key": "value"
  },
  "type": "PERSONAL",
  "_links": {
    "self": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmkDvJfxZWMEK56FDFtbozo"
    },
    "verifications": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmkDvJfxZWMEK56FDFtbozo/verifications"
    },
    "merchants": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmkDvJfxZWMEK56FDFtbozo/merchants"
    },
    "settlements": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmkDvJfxZWMEK56FDFtbozo/settlements"
    },
    "authorizations": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmkDvJfxZWMEK56FDFtbozo/authorizations"
    },
    "transfers": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmkDvJfxZWMEK56FDFtbozo/transfers"
    },
    "payment_instruments": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmkDvJfxZWMEK56FDFtbozo/payment_instruments"
    },
    "associated_identities": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmkDvJfxZWMEK56FDFtbozo/associated_identities"
    },
    "disputes": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmkDvJfxZWMEK56FDFtbozo/disputes"
    },
    "application": {
      "href": "https://finix.sandbox-payments-api.com/applications/APgPDQrLD52TYvqazjHJJchM"
    }
  }
}
```

## Step 6: Create a Payment Instrument with Finix

After creating a payment with Apple, use the payment token that's returned to create a `Payment Instrument` with Finix.

Your app needs to [send the payment token](https://developer.apple.com/documentation/passkit/apple_pay/offering_apple_pay_in_your_app#3846471) and [billing address](https://developer.apple.com/documentation/passkit/pkpayment) (returned from Apple's completion handler) to Finix as the `third_party_token`, `name`, and `address` fields when creating the [`Payment Instrument`](/api/payment-instruments).

Example
API Definition
Example
Payment Instrument - Apple Pay

```json Payment Instrument - Apple Pay
{
  "id": "PIwpqpJZCharsZAt6WKVopPS",
  "created_at": "2025-05-08T18:44:58.56Z",
  "updated_at": "2025-05-08T18:44:58.56Z",
  "application": "APc9vhYcPsRuTSpKD9KpMtPe",
  "created_via": "API",
  "currency": "USD",
  "disabled_code": null,
  "disabled_message": null,
  "enabled": true,
  "fingerprint": "FPR88YBDbK4TqYMUNU8t8fbeQ",
  "identity": "IDmj1yA97RS4rMjiQgvK3Vio",
  "instrument_type": "APPLE_PAY",
  "address": {
    "line1": "900 Metro Center Blv",
    "line2": "APT 200",
    "city": "San Francisco",
    "region": "CA",
    "postal_code": "94404",
    "country": "USA"
  },
  "bin": "370382",
  "brand": "AMERICAN_EXPRESS",
  "card_type": "CREDIT",
  "expiration_month": 11,
  "expiration_year": 2024,
  "issuer_country": "USA",
  "last_four": "8576",
  "name": "John Smith",
  "tags": {},
  "third_party": null,
  "third_party_token": null,
  "type": "APPLE_PAY",
  "_links": {
    "self": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PIwpqpJZCharsZAt6WKVopPS"
    },
    "authorizations": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PIwpqpJZCharsZAt6WKVopPS/authorizations"
    },
    "transfers": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PIwpqpJZCharsZAt6WKVopPS/transfers"
    },
    "verifications": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PIwpqpJZCharsZAt6WKVopPS/verifications"
    },
    "application": {
      "href": "https://finix.sandbox-payments-api.com/applications/APc9vhYcPsRuTSpKD9KpMtPe"
    },
    "identity": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDmj1yA97RS4rMjiQgvK3Vio"
    }
  }
}
```

API Definition
## Step 7: Create a Payment

Similar to other Finix transactions, after the `Payment Instrument` is created, you can use the instrument and create a [`transfer`](/api/transfers) or an [`authorization`](/api/authorizations/createauthorization) to process transactions.

#### Sale

- Set the `source` to your Buyer's Payment Instrument ID
- Set the `merchant` to an `APPROVED` Merchant account
- Set the `amount` in cents



```shell Example Transfer Request
curl https://finix.sandbox-payments-api.com/transfers \
    -H "Content-Type: application/json" \
    -H 'Finix-Version: 2022-02-01' \
    -u  USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
    -d '{
        "merchant": "MUeDVrf2ahuKc9Eg5TeZugvs",
        "currency": "USD",
        "amount": 662154,
        "source": "PImE5ZhGZJNFy14DtX8wX6f6",
    }'
```


```json Example Transfer Response
{
  "id": "TR29av3LN1TAGPbXscsup1tt",
  "amount": 662154,
  "tags": {},
  "state": "SUCCEEDED",
  "trace_id": "34f40e87-2599-414b-874b-f472790ff521",
  "currency": "USD",
  "application": "APgPDQrLD52TYvqazjHJJchM",
  "source": "PImE5ZhGZJNFy14DtX8wX6f6",
  "destination": null,
  "ready_to_settle_at": null,
  "externally_funded": "UNKNOWN",
  "fee": 0,
  "statement_descriptor": "FNX*FINIX FLOWERS",
  "type": "DEBIT",
  "messages": [],
  "raw": null,
  "created_at": "2022-08-25T20:39:37.59Z",
  "updated_at": "2022-08-25T20:39:38.17Z",
  "idempotency_id": null,
  "merchant": "MUeDVrf2ahuKc9Eg5TeZugvs",
  "merchant_identity": "IDpYDM7J9n57q849o9E9yNrG",
  "subtype": "API",
  "failure_code": null,
  "failure_message": null,
  "additional_buyer_charges": null,
  "_links": {
    "application": {
      "href": "https://finix.sandbox-payments-api.com/applications/APgPDQrLD52TYvqazjHJJchM"
    },
    "self": {
      "href": "https://finix.sandbox-payments-api.com/transfers/TR29av3LN1TAGPbXscsup1tt"
    },
    "merchant_identity": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDuqZpDw28f2KK6YuDk4jNLg"
    },
    "payment_instruments": {
      "href": "https://finix.sandbox-payments-api.com/transfers/TR29av3LN1TAGPbXscsup1tt/payment_instruments"
    },
    "reversals": {
      "href": "https://finix.sandbox-payments-api.com/transfers/TR29av3LN1TAGPbXscsup1tt/reversals"
    },
    "fees": {
      "href": "https://finix.sandbox-payments-api.com/transfers/TR29av3LN1TAGPbXscsup1tt/fees"
    },
    "disputes": {
      "href": "https://finix.sandbox-payments-api.com/transfers/TR29av3LN1TAGPbXscsup1tt/disputes"
    },
    "source": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PIe2YvpcjvoVJ6PzoRPBK137"
    },
    "fee_profile": {
      "href": "https://finix.sandbox-payments-api.com/fee_profiles/FPvCQUcnsueN3Bc3zR1qCBG8"
    }
  }
}
```

#### Authorization

You can create an Authorization and capture it later using two separate API calls. This approach is useful if you need to first verify the payment details and then capture a specific amount at a later time. For more details, see [Creating and Capturing an Authorization](/guides/online-payments/payment-features/auth-and-captures).