Prerequisites: Authentication
Mobile Sync is a Payroc app that merchants use to take payments on an iPhone. You can integrate your own point-of-sale (POS) app with Mobile Sync to take Tap to Pay on iPhone payments. Your app starts the sale, and then switches to Mobile Sync to collect the payment. Mobile Sync reads the card, so your app never handles the card details.
To help with your integration, we provide you with an App Switch Kit that your app uses to work with Mobile Sync.
How it works
The following diagram describes how your app, Mobile Sync, and our gateway work together to run a sale.
Mermaid source
sequenceDiagram
participant YA as Your app
participant MS as Mobile Sync
participant GW as Gateway
rect rgba(0, 81, 194, 0.4)
Note over YA,GW: Start the sale
YA->>MS: 1. Open Mobile Sync
MS->>GW: 2. Connect to our gateway
MS-->>YA: 3. Signal that Mobile Sync is ready
YA->>GW: 4. Send an instruction
GW->>MS: 5. Pass the instruction to Mobile Sync
end
rect rgba(0, 224, 184, 0.3)
Note over YA,GW: Run the sale
Note over MS: 6. Read the customer's card
MS->>GW: 7. Send the sale details and the card details
MS-->>YA: 8. Open your app when the sale finishes
end
rect rgba(0, 81, 194, 0.4)
Note over YA,GW: Get the sale result
YA->>GW: 9. Check for the sale result
GW-->>YA: 10. Return the sale result
end
- Your app opens Mobile Sync.
- Mobile Sync connects to our gateway.
- Mobile Sync signals to your app that it's ready.
- Your app sends an instruction to our gateway.
- Our gateway passes the instruction to Mobile Sync.
- Mobile Sync reads the customer's card.
- Mobile Sync sends the sale details and the card details to our gateway.
- Mobile Sync opens your app again when the sale finishes.
- Your app checks our gateway for the details of the sale.
- Our gateway returns the details of the sale to your app.
App Switch Kit
Use our App Switch Kit to integrate your app with Mobile Sync. With the App Switch Kit, you can use your app to:
- Run a sale.
- Cancel a sale.
- Add a tax or a tip to a sale.
- Capture a customer's signature.
The App Switch Kit is a Swift package with three products:
| Product | Description |
|---|---|
AppSwitchContract | The URL formats and signals that Mobile Sync expects. |
AppSwitchOrchestration | The switch order, the background task, and the pairing. |
AppSwitchGatewayReference | A gateway client that builds requests and parses receipts. You can replace it with your own gateway client. |
Before you begin
Make sure that you have the following:
- Your processing terminal ID. We sent you this when you signed up with us.
- Your Payroc API key. Your app uses it to send requests to our gateway. We sent you this when you signed up with us.
- Your Mobile Sync API key. You use it to set up Mobile Sync. For more information, go to Install the Mobile Sync UAT app.
- An Apple Developer account that you can use to sign your app. You don't need the Tap to Pay on iPhone entitlement, because Mobile Sync reads the card.
- Xcode 26 or later, and an app that targets iOS 18.6 or later. If you work in a different IDE, your steps might differ.
- A physical iPhone with Mobile Sync installed. You can't run Mobile Sync in the iOS Simulator.
Security
Your app never handles sensitive card data because Mobile Sync reads the card. However, we recommend that you follow these rules to keep your integration secure:
- Always get the result of the sale from our gateway. Treat the URL that Mobile Sync opens as untrusted. The URL opens your app and does nothing else.
- Never log a payment or a receipt, because they can contain card data.
- Never include your processing terminal ID and Payroc API key in your app code. Load them at runtime from a secure source that you control.
- Keep your Mobile Sync API key secret. Your app doesn't need it to run a sale.
Your integration journey
- Connect your app to Mobile Sync - Download the App Switch Kit, add it to your project, and pair your app with Mobile Sync.
- Run a sale - Switch to Mobile Sync, send a sale instruction to our gateway, and show the result.
- Cancel a sale - Cancel a sale that you started in your app.
- Handle errors - Show the merchant a clear message when an app switch fails.
- Submit your app to the App Store - Prepare your app for App Review.
To check how you integrate with each feature, you can use the sample app that we provide.
Extend your integration
After you set up your app to run a sale, you can extend your integration with additional features:
For more information about how to add these features to your integration, go to Extend your integration.