Charge (Queue)

Queues a card-present sale on the terminal rather than waking it immediately. Useful when multiple transactions need to be staged (e.g., busy lanes) or when the device is currently in use. Response mirrors /terminal/charge but processing begins only when the terminal becomes available.

Workflow:

  1. Create queued charge.
  2. Terminal processes queued items FIFO.
  3. Poll status endpoint for each queued transaction.

Differences vs /terminal/charge:

  • Terminal may return terminalservice.waiting until it dequeues.
  • If queue is full returns a 422 or device-specific error.
  • Cancellation before processing removes from queue.

Recommended Use: High concurrency environments; fall back to direct charge for immediate processing.

Security: ApiKeyAuth or EphemeralAuth required.

Polling: Same recommendations as charge; consider exponential backoff if many queued items.

Queue a card-present sale on the terminal rather than waking it immediately. Useful when multiple transactions need to be staged (e.g., busy lanes) or when the device is currently in use.

Workflow

  1. Create queued charge - receives transaction ID immediately
  2. Terminal processes queued items FIFO when available
  3. Poll status endpoint for each queued transaction

Key Differences vs /terminal/charge

  • Asynchronous processing: Returns transaction ID immediately, even before terminal receives request
  • Queue management: Terminal may return terminalservice.waiting until it dequeues
  • Capacity limits: If queue is full, returns 422 or device-specific error
  • Flexible cancellation: Can cancel before processing to remove from queue

Recommended Use: High concurrency environments; fall back to direct charge for immediate processing.

Security: ApiKeyAuth or EphemeralAuth required.

clockAPI Throttling & Polling

All API routes are throttled to 150 requests per minute per IP.

Poll GET /transaction/id every 5 seconds or longer. The transaction message will be "terminalservice.waiting" until finished. After completion, the success flag will be either 0 or 1, and the message will contain an error string or be empty.

Consider exponential backoff if many queued items are being processed.

userCustomer Experience Best Practices

We have found that once a customer sees the price show up on the terminal, they often begin a discussion about the cost. Perhaps their goal is to alter the price. This takes time and frequently causes the old route (POST charge) to timeout. It can also cause extra strain on servers during polling with the charge/queue route.

We recommend showing the customer the price before initiating the POST charge/queue. An easy way to do this is to use our prompt route to display the price and have the user approve it.

list-checkTransaction Statuses

A transaction can have one of three statuses:

  • PENDING - Terminal payments will be in this status while the payment is handled on the terminal device
  • SUCCESS - Transaction completed successfully
  • FAILED - Transaction failed to complete

Based on the payment result, the status will automatically transition to SUCCESS or FAILED.

Note: Stax will poll for the final status of a pending transaction for up to 3 hours in case of network connectivity loss. If a transaction status is pending past this point, clients may contact Support to update the transaction status to reflect its final state.

credit-card
Card Present Tokenization

This route supports Card Present Tokenization, allowing payment methods used in terminal transactions to be tokenized and stored on a customer for future use.

Benefits:

  • Refund terminal transactions without the original card present
  • Use payment method in future card-not-present transactions
  • Differentiated by isCpTokenized: true in the payment method's meta object
percentage
Card Present Surcharging

Available with CP Surcharging enabled. Allows payments made on physical terminals to have surcharges assessed for credit cards (not debit cards).

Key Points:

  • Surcharges assessed when payment method is presented
  • /charge/queue endpoint doesn't respond with surcharge value
  • Surcharge details available in GET /transaction/id response
codeExample Payment Method Object
{  
 "id": "6ba7babe-9906-4e7e-b1a5-f628c7badb61",  
 ...  
 "meta": {  
   ...  
   "isCpTokenized": true  
 }  
}
❗️

Important Limitation

Apple Pay and Google Pay cannot be tokenized. These payment methods will return "isCpTokenized": false and will NOT be reusable due to the ephemeral nature of the card numbers generated by Apple Pay and Google Pay.

Body Params
float
required

(Min: 0.01) The dollar amount a customer is charged. This field is required and will be the amount a customer is charged. If tip prompting is enabled, the selected tip will be added to this total.

string
required

The id of the register performing this operation. This should be the 'id' value returned by GET /terminal/register, not the serial or status_port.

string
enum
Defaults to both

Possible values: No, Merchant, Customer, Both. Defaults to Both.

Allowed:
boolean
Defaults to true

If true, will prompt the user to select Credit or Debit for this transaction.

string
enum
Defaults to Credit

Possible values: Credit, Debit, Check, Gift, Loyalty. Defaults to Credit.

Allowed:
string

The id of the customer attributed to this charge.

string

The id of the invoice attributed to this charge.

boolean
Defaults to false

If true, will prompt the user to input a custom tip that will be added to total and set to meta.tip. promptTipInput and promptTipChoice cannot both be true. (defaults to false)

boolean
Defaults to false

If true, will prompt the user to select a tip from a list defined by either percentageTipChoices or wholeTipChoices. The selected tip will be added to total and set to meta.tip.

int32
Defaults to 10

If total is greater than or equal to percentageTipThreshold, percentageTipChoices will be used. If the total is less than percentageTipThreshold, wholeTipChoices will be used. (defaults to 10)

percentageTipChoices
array of int32s
Defaults to 15,18,20,25

The array of tip percentages to show to the user. Tip amount will be automatically calculated and shown alongside the percent.

percentageTipChoices
wholeTipChoices
array of strings
Defaults to 1,3,5

The array of flat dollar amount tips to show to the user. Defaults to [1, 3, 5].

wholeTipChoices
boolean

This value is ignored unless the CP tokenization feature is enabled. If true, the system will attempt to tokenize the card and attach it to the customer associated with customerId. Please reach out to Stax for more information about enabling the CP tokenization feature.

Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json