Payment Transactions

One endpoint, every transaction type. Send orderId + terminalId + a transactionreqbody, then get the final result by webhook.

All payment transactions use a single endpoint with different transactionType values inside the request body.

Common endpoint — POST /api/payments/performTransaction

Every request includes orderId and terminalId at the top level, plus a transactionreqbody object holding the transaction-specific parameters.

ParameterTypeRequiredDescription
orderIdstringYesUnique order identifier for this request
terminalIdstringYesThe terminal ID to route the transaction to
transactionreqbodyobjectYesTransaction-specific parameters (see each type below)

📘

The response is not the final result

A successful call returns status: PROCESS / statusCode: 100 immediately. The card is then processed on the terminal and the final outcome is delivered to your registered webhook (see Webhooks). Match the webhook back to your request using orderId / rrn.

🚧

transactionType casing is inconsistent across types

The accepted transactionType string is not uniformly cased — e.g. PURCHASE, Refund, Cash_advance, Authorization, Pre_Authorization, Reversal, Reconciliation, pre_auth_extension, pre_auth_void, Purchase_Advice, Bill_Payment. Send each value exactly as shown in its section below, and ask NamiPay to confirm whether the field is case-sensitive (and ideally to normalise these) before relying on them in production.

Purchase

Initiates a standard purchase transaction.

ParameterTypeRequiredDescription
amountstringYesTransaction amount
printintegerYesPrint receipt flag (1 yes, 0 no)
transactionTypestringYesMust be PURCHASE

Request

{
  "orderId": "ORDER12345777986586",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "amount": "20",
    "print": 1,
    "transactionType": "PURCHASE"
  }
}

Response

{
  "transactionid": "BDFA3C612D6848",
  "transactionDate": "2026-03-25T12:39:29.875",
  "transactionType": "PURCHASE",
  "statusMessage": "Transaction Process",
  "status": "PROCESS",
  "statusCode": 100,
  "orderId": "ORDER12345777986586",
  "transactionreqbody": {
    "amount": "20",
    "print": "1",
    "transactionType": "PURCHASE"
  }
}

Refund

Processes a refund for a previous transaction.

ParameterTypeRequiredDescription
rrnstringYesRetrieval Reference Number of original txn
originalTransactionDatestringYesDate of original transaction (YYYY-MM-DD)
refundAmountstringYesAmount to refund
printintegerYesPrint receipt flag
transactionTypestringYesMust be Refund

Request

{
  "orderId": "ORDER12345777986878",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "rrn": "522314000067",
    "originalTransactionDate": "2025-08-11",
    "refundAmount": "116.50",
    "print": 1,
    "transactionType": "Refund"
  }
}

Cash Advance

Processes a cash advance transaction.

ParameterTypeRequiredDescription
cashAdvanceAmtstringYesCash advance amount
printintegerYesPrint receipt flag
transactionTypestringYesMust be Cash_advance

Request

{
  "orderId": "ORDER12345777986865",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "cashAdvanceAmt": "10.50",
    "print": 1,
    "transactionType": "Cash_advance"
  }
}

Authorization

Authorizes a transaction amount without capturing funds.

ParameterTypeRequiredDescription
authAmountstringYesAuthorization amount
printintegerYesPrint receipt flag
transactionTypestringYesMust be Authorization

Request

{
  "orderId": "ORDER12345777986880",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "authAmount": "150.50",
    "print": 1,
    "transactionType": "Authorization"
  }
}

Pre-Authorization

Places a hold on funds for later capture. Commonly used for hotels and car rentals.

ParameterTypeRequiredDescription
ecrReferenceNostringYesECR reference number
authAmountstringYesPre-authorization amount
printintegerYesPrint receipt flag
transactionTypestringYesMust be Pre_Authorization

Request

{
  "orderId": "ORDER12345777986881",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "ecrReferenceNo": "153243634",
    "authAmount": "150.50",
    "print": 1,
    "transactionType": "Pre_Authorization"
  }
}

🚧

Source example for Pre-Authorization looks off

In the source PDF this example omitted the top-level orderId/terminalId and carried a stray "TransactionType": "PRE_AUTHORIZATION" field. The request above is normalised to the common shape used by every other transaction; verify the exact required fields with NamiPay before relying on it.

Reversal

Reverses a transaction that has not yet been settled.

ParameterTypeRequiredDescription
rrnstringYesRetrieval Reference Number to reverse
refundAmountstringYesAmount to reverse
printintegerYesPrint receipt flag
transactionTypestringYesMust be Reversal

Request

{
  "orderId": "ORDER12345777986882",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "rrn": "522314000067",
    "refundAmount": "116.50",
    "print": 1,
    "transactionType": "Reversal"
  }
}

Reconciliation

Initiates end-of-day reconciliation to settle all pending transactions.

ParameterTypeRequiredDescription
printintegerYesPrint receipt flag
transactionTypestringYesMust be Reconciliation

Request

{
  "orderId": "ORDER12345777986883",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "print": 1,
    "transactionType": "Reconciliation"
  }
}

Pre-Auth Extension

Extends the hold period of an existing pre-authorization.

ParameterTypeRequiredDescription
rrnstringYesRRN of original pre-authorization
amountstringYesExtended authorization amount
originalTransactionDatestringYesDate of original pre-auth (YYYY-MM-DD)
printintegerYesPrint receipt flag
transactionTypestringYesMust be pre_auth_extension

Request

{
  "orderId": "ORDER12345777986884",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "rrn": "535018000254",
    "amount": "150",
    "originalTransactionDate": "2025-12-16",
    "print": 1,
    "transactionType": "pre_auth_extension"
  }
}

Pre-Auth Void

Cancels an existing pre-authorization and releases the held funds.

ParameterTypeRequiredDescription
rrnstringYesRRN of pre-authorization to void
amountstringYesOriginal pre-authorization amount
originalTransactionDatestringYesDate of original pre-auth (YYYY-MM-DD)
printintegerYesPrint receipt flag
transactionTypestringYesMust be pre_auth_void

Request

{
  "orderId": "ORDER12345777986885",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "rrn": "535018000254",
    "amount": "150",
    "originalTransactionDate": "2025-12-17",
    "print": 1,
    "transactionType": "pre_auth_void"
  }
}

Purchase Advice

Completes a pre-authorized transaction by capturing the funds.

ParameterTypeRequiredDescription
rrnstringYesRRN of pre-authorization to complete
originalTransactionDatestringYesDate of original pre-auth (YYYY-MM-DD)
amountstringYesFinal capture amount
printintegerYesPrint receipt flag
transactionTypestringYesMust be Purchase_Advice

Request

{
  "orderId": "ORDER12345777986886",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "rrn": "535018000254",
    "originalTransactionDate": "2025-12-18",
    "amount": "150",
    "print": 1,
    "transactionType": "Purchase_Advice"
  }
}

Bill Payment

📘

New in v1.1

Processes a bill payment transaction.

ParameterTypeRequiredDescription
rrnstringYesRetrieval Reference Number
printintegerYesPrint receipt flag
transactionTypestringYesMust be Bill_Payment

Request

{
  "orderId": "ORDER12345777986597",
  "terminalId": "8184000200000077",
  "transactionreqbody": {
    "rrn": "535018000254",
    "print": 1,
    "transactionType": "Bill_Payment"
  }
}