POST
Subscription payment webhook
Use this webhook to receive subscription payment results and link each charge to the related
contractId, tokenId, and scenarios value.Webhook URLSetup guide
Notifications are sent to the URL specified in
notifyUrl when creating the transaction.Verification
Verification guideHeader-signed
- Signature header
- X-Rh-Signature
Signature coverage
All payload fields except sign(legacy signature value)paymentMethodwalletTypeName.
Webhook payload fields
X-Rh-SignatureSignature for verifying this notification. Contains one or more comma-separated
v1=<signature> values.x-signatureAdditional signature header with the same format and signing rules as
X-Rh-Signature.notifyTypeNotification type, identifying the webhook business category.
Constraints
- Values
- Fixed to
TXNfor subscription payment notifications.
transactionIdOnerway transaction number generated for this subscription payment, 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.
paymentIdPayment intent ID used to associate this subscription payment flow.
txnTypeTransaction operation type represented by this notification.
Allowed values
SALE- Payment transaction.
Constraints
- Values
- Fixed to
SALEfor subscription payment notifications.
merchantNoMerchant number assigned by Onerway, identifying the merchant account receiving this notification.
merchantTxnIdMerchant-side transaction number used for reconciliation, deduplication, and subscription payment order association.
responseTimeTime when Onerway generated this notification result, in Beijing time (UTC+08:00), formatted as
yyyy-MM-dd HH:mm:ss.txnTimeTime when Onerway created the transaction for this subscription payment, in Beijing time (UTC+08:00), formatted as
yyyy-MM-dd HH:mm:ss.txnTimeZoneUTC offset when Onerway generated this notification:
+08:00 (Beijing time).orderAmountSubscription payment amount, expressed in
orderCurrency.Constraints
- Rule
- Amount values are returned as decimal strings. Avoid binary floating-point arithmetic for money.
orderCurrencySubscription payment currency, as a three-letter ISO 4217 currency code.
statusProcessing status of this subscription payment transaction.
Allowed values
S- Successful transaction.
F- Failed transaction.
P- Processing transaction.
paymentStatusPayment-intent-level status for this subscription payment intent.
Allowed values
I- Payment intent initialized.
U- Payment intent pending payment.
P- Payment intent processing.
contractIdSubscription contract number for this payment. Save it for later subscription queries, cancellation, or updates.
Constraints
- Rule
- This value is a large-ID-style string. Preserve it as a string in JavaScript systems to avoid precision loss.
tokenIdSubscription token. Store it together with
contractId; later subscription charges, queries, and cancellation require both values.Constraints
- Rule
- This token is only valid for subscription operations. It is not a saved payment method token and cannot be used for
subProductType=TOKENpayments. - Consistency
- For a card subscription created with
subscription.bindCard=true, the saved payment method token is returned incardTokenId, not in this field. For local payment method subscriptions, the Saved payment method result webhook returns this same value in itstokenId, where it is also the subscription token. Wallet subscriptions receive only this notification.
cardTokenIdSaved payment method token of the card used for this subscription.
Constraints
- Consistency
- Same value as
tokenIdin the Saved payment method result webhook; use it to match the two notifications. It is a different token fromtokenIdin this notification. - Rule
- Whether the card was saved is decided by the Saved payment method result webhook: use this token for
subProductType=TOKENpayments through Create direct transaction only after that notification returnsstatus=S. Onerway saves the card after this payment succeeds, so a failed payment never produces that notification. The order in which your server receives the two notifications is not guaranteed; process each one idempotently.
eciElectronic 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 authenticated01— authentication attempted02— authentication successful04— Identity Check Insights (formerly Data Only): transaction data is shared for risk assessment; this does not indicate successful authentication06— the transaction is exempt from authentication, or uses a network token without 3DS07— 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 successful06— authentication attempted07— not authenticated.
cardBinCountryCard BIN country or region, as an ISO 3166-1 alpha-2 two-letter code.
reason{ respCode, respMsg }Transaction result reason object, carried as a JSON string in the notification.
signLegacy signature string kept for compatibility. It is computed with only the first enabled key and can mismatch your configured key during key rotation; verify notifications with the
X-Rh-Signature header instead.Constraints
- Rule
- Exclude
signitself from the canonical string when verifying this webhook.
paymentMethodPayment method or card brand used by this subscription payment.
walletTypeNameWallet type name.
Allowed values
GooglePay- Google Pay wallet.
ApplePay- Apple Pay wallet.
EXPR- Wallet funding source: bank card.
subscriptionManageUrlSubscription management URL that the buyer can use to view and manage the subscription.
subscriptionStatusCurrent lifecycle status of the subscription contract.
Allowed values
trialing- Trial period before the paid subscription starts.
paymentdue- Payment is due or processing; the subscription contract is not active yet.
active- The subscription is active and all due payments have been paid.
dataStatusEnablement status of the subscription contract.
Allowed values
0- Pending activation.
1- Active.
2- Inactive.
products{ name, price, ... }Product list submitted in
txnOrderMsg.products of the subscription request, returned as a JSON string.metaDataCustom data submitted in the request, returned unchanged as the original JSON string.
Constraints
- Consistency
- If both the top-level
metaDataandsubscription.metaDatawere submitted, this field returnssubscription.metaData.
channelRequestIdPayment channel or processor request identifier, used for channel-side reconciliation or troubleshooting.
scenariosSubscription scenario that triggered this notification, distinguishing lifecycle events across the initial payment, renewals, card replacement, plan changes, cancellation, and expiration.
Allowed values
SUBSCRIPTION_INITIAL- Initial subscription payment, usually collected when the subscription contract is created.
SUBSCRIPTION_RENEWAL- Recurring subscription payment for a later billing cycle, using the saved
contractIdandtokenId. SUBSCRIPTION_CARD_REPLACEMENT- Payment method update for an existing subscription, such as replacing an expired or invalid card.
paymentMethodDetails{ card }Payment method details object. Card transaction details are under the
card child object.{
"notifyType": "TXN",
"transactionId": "replace_with_card_sale_transaction_id",
"paymentId": "replace_with_card_sale_payment_id",
"txnType": "SALE",
"merchantNo": "replace_with_merchant_no",
"merchantTxnId": "replace_with_merchant_subscription_reference",
"responseTime": "2026-01-15 10:10:02",
"txnTime": "2026-01-15 10:10:00",
"txnTimeZone": "+08:00",
"orderAmount": "7.00",
"orderCurrency": "USD",
"status": "S",
"paymentStatus": "S",
"contractId": "replace_with_subscription_contract_id",
"tokenId": "replace_with_subscription_token",
"cardTokenId": "replace_with_saved_card_token",
"eci": "05",
"cardBinCountry": "US",
"reason": "{\"respCode\":\"20000\",\"respMsg\":\"Success\"}",
"sign": "replace_with_sha256_signature",
"paymentMethod": "VISA",
"subscriptionManageUrl": "https://developers.onerway.com/example-subscription-manage",
"subscriptionStatus": "active",
"dataStatus": "1",
"products": "[{\"currency\":\"USD\",\"name\":\"Example weekly plan\",\"num\":\"1\",\"price\":\"7.00\",\"type\":\"\"}]",
"metaData": "{\"plan\":\"weekly\"}",
"channelRequestId": "replace_with_card_sale_channel_request_id",
"scenarios": "SUBSCRIPTION_INITIAL",
"paymentMethodDetails": "{\"card\":{\"checks\":{\"addressCheck\":null,\"postalCodeCheck\":null,\"cardholderNameCheck\":null,\"avsResultRawCode\":null,\"threeDSecureResult\":{\"version\":\"UNKNOWN\",\"authenticationFlow\":\"CHALLENGE\",\"chargebackLiability\":\"UNKNOWN\",\"transStatus\":null,\"transStatusReason\":null,\"veresEnrolled\":null,\"eci\":\"05\",\"cvvResult\":null,\"avsFullResult\":null,\"cavvResult\":\"replace_with_cavv\"}},\"holderName\":\"Example Cardholder\",\"year\":\"2028\",\"month\":\"05\",\"cardType\":null,\"productCategory\":null,\"issuer\":\"Example Issuer\",\"cardBinCountry\":\"US\",\"authorizationCode\":null,\"cardNumber\":\"400000******0002\"}}"
}Acknowledgement
Return HTTP 200 with the received
transactionId as the raw response body after the subscription payment webhook is received and accepted.replace_with_transaction_id