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 guideHeader-signed
- Signature header
- X-Rh-Signature
Signature coverage
All payload fields except sign(legacy signature value).
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, fixed to
SUBSCRIPTION_CANCELED.transactionIdOnerway identifier carried by this cancellation notification. Return the received value unchanged in the acknowledgement body.
merchantNoMerchant number assigned by Onerway.
responseTimeNotification result time in
yyyy-MM-dd HH:mm:ss format.txnTimeOperation time recorded in this notification, in
yyyy-MM-dd HH:mm:ss format.txnTimeZoneTime zone offset for
txnTime.statusCancellation result, fixed to
S for a successful cancellation.contractIdCanceled subscription contract number. Use it to associate this event with your subscription record.
signBody signature, excluded from the signature input. Follow Request signing and use the
X-Rh-Signature header to verify the notification.subscriptionExpireDateSubscription 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.subscriptionStatusSubscription lifecycle status, fixed to
canceled after cancellation takes effect.dataStatusContract status reported for the canceled subscription, fixed to
3.productsSubscription 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.scenariosSubscription event, fixed to
SUBSCRIPTION_CANCELED.{
"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.example_subscription_contract