Onerway
POST

Subscription cancellation webhook

This notification is sent when subscription cancellation takes effect. An accepted scheduled cancellation is not yet effective; payment results are reported through the subscription payment webhook.
Webhook URL
Notifications are sent to the notifyUrl from the original transaction request.

Verification

Verification guide

Header-signed

Signature header
X-Rh-Signature

Signature coverage

All payload fields except sign(legacy signature value).

Webhook payload fields

X-Rh-Signature
Signature for verifying this notification. Contains one or more comma-separated v1=<signature> values.
x-signature
Additional signature header with the same format and signing rules as X-Rh-Signature.
notifyType
Notification type, fixed to SUBSCRIPTION_CANCELED.
transactionId
Onerway identifier carried by this cancellation notification. Return the received value unchanged in the acknowledgement body.
merchantNo
Merchant number assigned by Onerway.
responseTime
Notification result time in yyyy-MM-dd HH:mm:ss format.
txnTime
Operation time recorded in this notification, in yyyy-MM-dd HH:mm:ss format.
txnTimeZone
Time zone offset for txnTime.
status
Cancellation result, fixed to S for a successful cancellation.
contractId
Canceled subscription contract number. Use it to associate this event with your subscription record.
sign
Body signature, excluded from the signature input. Follow Request signing and use the X-Rh-Signature header to verify the notification.
subscriptionExpireDate
Subscription expiration date carried in the notification, in yyyy-MM-dd format. Do not use this date alone to determine whether cancellation has taken effect; use subscriptionStatus.
subscriptionStatus
Subscription lifecycle status, fixed to canceled after cancellation takes effect.
dataStatus
Contract status reported for the canceled subscription, fixed to 3.
products
Subscription products encoded as a JSON string. Product entries contain name, price, num, and currency. Use the received string unchanged when calculating the signature; do not parse and reserialize it.
scenarios
Subscription event, fixed to SUBSCRIPTION_CANCELED.

Webhook example

{
  "notifyType": "SUBSCRIPTION_CANCELED",
  "transactionId": "example_subscription_contract",
  "merchantNo": "replace_with_merchant_no",
  "responseTime": "2026-09-29 00:00:03",
  "txnTime": "2026-09-29 00:00:03",
  "txnTimeZone": "+08:00",
  "status": "S",
  "contractId": "example_subscription_contract",
  "sign": "replace_with_signature",
  "subscriptionExpireDate": "2099-12-31",
  "subscriptionStatus": "canceled",
  "dataStatus": "3",
  "products": "[{\"name\": \"example_membership\", \"price\": \"0.99\", \"num\": \"1\", \"currency\": \"USD\"}]",
  "scenarios": "SUBSCRIPTION_CANCELED"
}

Acknowledgement

After receiving and accepting the notification, return HTTP 200 with Content-Type: text/plain and the received transactionId unchanged in the response body.

Response body example

example_subscription_contract