Onerway
POST

Authorization, capture, and void webhook

Use this webhook to receive AUTH, CAPTURE, and VOID transaction notifications and associate the authorization lifecycle through paymentId.
Webhook URLSetup guide
Notifications are sent to the URL specified in notifyUrl when creating the transaction.

Verification

Verification guide

Header-signed

Signature header
x-signature

Signature coverage

All payload fields except sign(legacy signature value)periodValuepaymentMethod.

Webhook payload fields

x-signature
Signature for verifying this notification. Contains one or more comma-separated v1=<signature> values.
x-timestamp
Notification send time as a Unix timestamp in seconds. Excluded from the signature.
notifyType
Notification type, identifying the webhook business category.
Constraints
Values
Fixed to TXN for authorization, capture, and void notifications.
transactionId
Onerway transaction number generated for this authorization, capture, or void operation, used for tracking, queries, and idempotent processing.
Constraints
Rule
This value is a large-ID-style string. Preserve it as a string in JavaScript systems to avoid precision loss.
Consistency
In the same authorization lifecycle, AUTH, CAPTURE, and VOID are related but separate transaction operations, and their transactionId values are different.
paymentId
Payment intent ID used to associate the original pre-authorization and its later capture or void operation.
Constraints
Rule
This value is a large-ID-style string. Preserve it as a string in JavaScript systems to avoid precision loss.
Consistency
Authorization, capture, and void operations under the same pre-authorization lifecycle can be associated through the same paymentId.
txnType
Transaction operation type, indicating whether this notification is for pre-authorization creation, capture, or void.
Allowed values
AUTH
Pre-authorization creation. Funds are authorized first; use status and paymentStatus to determine the authorization state.
CAPTURE
Pre-authorization capture. Captures an already authorized amount.
VOID
Pre-authorization void. Releases the authorized amount without capturing it.
merchantNo
Merchant number assigned by Onerway, identifying the merchant account receiving this notification.
merchantTxnId
Merchant transaction number used for reconciliation and order association.
Constraints
Rule
Capture notifications may echo the merchant transaction number of the original pre-authorization order. VOID notifications can return the merchant transaction number from the void request. Use transactionId to deduplicate operation notifications. Associate lifecycle records with paymentId, transactionId, and transaction query results.
responseTime
Time when Onerway generated this notification result, in Beijing time (UTC+08:00), formatted as yyyy-MM-dd HH:mm:ss.
txnTime
Time when Onerway created this authorization, capture, or void transaction after receiving the request, in Beijing time (UTC+08:00), formatted as yyyy-MM-dd HH:mm:ss.
txnTimeZone
UTC offset when Onerway generated this notification: +08:00 (Beijing time).
orderAmount
Original pre-authorization order amount. In capture or void notifications, this represents the associated original authorization amount.
Constraints
Rule
Amount values are returned as decimal strings. Avoid binary floating-point arithmetic for money.
orderCurrency
Original pre-authorization order currency, as a three-letter ISO 4217 currency code.
status
Current processing status of this authorization, capture, or void operation.
Allowed values
S
Successful transaction.
F
Failed transaction.
P
Processing transaction.
Constraints
Consistency
This field represents the result of the current operation. Do not confuse it with the payment-intent-level paymentStatus.
paymentStatus
Payment-intent-level status representing the current state of the pre-authorization lifecycle.
Allowed values
A
Payment intent is authorized and waiting for a later action, such as capture.
O
Payment intent remains open and can be retried.
S
Payment intent succeeded.
Constraints
Rule
After a successful AUTH, this field can return A; when AUTH fails but the payment intent remains retryable it can return O; after a successful CAPTURE it can return S; after a successful VOID it returns N (closed).
eci
Electronic Commerce Indicator (ECI) identifies the transaction’s authentication status; its meaning depends on the card network. Non-empty values are returned as two-character strings, padded with a leading zero when needed. The groups below list common values and are not exhaustive.
Constraints
Rule
Mastercard:
00 — not authenticated
01 — authentication attempted
02 — authentication successful
04 — Identity Check Insights (formerly Data Only): transaction data is shared for risk assessment; this does not indicate successful authentication
06 — the transaction is exempt from authentication, or uses a network token without 3DS
07 — authentication successful for a merchant-initiated transaction (MIT); this can apply to eligible subsequent subscription payments.
Rule
Visa / American Express / JCB / Discover / Diners Club:
05 — authentication successful
06 — authentication attempted
07 — not authenticated.
cardBinCountry
Card BIN country or region, as an ISO 3166-1 alpha-2 two-letter code.
Transaction result reason object, carried as a JSON string in the notification.
periodValue
Installment period count.
sign
Compatibility signature in the notification body, excluded from the signature input. Onerway calculates it using the first signing key enabled at that time. During rotation, it may differ from the signature you compute with another key. Verify this notification with x-signature. Do not fall back to X-Rh-Signature or body sign when x-signature is missing or fails verification.
Constraints
Rule
Exclude sign itself from the canonical string when verifying this webhook.
paymentMethod
Payment method or card brand used by this authorization, capture, or void.
channelRequestId
Payment channel or processor request identifier, used for channel-side reconciliation or troubleshooting.
Payment method details object. Card transaction details are under the card child object.

Webhook example

{
  "eci": null,
  "cardBinCountry": null,
  "notifyType": "TXN",
  "transactionId": "replace_with_authorization_transaction_id",
  "paymentId": "replace_with_payment_id",
  "txnType": "AUTH",
  "merchantNo": "replace_with_merchant_no",
  "merchantTxnId": "replace_with_merchant_transaction_id",
  "responseTime": "2026-05-01 03:08:19",
  "txnTime": "2026-05-01 03:05:45",
  "txnTimeZone": "+08:00",
  "orderAmount": "79.97",
  "orderCurrency": "USD",
  "status": "S",
  "paymentStatus": "A",
  "reason": "{\"respCode\":\"20000\",\"respMsg\":\"Success\"}",
  "sign": "replace_with_sha256_signature",
  "paymentMethod": "MASTERCARD",
  "channelRequestId": "replace_with_channel_request_id",
  "paymentMethodDetails": "{\"card\":{\"cardBinCountry\":null,\"checks\":null,\"cardType\":\"MASTERCARD\",\"cardNumber\":\"512345******0008\"}}"
}

Acknowledgement

Return HTTP 200 with the received transactionId as the raw response body after the authorization, capture, or void webhook is received and accepted. On automatic retries, the payload and signature values remain unchanged; only the unsigned x-timestamp header is refreshed. Do not use this header as proof that a notification has not been replayed.

Response body example

replace_with_transaction_id