Void/Refund

Attempts to void a card-present transaction if still in its open batch window; otherwise performs a refund.

This is the preferred method for cancelling an existing transaction. The API call wakes the terminal for either a refund OR a void. Given a transactionIdIn the POST body, the Stax terminal resource will decide whether to process a refund OR a void, depending on the created_at date of the original transaction.

📘

If the date is before the current batch time (usually 8 pm EST), the transaction will be voided (removed from the current batch).

📘

If the transaction has already been batched, the terminal will initiate a refund request, and the customer will be prompted to insert their card.

If the terminal is running a void (because the transaction hasn't been batched yet), the customer doesn't need to take any action. The terminal will print a void receipt (depending on the value of printReceipt).

If a register ID is provided, the void or refund will be sent to the register (terminal) specified. However, if the transaction needs to be voided, the register ID must match the original transaction ID.

❗️

One register cannot be used to void a transaction on a separate register. It is therefore recommended that you DO NOT supply a register ID. The sample body shows the result if a refund is chosen. For a void sample, please see the void result.

Card Present Tokenization


To take advantage of the benefits of Card Present Tokenization, you SHOULD NOT use this route to refund a transaction with a CP tokenized payment method and instead use the transaction void-or-refund route. This will allow refunds in a card-not-present environment, whereas this terminal route will require the card to be present.

Body Params
float
required

(Min: 0.01) Limits the amount that can be voided or refunded. If total is not present, then the full transaction amount will be reversed.

json

i.e. {"tax":2,"subtotal":10} can contain any json objectwill be blindly stored and returned during a GET operation.values in meta may also appear in an email receipt if the template calls for it.the Stax front-end uses subtotal, tax, memo, lineItems = [].

string
enum
Defaults to Both

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

Allowed:
string
enum
Defaults to Credit

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

Allowed:
string
required

The id of the transaction being voided or refunded. This endpoint will automatically determine whether to void or refund based on batch timing (typically 8pm EST). Before batch settlement, a void will be executed; after settlement, a refund will be executed.

string
required

The id of the register performing this operation. This should be the 'id' value returned by GET /terminal/register. For refunds, register is optional as the card will be present. For voids, register is optional but if provided must match the register used for the original transaction.

Responses

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