Prerequisites: Authentication
Use our Tap to Pay on iPhone SDK to create an iOS app that accepts card-present payments directly on an iPhone. The SDK uses the iPhone's NFC reader and Apple's ProximityReader framework to securely read a customer's card details and send them directly to our gateway. Your app doesn't handle any sensitive card details.
The SDK supports sales and referenced refunds, and accepts contactless credit and debit cards, Apple Pay, and other digital wallets that use NFC.
How it works
When a customer taps their card or device against the merchant's iPhone, our SDK communicates with the iPhone's contactless reader and our gateway to make the sale.
Mermaid source
sequenceDiagram
participant YA as Your app
participant SD as SDK
participant IP as iPhone
participant GW as Gateway
rect rgba(0, 81, 194, 0.4)
Note over YA,GW: Run a sale
YA->>SD: 1. Initialize the SDK
Note over YA: 2. Merchant starts a sale in your app
YA->>SD: 3. Send the sale details
SD->>IP: 4. Prompt the customer to tap their card
IP-->>SD: 5. Return the card details
SD->>GW: 6. Send the sale details and the card details
GW-->>YA: 7. Return the sale response
end
- Your app initializes the SDK.
- The merchant starts a sale in your app, for example, the merchant enters an amount and taps Charge.
- Your app calls the SDK with the sale details.
- The iPhone prompts the customer to tap their card.
- The iPhone reads the card and returns the card details to the SDK.
- The SDK sends the sale details and the card details to our gateway to run the sale.
- Our gateway authorizes the transaction and returns the sale response to your app.
Before you begin
Our guides use Xcode as your integrated development environment (IDE). If you work in a different IDE, your steps might differ.
Make sure that you have the following:
- Your processing terminal ID. We send you the terminal ID when you sign up with us.
- Your integration API key. We send you the API key when you sign up with us.
- An Apple Developer account that is enrolled in the Apple Developer Program.
- The Tap to Pay on iPhone entitlement for your Apple Developer account. To distribute your app through the App Store, you also need to request a distribution entitlement.
- A dedicated Apple Pay sandbox account to connect to Apple's certification environment for testing.
- A physical device. You can't run the SDK on an iOS simulator.
Supported devices and iOS versions
The SDK supports iPhone XS and later models that run iOS 18 or later.
For the full list of supported iOS versions, go to Apple's Business Register documentation.
Your integration journey
- Set up the SDK - Add the SDK to your Xcode project and configure your build settings.
- Configure the processing terminal - Initialize the terminal and load the merchant's payment settings from our gateway.
- Run a sale - Register your listeners, initialize the reader, and process a sale.
- Handle errors - Handle transaction, communication, and device errors.
Extend your integration
After you set up your app to run a sale, you can extend your integration with additional features, for example:
- Run refunds.
- Retrieve transactions.
- Add tips, taxes, and line items to a sale.
- Handle surcharges.
For more information about how to add these features to your integration, go to Extend your integration.