Developers Guides NFC Tag Reading

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.

In-Store API NFC RFID Terminal

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

  1. Create a session — Start a reading session on a terminal, choosing single-tag or multi-tag mode.
  2. Read tags — The terminal scans NFC tags as products are presented.
  3. Retrieve results — Fetch scanned tags or poll the session status.
  4. 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"
}
ParameterTypeRequiredDescription
modestringYesNumber 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"
}
ParameterTypeDescription
statusstringSUCCESS or ERROR.
data.sessionIdstringUnique identifier for the NFC reading session. Use this ID in all subsequent session calls.
messagestringHuman-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"
}
ParameterTypeDescription
statusstringSUCCESS or ERROR.
data.sessionStatusstringCurrent session state. Possible values: PENDING, COMPLETED, CANCELLED, TIMED_OUT, NOT_FOUND.
data.nfcTagsarrayList of NFC tag values read so far (Base64-encoded RFID data).
messagestringHuman-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"
}
ParameterTypeDescription
data.sessionIdstringUnique identifier for the reading session.
data.actionstringStage of the session lifecycle. Possible values: start, end.
data.modestringTag 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"
}
ParameterTypeDescription
data.sessionIdstringSession the tag was read under.
data.tagIdstringUnique 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"
}
ParameterTypeRequiredDescription
resultstringNoFinal 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

  1. Call POST /terminals/{terminalId}/sessions with mode: "multiple" to start scanning.
  2. Present tagged products to the terminal.
  3. Poll GET .../sessions/{sessionId}/status until sessionStatus is no longer PENDING.
  4. Call GET .../sessions/{sessionId}/tags to get all scanned tag IDs.
  5. Map tag IDs to products in your inventory system.
  6. Call POST .../sessions/{sessionId}/complete to close the session.
  7. Create the order using the mapped product data.

API Quick Reference

OperationMethodEndpoint
Create reading sessionPOST/terminals/{terminalId}/sessions
Fetch session statusGET/terminals/{terminalId}/sessions/{sessionId}/status
List sessions for terminalGET/terminals/{terminalId}/sessions
Retrieve scanned tagsGET/terminals/{terminalId}/sessions/{sessionId}/tags
Complete sessionPOST/terminals/{terminalId}/sessions/{sessionId}/complete

Other Guides

in-store

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.

in-store

Android SoftPOS SDK

Turn Android devices into payment terminals with the Surfboard Android SoftPOS SDK. Complete integration guide from setup to production.

in-store

EMV Terminal Integration

Integrate traditional card-present terminals through Surfboard's unified API. From account setup to live payments in one guide.

online

Payment Page

Redirect customers to a Surfboard-hosted checkout page. The fastest way to accept online payments with minimal integration effort.

in-store

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.

online

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.

online

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.

online

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.

online

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.

online

Payment Lifecycle

Manage the full payment lifecycle from order creation through capture, void, cancel, and refund operations using the Surfboard Payments API.

online

Capture a Payment

Finalize a previously authorized payment by capturing funds. Covers delay capture and pre-authorization flows with step-by-step API examples.

in-store

Terminal & Device Management

Manage payment terminals and devices via the Surfboard API. Register in-store and online terminals, configure settings, and handle device operations.

online

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.

online

Webhooks & Notifications

Receive real-time event notifications via webhooks, email, Slack, and SFTP. Subscribe to payment events and settlement reports for merchants and partners.

online

Recurring Payments

Implement subscription billing and recurring charges using tokenization, recurring payment configuration, and Merchant Initiated Transactions.

online

Void a Payment

Reverse a completed payment before settlement. Voiding stops funds from transferring to the merchant's account, avoiding incorrect transactions.

in-store

Receipts

Generate, email, print, and customise receipts for in-store transactions using the Surfboard Receipts API.

online

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.

online

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.

in-store

Tips Configuration

Configure tipping on Surfboard payment terminals at the merchant, store, or terminal level using a hierarchical override model.

online

Partial Payments

Split an order across multiple payment methods or transactions. Accept card, cash, and Swish in any combination to settle a single order.

in-store

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.

online

Store Management

Create, update, verify, and manage in-store and online stores using the Surfboard Payments Store APIs.

online

Gift Cards & Promotions

Issue and manage gift cards, track transactions, and create marketing promotions using the Surfboard Payments APIs.

online

Product Catalog

Create and manage product catalogs, products, variants, inventory levels, and analytics through the Catalog API.

online

Settlements & Reporting

Retrieve settlement reports, view adjustments, manage merchant charges, and register customer profiles for reconciliation and billing.

online

Account & Service Provider Management

Create merchant and partner accounts, manage user roles, register service providers, and configure external notifications via the Surfboard API.

online

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.

online

Client Auth Tokens

Generate client-side authentication tokens for secure API access from browsers and mobile apps without exposing your API key or secret.

online

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.