Onerway
POST

Capture or void authorization

Use this endpoint to capture the full amount of a successful pre-authorization or void the authorization to release the reserved amount.

Request

merchantNo
Merchant number assigned by Onerway. See Setup for how to obtain it.
Example:
txnType
Authorization follow-up operation to execute. Use CAPTURE to capture the authorized amount or VOID to release the authorization.
Allowed values
CAPTURE
Capture a previously successful pre-authorization. This endpoint supports full capture only.
VOID
Void a previously successful pre-authorization, release the reserved amount, and do not debit the cardholder.
merchantTxnId
Merchant transaction order number for this capture or void operation. Different order numbers are treated as different transactions.
Example:
originTransactionId
Original pre-authorization transaction number returned by Onerway. It identifies the authorization that should be captured or voided.
Example:
sign
Request signature string. See Request signing for how to generate it.

Request example

curl -X POST 'https://sandbox-acq.onerway.com/v1/txn/authPayment' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "merchantNo": "replace_with_merchant_no",
  "merchantTxnId": "txn_demo_capture_202606210001",
  "originTransactionId": "example_original_auth_transaction_id",
  "sign": "{{SIGN}}",
  "txnType": "CAPTURE"
}'

Response

respCode
Response code; 20000 means the request was processed successfully, other values are error codes. See Response codes.
respMsg
Human-readable message for the response code.
Business data object carrying the processing result and transaction fields for this capture or void operation.

Response example

Example code is unavailable.

No error responses are documented for this endpoint.