Terminal Payment API

Start a payment or refund on a terminal and retrieve the final result.

Quick Start

{
  "TERMID": "12345",
  "PASS": "abc123",
  "TYPE": "W",
  "ACTION": "StartSession",
  "INV": "INV1001",
  "AMT": "11.00",
  "REQUESTID": "4736823",
  "DEVICEID": "DEV001",
  "SUCCESSURL": "https://merchant.com/success"
}

How it Works

StartSession → Terminal → Callback → Final Result

  1. Call StartSession
  2. The terminal processes the transaction
  3. The gateway calls your SUCCESSURL
  4. Your system retrieves the final result

⚠️ Important: How Responses Work

This is an asynchronous API. Do not assume immediate transaction results.
If the request fails (CODE ≠ 0000), no callback will be triggered.

Each transaction has one or two responses, depending on the initial result.

1. StartSession Response (Immediate)

Returned right after calling StartSession.

  • CODE = 0000 → Request successfully sent to terminal
  • CODE ≠ 0000 → Request failed (terminal did not receive it)

2. Final Transaction Result (Only if StartSession CODE = 0000)

If StartSession returns 0000, the terminal will process the transaction.

You will then receive a second response via callback with the final result:

  • CODE = 0000 → Transaction approved
  • CODE = 8509 → Declined (NSF, fraud, etc.)

Key Behavior

  • If StartSession CODE ≠ 0000
    → Transaction failed immediately
    → No further response

  • If StartSession CODE = 0000
    → Transaction sent to terminal
    → Wait for final result

Think of StartSession as "request delivery" and the final result as "transaction outcome".


StartSession

Start a payment or refund.

Required Parameters

ParamDescription
TERMIDTerminal ID
PASSTerminal password
TYPEMust be W
ACTIONStartSession
SUCCESSURLCallback URL for approved transactions
FAILUREURLCallback URL for declined or failed transactions
AMTAmount
REQUESTIDUnique ID per request
DEVICEIDDevice ID
CUSTEMAILCustomer email

Optional Parameters

ParamDescription
SUCCESSURLCallback URL for approved transactions //terminals setup with a default URL, but can be passed dynamically if configured for your platform
FAILUREURLCallback URL for declined or failed transactions //terminals setup with a default URL, but can be passed dynamically if configured for your platform
INVInvoice number
REFUNDRefund instead of sale
NOTERMPRINTDisable receipt printing
JSONReturn JSON response
LANGE (English), F (French)
DESCDescription

Refer to Terminal Payment API


Example Request

Sale

{
  "TERMID": "12345",
  "PASS": "abc123",
  "TYPE": "W",
  "ACTION": "StartSession",
  "INV": "INV1001",
  "CUSTEMAIL": "[email protected]",
  "AMT": "11.00",
  "REQUESTID": "4736823",
  "DEVICEID": "DEV001",
  "SUCCESSURL": "https://merchant.com/success",
  "FAILUREURL": "https://merchant.com/failure"
}

Refund

{
  "TERMID": "12345",
  "PASS": "abc123",
  "TYPE": "W",
  "ACTION": "StartSession",
  "INV": "INV1001",	
  "CUSTEMAIL": "[email protected]",
  "AMT": "11.00",
  "REQUESTID": "4736823",
  "DEVICEID": "DEV001",
  "SUCCESSURL": "https://merchant.com/success",
  "FAILUREURL": "https://merchant.com/failure",
  "REFUND": "Y"
}

No Terminal Receipt

{
  "TERMID": "12345",
  "PASS": "abc123",
  "TYPE": "W",
  "ACTION": "StartSession",
  "INV": "INV1001",	
  "CUSTEMAIL": "[email protected]",
  "AMT": "11.00",
  "REQUESTID": "4736823",
  "DEVICEID": "DEV001",
  "SUCCESSURL": "https://merchant.com/success",
  "FAILUREURL": "https://merchant.com/failure",
  "NOTERMPRINT": "Y"
}

StartSession Response

FieldDescription
CODE0000 = request sent to terminal
TEXTStatus message
SECUREIDSession ID (save this)
CANCELURLURL to cancel the active terminal session (optional use)
HOSTN/A - Used for ecommerce transactions only
USERFEEN/A - Used for ecommerce transactions only
DATEDate of the request
TIMETime of the request
DURDuration of the request
⚠️

Do not treat this as payment success. This indicates the request was accepted. You must now wait for the final transaction result via callback.

❗️

CANCELURL can be used to cancel an in-progress transaction on the terminal if needed. If used after the transaction has been processed but before the batch has been settled, it will Void the transaction.

Store the SECUREID

  • Save the SECUREID from the StartSession response.
  • The same SECUREID will be returned in the final transaction result
  • This is required to match the final transaction result to the original request.

Example StartSession Response

{
  "TEXT": "SENT TO TERMINAL",
  "CODE": "0000",
  "SECUREID": "abc123",
  "CANCELURL": "https://svra.interpaypos.com/api/TERMPAY/cancel/?SecureID=abc123",
  "HOST": "https://devgate.interpaypos.com",
  "USERFEE": "0.00",
  "DATE": "2026-03-25",
  "TIME": "15:45:52",
  "DUR": "3.737"
}

Callback

After the terminal completes the transaction, the gateway will call one of your URLs:

  • SUCCESSURL → Transaction approved
  • FAILUREURL → Transaction declined or failed

The callback indicates that processing is complete.
You must use the response data to determine the final result.

Final Transaction Result

FieldDescription
TEXTAPPROVED, DECLINED, VOIDED, or Description of decline
CODEFinal result code (refer to status codes below)
AMTTransaction amount
SECUREIDSession ID
REFNUMTransaction reference number provided by the terminal
REQUESTIDOriginal request ID
INVInvoice
ACKY (confirms payment was captured)
RECEIPTSMerchant and Customer copy of receipt from the terminal in HTML
REFUNDY (only included if transaction was a Refund)
AUTHAuthorization Code (sent only if transaction was APPROVED)
CARDTYPEType of card used for the transaction (sent only if transaction was APPROVED)
CARDMASKThe masked card number - only last 4 digits available (sent only if transaction was APPROVED)
CUSTEMAILCustomers email address (sent only if transaction was APPROVED)

Refer to Terminal Transaction Callback Specs

Approved

{
  "CODE": "0000",
  "TEXT": "APPROVED",
  "SECUREID": "ur32e7683kmr5y6o853d",
  "AMT": "1.23",
  "REQUESTID": "2082440",
  "REFNUM": "WP5420PQ23000423",
  "INV": "",
  "AUTH": "182886",
  "CARDTYPE": "I",
  "CARDMASK": "****3259",
  "CUSTEMAIL": "[email protected]",
  "ACK": "Y",
  "RECEIPTS": {
    "Customer": "<IMG src=\"\"/><BR/><LG><C>Merchant Name</C></LG><BR/><BR/><L>03/27/2026</L><R>15:55</R><BR/><BR/><LG><C>Sale</C></LG><BR/><BR/><LG><L>Trans #: 3</L><R>Batch #: 1</R></LG><BR/><BR/><L>DEBIT</L><R>CHIP Contactless</R><BR/><L>************3259</L><R>**/**</R><BR/><L>Account Type:</L><R>Default</R><BR/><L>Reference Id:</L><R>ur32e7683kmr5y6o853d</R><BR/><BR/><LG><L>TOTAL AMT:</L><R>$1.23</R></LG><BR/><BR/><LG><C>APPROVED</C></LG><BR/><BR/><L>Resp:</L><R>APPROVAL</R><BR/><L>Code:</L><R>182886</R><BR/><L>Ref #:</L><R>518</R><BR/><L>Trace Number</L><R>000005</R><BR/><BR/><L>App Name:</L><R>Interac</R><BR/><L>AID:</L><R>A00000027710100100000002</R><BR/><L>TVR:</L><R>0080008000</R><BR/><BR/><BR/><BR/><B><C>CUSTOMER COPY</C></B><BR/><BR/><BR/><BR/><BR/><BR/>",
    "Merchant": "<IMG src=\"\"/><BR/><LG><C>Merchant Name</C></LG><BR/><BR/><L>03/27/2026</L><R>15:55</R><BR/><BR/><LG><C>Sale</C></LG><BR/><BR/><LG><L>Trans #: 3</L><R>Batch #: 1</R></LG><BR/><BR/><L>DEBIT</L><R>CHIP Contactless</R><BR/><L>************3259</L><R>**/**</R><BR/><L>Account Type:</L><R>Default</R><BR/><L>Reference Id:</L><R>ur32e7683kmr5y6o853d</R><BR/><BR/><LG><L>TOTAL AMT:</L><R>$1.23</R></LG><BR/><BR/><LG><C>APPROVED</C></LG><BR/><BR/><L>Resp:</L><R>APPROVAL</R><BR/><L>Code:</L><R>182886</R><BR/><L>Ref #:</L><R>518</R><BR/><L>Trace Number</L><R>000005</R><BR/><BR/><L>App Name:</L><R>Interac</R><BR/><L>AID:</L><R>A00000027710100100000002</R><BR/><L>TVR:</L><R>0080008000</R><BR/><BR/><BR/><B><C>MERCHANT COPY</C></B><BR/><BR/><BR/><BR/><BR/><BR/>"
  }
}

Declined

{
  "CODE": "8514",
  "TEXT": "Force(Ticket) Transaction Disabled",
  "SECUREID": "8j0310lxej7jrp0aruje",
  "REFUND": "Y",
  "AMT": "1.23",
  "REQUESTID": "3718563",
  "REFNUM": "",
  "INV": "",
  "ACK": "Y",
  "RECEIPTS": {
    "Customer": "<INV><B><LG><C>* CANCELED </C></LG></B></INV><BR/><BR/><IMG src=\"\"/><BR/><BR/><L>00/00/0000</L><R> 0:00</R><BR/><BR/><LG><C></C></LG><BR/><BR/><LG><L>Trans #: 0</L><R>Batch #: 2</R></LG><BR/><BR/><L>EBT</L><R>Swipe</R><BR/><L>************</L><R>**/**</R><BR/><L>Reference Id:</L><R>8j0310lxej7jrp0aruje</R><BR/><BR/><LG><L>AMOUNT:</L><R>$1.23</R></LG><BR/><LG><L>TOTAL AMT:</L><R>$1.23</R></LG><BR/><BR/><INV><B><L>Resp:</L><R></R></B></INV><BR/><L>Trace Number</L><R></R><BR/><INV><B><LG><C> CANCELED *</C></LG></B></INV><BR/><BR/><B><C>CUSTOMER COPY</C></B><BR/><BR/><BR/><BR/><BR/><BR/>",
    "Merchant": "<INV><B><LG><C>* CANCELED </C></LG></B></INV><BR/><BR/><IMG src=\"\"/><BR/><BR/><L>00/00/0000</L><R> 0:00</R><BR/><BR/><LG><C></C></LG><BR/><BR/><LG><L>Trans #: 0</L><R>Batch #: 2</R></LG><BR/><BR/><L>EBT</L><R>Swipe</R><BR/><L>************</L><R>**/**</R><BR/><L>Reference Id:</L><R>8j0310lxej7jrp0aruje</R><BR/><BR/><LG><L>AMOUNT:</L><R>$1.23</R></LG><BR/><LG><L>TOTAL AMT:</L><R>$1.23</R></LG><BR/><BR/><INV><B><L>Resp:</L><R></R></B></INV><BR/><L>Trace Number</L><R></R><BR/><INV><B><LG><C> CANCELED *</C></LG></B></INV><BR/><BR/><B><C>MERCHANT COPY</C></B><BR/><BR/><BR/><BR/><BR/><BR/>"
  }
}

Status Codes

CodeMeaning (StartSession)Meaning (Final Result)
0000Request sent to terminalApproved
8501Device not found
8502Device not supported
8503Fee not allowed
8504Device not responding
8505Terminal busy
8506Not found
8507Gateway configuration error
8508Not allowed
8509Declined (pre-check possible)Declined
8510Terminal configuration error
8511Format error
8512Terminal not connected
8513Gateway error
8514Other terminal response

Recap

Sequence:

  1. Call StartSession
  2. If CODE ≠ 0000 → stop (request failed)
  3. If CODE = 0000 → wait for callback
  4. Read final result
  5. If CODE = 0000 → approved

Rules:

  • REQUESTID must be unique per transaction
  • Always store SECUREID
  • Do not treat StartSession response of 0000 as success for the transaction; always rely on the final result via callback
  • Use REFUND for refunds
  • Use NOTERMPRINT to disable receipt printing

Mental Model

StartSession = "Request delivered to terminal"
Final Result = "Transaction outcome"