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-signature

Signature coverage

All payload fields except sign(legacy signature value).

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, 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
Compatibility signature in the notification body, excluded from the signature input. 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.
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. 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

example_subscription_contract