Skip to content

POS / Terminal Integration

Flute's terminal integration connects your POS application to a Flute terminal for in-person card payments. Your POS application sends transaction requests to the Flute API, which routes them to the terminal for card interaction (tap, insert, swipe). The terminal reads the card data and sends it to Flute, which submits the payment to the card processor.

Integration Overview

A POS transaction passes between the POS application, the Flute API, and a Flute terminal.

The POS application never communicates with the terminal directly. Flute relays the transaction to the terminal and processes the payment. The POS application then retrieves the result from the API. The following steps and diagram show this flow.

  1. Your POS application creates a transaction through the API, specifying the terminal and amount.
  2. Flute sends the transaction to the terminal.
  3. The terminal prompts the customer to present their card.
  4. The terminal reads the card data and sends it to Flute.
  5. Flute submits the payment to the card processor and stores the result.
  6. Your POS application retrieves the result by polling the API.
Flute TerminalFlute APIPOS ApplicationFlute TerminalFlute APIPOS ApplicationPOST /v2/pos/transactionsSends transaction to terminalCustomer presents cardSends card dataSubmits to card processorGET /v2/pos/transactions/{posTransactionId} (poll)Transaction result
Flute TerminalFlute APIPOS ApplicationFlute TerminalFlute APIPOS ApplicationPOST /v2/pos/transactionsSends transaction to terminalCustomer presents cardSends card dataSubmits to card processorGET /v2/pos/transactions/{posTransactionId} (poll)Transaction result

Building with Flute Terminals

All API requests use the following base URLs.

EnvironmentBase URLEnvironment Use
Sandboxhttps://sandbox.api.flute.comEnvironment used for development and testing
Productionhttps://api.flute.comEnvironment used for to go live.

Terminals

Before processing transactions, you need to know which terminals are available.

List Terminals

To list the available terminals, use:
GET /v2/terminals

This returns a paginated list of terminals assigned to your merchant account.

ParameterTypeDescription
pageIndexinteger
int32
Indicates the page number.
pageSizeinteger
int32
Indicates items per page.
sortBystringIndicates the field name to sort by.
sortOrderstringIndicates the sort order, asc or desc.
terminalStatusstringFilters by availability status: Ready, Busy, or Offline.
terminalModestringFilters by operating mode: Standalone or SemiIntegrated.
connectionStatusstringFilters by line status: Online or Offline.
serialNumberstringIndicates results from the serial number.
searchstringIndicates results from the search by terminal name or serial number.

Each terminal in the response includes:

FieldDescription
terminalIdIndicates the terminal identifier. Use this when creating transactions.
merchantIdIndicates the merchant that owns the terminal.
merchantCompanyNameIndicates the merchant's company name.
serialNumberIndicates the terminal's hardware serial number.
terminalManufacturerIndicates the manufacturer name, such as Sunmi, Verifone.
terminalModelIndicates the model name, such as P2, P3H, Victa Mobile.
terminalModeIndicates the operating mode, such as Standalone or SemiIntegrated.
terminalStatusIndicates the availability status, such as Ready, Busy, or Offline.
connectionStatusIndicates the current connection state, such as Online or Offline.
lastSeenOnIndicates when the terminal was last seen online.

Get Terminal Status

To display the status of a specified terminal, use:
GET /v2/terminals/{terminalId}/status

This returns detailed real-time status for that terminal.

FieldDescription
terminalStatusReady (accepts transactions), Busy (currently processing), or Offline.
connectionStatusOnline or Offline.
connectionTypeWiFi, Mobile, or Ethernet.
wifiConnectionStrengthWiFi signal strength percentage (0–100).
mobileConnectionStrengthMobile signal strength percentage (0–100).
batteryLevelBattery percentage (0–100).
printerStatusOne of Normal, NotNormal, or NotSupported.
debitPinKeyInjected or Missing.
lastSeenOnWhen the terminal was last seen online.

Before sending a transaction, check that the terminal is Ready, from terminalStatus.

Using POS Transactions

The following are individual steps or endpoints used in the POS transaction workflow. These topics are available:

Starting a POS Transaction

To start a new POS transaction, use:
POST /v2/pos/transactions

Example — Sale transaction:

The following is an example request.

curl -X POST 'https://sandbox.api.flute.com/v2/pos/transactions' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "terminalId": "d4e5f6a7-b8c9-0123-4567-89abcdef0123",
    "captureMethod": "Auto",
    "baseAmount": 25.99,
    "currencyCode": "USD",
    "posDeviceId": "POS-REGISTER-01",
    "referenceId": "ORDER-4521",
    "waitForAcceptanceByTerminal": false
  }'

This table lists the request fields.

FieldTypeRequiredDescription
terminalIdstring
UUID
YesSpecifies the terminal that will process the transaction.
posDeviceIdstringYesSpecifies your POS application's device identifier. Maximum of 36 characters.
baseAmountdecimalYesSpecifies the transaction amount (in USD).
currencyCodestringYesSpecifies the currency code. Always set to USD.
captureMethodstringNoSpecifies Auto (authorizes and captures in one step) or Manual (authorizes only, pending a later capture). The default is Auto.
pricingTypestringConditionalSpecifies Card or Cash.

This is required when the merchant's zero-cost processing option is Dual Pricing.
extraAmounts.tipAmountdecimalNoSpecifies a fixed tip amount (in USD) to include with the transaction.

Cannot be combined with extraAmounts.tipRate.
extraAmounts.tipRatedecimalNoSpecifies a tip as a percentage of the base amount.

Cannot be combined with extraAmounts.tipAmount.
referenceIdstringNoSpecifies your external reference identifier for this transaction. Maximum of 36 characters.
customerIdstring
UUID
NoSpecifies the associated transaction with a stored customer.
readingMethodstringNoSpecifies Regular (tap, insert, or swipe) or KeyedEntry (manual entry). The default is Regular.
waitForAcceptanceByTerminalbooleanNoSpecifies waiting for the terminal. See the table below. The default is false.
requestPaymentMethodStorageConsentbooleanNoSpecifies displaying a prompt to save the payment method. See the table below. The default is false.
paymentProcessorIdstring
UUID
NoSpecifies the payment processor to use for this transaction.

If omitted, the merchant's default processor is used.
initiationChannelstringNoSpecifies Cloud (pushed to the terminal over Flute's cloud connection) or Deeplink (a local, on-device handoff). The default is Cloud.

waitForAcceptanceByTerminal

Valid values are:

ValueDescription
trueThe transaction uses long poll until the terminal accepts.
falseThe transaction returns immediately.

requestPaymentMethodStorageConsent

Valid values are:

ValueDescription
trueDisplays a prompt on the terminal asking the customer to consent to saving their payment method.
falseDoes not display a prompt.

Response:

The following is an example response.

{
  "posTransactionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "posTransactionStatus": "InProgress"
}

Transaction Types

The v2 POS endpoints no longer use a numeric transactionTypeId. Instead, each action uses its own endpoint or field, as shown in the following table.

v1 Typev2 Equivalent
AuthorizationPOST /v2/pos/transactions, with captureMethod: Manual.
SalePOST /v2/pos/transactions, with captureMethod: Auto.
CapturePOST /v2/transactions/{transactionId}/capture, using the transactionId from the linked transaction.
VoidPOST /v2/pos/transactions/reversal, with originalTransactionId and no reversalAmount. The gateway resolves void vs. refund automatically.
RefundPOST /v2/pos/transactions/reversal, with originalTransactionId and an optional reversalAmount for a partial refund.
Tip AdjustmentPOST /v2/transactions/{transactionId}/tip-adjustment, using the transactionId from the linked transaction.

Payment Method Storage

When requestPaymentMethodStorageConsent is set to true, the terminal displays a consent prompt after the transaction is approved. This asks the customer if they want to save their payment method for future use (such as one-off payments, future orders, or recurring charges).

If the customer consents, the card is tokenized and saved as a payment method. If the customer declines, the transaction is unaffected and no payment method is stored.

POS terminal save card flow
The terminal prompts the customer to save their card after approval. The success screen confirms the card has been saved.

The behavior depends on whether a customerId is included in the request:

  • With a customerId: The card is saved to that customer record. If the card is already on file for the customer, the terminal skips the prompt automatically. Retrieve the saved method after the transaction completes using GET /v2/customers/{customerId} or GET /v2/payment-methods?customerId={customerId}.
  • Without a customerId: The card is saved as a standalone payment method token, not linked to any customer record. This is useful when the ISV manages customer identity independently and wants to retain the token for future charges. Retrieve the paymentMethodId from cardDetails by calling GET /v2/transactions/{transactionId} after the transaction completes.

Retrieving POS Transactions

To retrieve POS transactions, use:
GET /v2/pos/transactions

Specified terminals may be listed by filtering with the terminalId.

ParameterTypeDescription
pageIndexinteger
int32
Page number.
pageSizeinteger
int32
Items per page.
terminalIdstring
UUID
Filter transactions by terminal.
sortBystringField name to sort by. Valid values: createdOn, posTransactionStatus.
sortOrderstringSort order, asc or desc.
fromDatestring
date
Filter to transactions on or after this date.
toDatestring
date
Filter to transactions on or before this date.
posTransactionStatusstringFilter by status: InProgress, Completed, Cancelled, or Failed.

This returns a paginated list of POS transactions.

Retrieving a Specified POS Transaction

To retrieve a specified POS transaction, use:
GET /v2/pos/transactions/{posTransactionId}

The following are the input parameters.

ParameterTypeDescription
posTransactionIdstring
UUID
Specifies the POS transaction identifier returned from the create call.
waitForTransactionProcessingbooleanSpecifies the wait method. See the table below.

waitForTransactionProcessing

Valid values are:

ValueDescription
trueUse long polling. The response holds until the transaction completes or times out.
falseUse short polling.

When the transaction completes (posTransactionStatus: Completed), the response includes full transaction details in the linkedTransaction object:

{
  "posTransactionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "posTransactionStatus": "Completed",
  "baseAmount": 25.99,
  "processedAmount": 25.99,
  "currencyCode": "USD",
  "transactionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "linkedTransaction": {
    "transactionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "processedAmount": 25.99,
    "transactionStatus": "Captured",
    "processorDetails": {
      "authCode": "A12345"
    }
  }
}

Canceling a POS Transaction

You can cancel a transaction that hasn't completed yet. To cancel a specified POS transaction, use:
POST /v2/pos/transactions/{posTransactionId}/cancel

This returns the updated transaction status. Cancellation is only possible while the transaction is in a non-final state, such as InProgress.

Printing a POS Transaction Receipt

To print a receipt on a terminal for a completed transaction, use:
POST /v2/pos/transactions/{posTransactionId}/print-receipt

The posTransactionId is a path parameter. The following is an example request body.

{
  "terminalId": "d4e5f6a7-b8c9-0123-4567-89abcdef0123"
}

Polling for Results

After creating a transaction, poll the GET endpoint to track its progress.

Polling Strategies

Polling when creating a transaction:

  • Short polling: Set waitForAcceptanceByTerminal: false when creating the POS transaction. Your POS controls the polling interval to retrieve the transaction status.
  • Long polling: Set waitForAcceptanceByTerminal: true when creating the POS transaction. The response holds until the transaction is accepted by the terminal device or times out, reducing the number of API calls.

Polling to get the transaction results:

  • Short polling: Poll GET with waitForTransactionProcessing: false when you want to check the transaction status at your own interval.
  • Long polling: Poll GET with waitForTransactionProcessing: true to hold the request until the transaction reaches a final status, reducing the number of API calls.

Transaction Status Lifecycle

A POS transaction moves through a series of statuses from the time it is sent to the terminal until it reaches a final outcome.

A non-final status means the transaction is in progress. The status can still change. A final status means processing has ended, and the status does not change again.

The following table lists each status and whether it is final.

StatusFinal?Description
InProgressNoThe POS transaction is still being processed.
CompletedYesThe POS transaction finished processing successfully.
CancelledYesThe POS transaction was canceled before it completed.
FailedYesThe POS transaction did not complete because of an error.

Check the posTransactionStatus field to determine if the transaction has reached a final status.

Error Responses

All endpoints return standard HTTP status codes.

Status CodeDescription
400 Bad RequestInvalid request. Check that required fields are present and correctly formatted.
401 UnauthorizedMissing or invalid API token.
403 ForbiddenYour account does not have the required POS permission.
404 Not FoundThe specified transaction or terminal was not found.
500 Internal Server ErrorAn unexpected error occurred. Contact support if the issue persists.