NFC Tag Reading
Use the NFC Reading API to create tag-reading sessions on payment terminals, scan NFC/RFID-tagged products, and retrieve scanned tag data.
Overview
The NFC Reading API enables payment terminals to read NFC (RFID) tags attached to physical products. Instead of manually scanning barcodes or keying in item codes, store staff can place tagged items near the terminal and let the reader capture product identifiers automatically. This is useful for retail scenarios involving apparel, electronics, or high-value goods with embedded NFC tags.
How It Works
- Create a session — Start a reading session on a terminal, choosing single-tag or multi-tag mode.
- Read tags — The terminal scans NFC tags as products are presented.
- Retrieve results — Fetch scanned tags or poll the session status.
- Complete the session — Close the session when all items have been scanned.
You can also tie NFC reading into the order creation flow by including readTags in your order request (covered below).
Creating a Read Session
Start an NFC reading session on a terminal by specifying the scanning mode.
POST /terminals/{terminalId}/sessions
Request:
{
"mode": "single"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | Number of tags the session can read. Possible values: single (one tag only) or multiple (continuous reading until completed). |
Response:
{
"status": "SUCCESS",
"data": {
"sessionId": "ses_a1b2c3d4e5"
},
"message": "Session created successfully"
}
| Parameter | Type | Description |
|---|---|---|
status | string | SUCCESS or ERROR. |
data.sessionId | string | Unique identifier for the NFC reading session. Use this ID in all subsequent session calls. |
message | string | Human-readable description of the result. |
Use single mode when scanning one product at a time (e.g., verifying a single item). Use multiple mode for basket-scanning workflows where several tagged items need to be captured in one session.
Fetching Session Status
Check the current state of an NFC reading session to determine whether it is still active, has timed out, or has been completed.
GET /terminals/{terminalId}/sessions/{sessionId}/status
Response:
{
"status": "SUCCESS",
"data": {
"sessionStatus": "PENDING",
"nfcTags": ["dGFnLWRhdGEtYmFzZTY0"]
},
"message": "Session status retrieved successfully"
}
| Parameter | Type | Description |
|---|---|---|
status | string | SUCCESS or ERROR. |
data.sessionStatus | string | Current session state. Possible values: PENDING, COMPLETED, CANCELLED, TIMED_OUT, NOT_FOUND. |
data.nfcTags | array | List of NFC tag values read so far (Base64-encoded RFID data). |
message | string | Human-readable description of the result. |
You can poll this endpoint to build real-time UI updates showing scan progress. The possible sessionStatus values are: PENDING (terminal still listening), COMPLETED (explicitly closed), CANCELLED (cancelled early), TIMED_OUT (expired), and NOT_FOUND (invalid session ID).
Listing Sessions for a Terminal
Retrieve all NFC reading sessions that have been created on a specific terminal. This is useful for auditing or reviewing past scanning activity.
GET /terminals/{terminalId}/sessions
Response:
{
"status": "SUCCESS",
"data": [
{
"sessionId": "ses_a1b2c3d4e5",
"action": "start",
"mode": "multiple"
},
{
"sessionId": "ses_f6g7h8i9j0",
"action": "end",
"mode": "single"
}
],
"message": "Sessions retrieved successfully"
}
| Parameter | Type | Description |
|---|---|---|
data.sessionId | string | Unique identifier for the reading session. |
data.action | string | Stage of the session lifecycle. Possible values: start, end. |
data.mode | string | Tag reading mode used. Possible values: single, multiple. |
Retrieving Scanned Tags
Fetch all NFC tags that were read during a specific session. Each tag entry includes the session it belongs to and a unique tag identifier.
GET /terminals/{terminalId}/sessions/{sessionId}/tags
Response:
{
"status": "SUCCESS",
"data": [
{
"sessionId": "ses_a1b2c3d4e5",
"tagId": "tag_nike_shoe_001"
},
{
"sessionId": "ses_a1b2c3d4e5",
"tagId": "tag_nike_shoe_002"
}
],
"message": "Tags retrieved successfully"
}
| Parameter | Type | Description |
|---|---|---|
data.sessionId | string | Session the tag was read under. |
data.tagId | string | Unique identifier of the scanned NFC tag. |
Use these tag IDs to look up product information in your inventory system and build the order accordingly.
Completing a Session
When all items have been scanned, explicitly complete the session to stop the terminal from listening for additional tags.
POST /terminals/{terminalId}/sessions/{sessionId}/complete
Request:
{
"result": "COMPLETED"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
result | string | No | Final state of the session. Defaults to COMPLETED if omitted. |
Response:
{
"status": "SUCCESS",
"message": "Session completed successfully"
}
Always complete sessions when scanning is finished. Uncompleted sessions eventually time out, but explicit completion frees the terminal for new sessions immediately.
Combining NFC Reading with Orders
You can integrate NFC tag reading directly into the order creation flow by adding readTags to the controlFunctions object in your order request. This tells the terminal to perform an NFC read as part of processing the order.
POST /orders
Include the readTags control function alongside your standard order payload:
{
"terminal$id": "83abab731f6fb00704",
"orderLines": [
{
"id": "0000CHI01",
"name": "Nike Shoes",
"quantity": 1,
"amount": {
"regular": 500,
"total": 500,
"currency": "752"
}
}
],
"totalOrderAmount": {
"regular": 500,
"total": 500,
"currency": "752"
},
"controlFunctions": {
"readTags": "SINGLE",
"initiatePaymentsOptions": {
"paymentMethod": "CASH"
}
}
}
The readTags field accepts SINGLE or MULTIPLE, matching the session mode behaviour. The terminal reads tags before or during payment processing, associating scanned items with the order. The response returns the orderId, paymentId, and an interAppJWT for inter-app communication.
Typical Integration Flow
- Call
POST /terminals/{terminalId}/sessionswithmode: "multiple"to start scanning. - Present tagged products to the terminal.
- Poll
GET .../sessions/{sessionId}/statusuntilsessionStatusis no longerPENDING. - Call
GET .../sessions/{sessionId}/tagsto get all scanned tag IDs. - Map tag IDs to products in your inventory system.
- Call
POST .../sessions/{sessionId}/completeto close the session. - Create the order using the mapped product data.
API Quick Reference
| Operation | Method | Endpoint |
|---|---|---|
| Create reading session | POST | /terminals/{terminalId}/sessions |
| Fetch session status | GET | /terminals/{terminalId}/sessions/{sessionId}/status |
| List sessions for terminal | GET | /terminals/{terminalId}/sessions |
| Retrieve scanned tags | GET | /terminals/{terminalId}/sessions/{sessionId}/tags |
| Complete session | POST | /terminals/{terminalId}/sessions/{sessionId}/complete |
Other Guides
Tap to Pay on iPhone SDK
Accept contactless payments directly on iPhone. Complete integration guide for Surfboard's iOS SoftPOS SDK -- from setup to production.
Android SoftPOS SDK
Turn Android devices into payment terminals with the Surfboard Android SoftPOS SDK. Complete integration guide from setup to production.
EMV Terminal Integration
Integrate traditional card-present terminals through Surfboard's unified API. From account setup to live payments in one guide.
Payment Page
Redirect customers to a Surfboard-hosted checkout page. The fastest way to accept online payments with minimal integration effort.
Inter-App Integration
Integrate your POS app with CheckoutX using native app switch. Register terminals, process payments, and scan NFC tags through a bi-directional deep link flow.
Self-Hosted Checkout
Embed a payment form directly in your web app with the Surfboard Online SDK. Full UI control with Surfboard handling PCI compliance.
Server-to-Server API
Process online payments entirely from your backend with Merchant Initiated Transactions. Full control over recurring payments, subscriptions, and tokenized card flows.
Create an Order
Learn how to create orders with line items, tax, customer details, and control functions. The starting point for accepting payments with the Surfboard API.
Merchant Onboarding
Set up merchants and stores on the Surfboard platform. Walk through the full onboarding flow from merchant creation to KYB completion and store setup.
Payment Lifecycle
Manage the full payment lifecycle from order creation through capture, void, cancel, and refund operations using the Surfboard Payments API.
Capture a Payment
Finalize a previously authorized payment by capturing funds. Covers delay capture and pre-authorization flows with step-by-step API examples.
Terminal & Device Management
Manage payment terminals and devices via the Surfboard API. Register in-store and online terminals, configure settings, and handle device operations.
Cancel a Payment
Stop an in-progress payment before it completes. Use cancellation when a customer abandons checkout or a payment needs to be halted mid-process.
Webhooks & Notifications
Receive real-time event notifications via webhooks, email, Slack, and SFTP. Subscribe to payment events and settlement reports for merchants and partners.
Recurring Payments
Implement subscription billing and recurring charges using tokenization, recurring payment configuration, and Merchant Initiated Transactions.
Void a Payment
Reverse a completed payment before settlement. Voiding stops funds from transferring to the merchant's account, avoiding incorrect transactions.
Receipts
Generate, email, print, and customise receipts for in-store transactions using the Surfboard Receipts API.
Refund an Order
Process a full refund by creating a return order with negative quantities. Covers the complete refund flow with API examples and payment method requirements.
Partial Refund
Refund specific items or a reduced amount from a completed order. Process partial returns by creating a return order with only the items to be refunded.
Tips Configuration
Configure tipping on Surfboard payment terminals at the merchant, store, or terminal level using a hierarchical override model.
Partial Payments
Split an order across multiple payment methods or transactions. Accept card, cash, and Swish in any combination to settle a single order.
Multi-Merchant Terminals
Set up shared payment terminals for multiple merchants using the Multi-Merchant Group API. Ideal for food courts, events, and co-located businesses.
Store Management
Create, update, verify, and manage in-store and online stores using the Surfboard Payments Store APIs.
Gift Cards & Promotions
Issue and manage gift cards, track transactions, and create marketing promotions using the Surfboard Payments APIs.
Product Catalog
Create and manage product catalogs, products, variants, inventory levels, and analytics through the Catalog API.
Settlements & Reporting
Retrieve settlement reports, view adjustments, manage merchant charges, and register customer profiles for reconciliation and billing.
Account & Service Provider Management
Create merchant and partner accounts, manage user roles, register service providers, and configure external notifications via the Surfboard API.
Payment Methods
Activate, deactivate, and list payment methods for a merchant. Manage card, Swish, Klarna, AMEX, Vipps, MobilePay, and more via the API or Partner Portal.
Client Auth Tokens
Generate client-side authentication tokens for secure API access from browsers and mobile apps without exposing your API key or secret.
Partner Branding
Configure white-label branding for terminals and payment pages. Set colors, fonts, logos, and cover images at the partner level via API or Partner Portal.
Ready to get started?
Create a sandbox account and start building your integration today.