System Requirements
| iOS | iOS 16.4 or later |
| Xcode | Xcode 16.3 or later |
| Supported Devices | iPhone, iPad, PAX D135 (Bluetooth card reader) |
| Apple Tap to Pay | iPhone XS or later (not supported on iPad) |
How To Start
- Sign up for a free North Developer account.
- Contact us for credentials. Once credentials are provisioned, you can use the Integration Tracker to view the status of your integration, notes from meetings with Integration Engineers, resources related to your solution, and more.
- Download the Gateway iOS SDK framework from the Resources page and follow the integration steps below.
- When development is complete, contact us to certify your integration.
Setting up the Gateway iOS SDK
Step 1: Add the GatewaySDK Framework
-
Create a new folder called
Librariesin your Xcode project's root directory usingFile>New>Folder. -
Drag the
GatewaySDK.xcframeworkfile from the downloaded files into your project'sLibrariesfolder. Be sure to select "Copy items if needed" before clicking Finish. -
Go to your target's Build Settings to make sure that the
GatewaySDK.xcframeworkis under the Frameworks, Libraries and Embedded Content section. If not, click the "+" icon and add it manually.
Note: You should also see the framework in the Link Binary With Libraries section under Build Settings.
Step 2: Configure Apple Tap to Pay Entitlements (optional)
To use Apple Tap to Pay on iPhone, follow the instructions in the Apple developer documentation . Once you have received the Tap to Pay Entitlement from Apple, you will need to configure the necessary entitlements:
-
Add the Tap to Pay on iPhone capability to your App ID Configuration on Apple's Developer portal.
-
Create a Proximity Reader entitlement plist in your app's project with the following entry:
| Key | Type | Value |
|---|---|---|
com.apple.developer.proximity-reader.payment.acceptance | Boolean | YES |
Important
- Tap to Pay on iPhone is only available on iPhone XS or later. It is not supported on iPad devices.
- A passcode must be enabled on the iPhone to use Tap to Pay.
- Developers must request an entitlement for their Apple Developer account to use Tap to Pay on iPhone.
- The Tap to Pay screen expires after 40 seconds from when the app shows the screen to prompt customers to hold their payment card near the reader. In the case of a timeout, a Payment Timeout alert appears at the bottom of the screen. The customer can tap Try Again to reactivate the reader.
- There is a 60-second time limit for transporting the payment data to the server for processing. After this time the encrypted payload expires and cannot be used.
- Provisioning a Tap to Pay terminal profile will only work on iOS versions within 1 year of the release date of each version.
Step 3: Connect a PAX D135 Bluetooth Card Reader (optional)
To use a PAX D135 Bluetooth card reader, display the connection assistant:
The SDK will guide the user through discovering, pairing, and updating the card reader firmware if needed.
Adding the Gateway SDK
Step 1: Authenticate with North
Import the SDK and authenticate before processing transactions. You can use either the Async/Await API or the Combine API.
Parameters
| environment | .sandbox .production |
| developerKey | Developer key string |
| mid | Merchant ID string |
| password | Password string |
Swift (Async/Await)
Swift (Combine)
Step 2: Enroll in Tap to Pay (optional)
This function displays a view to assist in enrolling for Tap to Pay on iPhone. This function configures the integrated proximity reader for use.
Parameters
| presenter | UIViewController that will present the enrollment view |
| completionHandler | Handler |
Step 3: Submit a Payment
Once authenticated, you can submit payment requests.
This function displays a checkout view ready to accept contactless or keyed credit card input, or cash payment.
Parameters
| intent | PayanywherePaymentIntent contains payment-related attributes such as subtotalAmount, taxAmount |
| presenter | UIViewController that will present the enrollment view |
Swift (Async/Await)
Swift (Combine)
Payment Intent Options
The PayanywherePaymentIntent class supports the following properties:
| Property | Type | Description |
|---|---|---|
| subtotalAmount | Double | The subtotal amount for the payment, excluding tax |
| taxAmount | Double | Tax amount |
| isTaxable | Bool | Flag for whether this payment is taxable |
| invoiceNumber | String? | Custom invoice number |
| transactionType | PayanywhereTransactionType | Type of transaction Enumeration Cases: case authorization |
| method | PayanywherePaymentMethodIntent | Method to use for this payment Enumeration Cases: case anySupported |
| amountToRefundOrComplete | OptionalDouble | Amount to be refunded or completed |
Pre-Authorization
Process a pre-authorization to hold funds on a card without capturing:
Capture a Pre-Authorization:
Processing Refunds and Voids
The SDK supports refunding and voiding transactions:
Credit Card Refund
Cash Refund
Credit Card Void
Transaction Management
Find Transactions
Search for transactions using a query string:
Get Transaction Details
Retrieve full details for a specific transaction:
Show Transaction List
Display the built-in transaction list UI:
Offline Transactions
The SDK supports offline transaction processing when network connectivity is unavailable. Offline transactions are stored securely and processed when connectivity is restored.
Check Offline Transaction Count
Process Offline Transactions
When connectivity is restored, process all pending offline transactions:
Settings
Get Current Settings
Update Settings
Show Settings UI
Display the built-in settings screen:
Theme Customization
Customize the SDK's UI appearance to match your app's branding:
Support
For further assistance with your integration, please contact our support team or visit the Resources page for additional documentation and sample code.