Onerway
POST

Refund result webhook

Receive refund results at the original transaction’s notifyUrl. Do not use the example to determine whether a field is always returned or can be null. See Webhooks for handling and Create or cancel refund for requests.
Webhook URLSetup guide
Notifications are sent to the notifyUrl from the original transaction request.

Verification

Verification guide

Header-signed

Signature header
x-signature

Signature coverage

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

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 category.
transactionId
Onerway refund transaction number. Return this value unchanged when acknowledging the notification.
paymentId
Payment Intent ID associated with this refund.
txnType
Transaction operation type. REFUND identifies a refund result.
merchantNo
Merchant number assigned by Onerway.
merchantTxnId
Merchant transaction number for the refund. Onerway generates it if omitted from the refund request.
originMerchantTxnId
Merchant transaction number of the original payment.
responseTime
Time when Onerway generated the notification result, in Beijing time (UTC+08:00), formatted as yyyy-MM-dd HH:mm:ss.
txnTime
Time when Onerway submitted this refund to the payment processor, in Beijing time (UTC+08:00), formatted as yyyy-MM-dd HH:mm:ss. This is not the time the refund was requested or completed.
txnTimeZone
UTC offset when Onerway generated this notification: +08:00 (Beijing time).
orderAmount
Transaction amount reported in this notification, expressed in orderCurrency as a decimal string.
orderCurrency
Currency of orderAmount.
status
Refund processing result. S means success and F means failure.
cardBinCountry
Country or region associated with the card BIN.
reason
Result details encoded as a JSON string containing respCode and respMsg. When verifying the signature, use the field value as received, without parsing or reserializing its JSON content.
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.
paymentMethod
Payment method or card brand reported in the notification. Exclude this field when calculating the signature.
walletTypeName
Wallet type reported in the notification. Exclude this field when calculating the signature.
channelRequestId
Payment channel request identifier.
paymentMethodDetails
Payment method details encoded as a JSON string. When verifying the signature, use the field value as received, without parsing or reserializing its JSON content.

Webhook example

{
  "notifyType": "TXN",
  "transactionId": "demo_transactionId",
  "paymentId": "demo_paymentId",
  "txnType": "REFUND",
  "merchantNo": "demo_merchantNo",
  "merchantTxnId": "demo_merchantTxnId",
  "originMerchantTxnId": "demo_originMerchantTxnId",
  "responseTime": "2026-09-14 00:05:29",
  "txnTime": "2026-09-14 00:05:28",
  "txnTimeZone": "+08:00",
  "orderAmount": "13.36",
  "orderCurrency": "USD",
  "status": "S",
  "cardBinCountry": "US",
  "reason": "{\"respCode\": \"20000\", \"respMsg\": \"Success\"}",
  "sign": "replace_with_signature",
  "paymentMethod": "VISA",
  "walletTypeName": "ApplePay",
  "channelRequestId": "demo_channelRequestId",
  "paymentMethodDetails": "{\"card\": {\"checks\": null, \"holderName\": null, \"year\": null, \"month\": null, \"cardType\": \"ApplePay\", \"productCategory\": null, \"issuer\": null, \"cardBinCountry\": \"US\", \"authorizationCode\": null, \"cardNumber\": \"[REDACTED]\"}}"
}

Acknowledgement

After receiving and accepting the notification, return HTTP 200 with Content-Type: text/plain and the received transactionId unchanged in the response body. Without a successful response, Onerway retries at 30-minute intervals, up to 3 times. 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

demo_transactionId