Subscription
Subscription Order Status Update Notification
Subscription order status update notification
WEBHOOK
Overview
This page documentswebhook subscriptionOrderWebhook. The full schema, parameters, and examples are rendered from the linked OpenAPI or webhook definition above.
When a subscription order status changes, GatePay sends an asynchronous notification to the merchant-configured callback URL (bizType is SUBSCRIPTION_ORDER_STATUS).
Notes
- Use
bizIdordata.subscriptionOrderNofor idempotency after parsingdata. - Signature verification, retries, parsing
data, and the success response are covered in Notifications Overview; see Security and Signature for signing rules.
When notifications are sent
- GatePay sends a notification to the merchant callback URL when the subscription order status changes (created, authorized, running, cancelled, closed, etc.)
- Top-level
bizStatusmatchesorderStatusinside parseddata - If delivery fails, GatePay retries after 15 seconds (twice), 30 seconds, 3 minutes, 10 minutes, 20 minutes, 30 minutes (three times), 60 minutes, 3 hours (three times), and 6 hours (twice); you can also call Subscription order detail to fetch the latest state
Message structure
| Field | Type | Description |
|---|---|---|
bizType | string | Always SUBSCRIPTION_ORDER_STATUS |
bizId | string | Subscription order number (usually matches data.subscriptionOrderNo) |
bizStatus | string | Subscription order status; see table below |
data | string | Subscription order details as a JSON string |
Structure example
bizStatus / orderStatus values
| Value | Description |
|---|---|
CREATED | Created |
AUTHORIZED | Authorized |
CONFIRMING | Confirming |
TRIAL | In trial |
RUNNING | Running |
UNPAID | Unpaid |
COMPLETED | Completed |
CANCELLED | Cancelled |
CLOSED | Closed |
BLOCKED | Blocked |
data fields
After parsing thedata JSON string, common fields include:
| Field | Type | Description |
|---|---|---|
subscriptionOrderNo | string | Subscription order number |
merchantSubscriptionOrderNo | string | Merchant subscription order number |
planNo | string | Platform subscription plan number |
planName | string | Subscription plan name |
planDesc | string | Subscription plan description |
merchantId | string | Merchant ID that created the plan |
productNo | string | Product number |
productName | string | Product name |
cryptoCurrency | string | Cryptocurrency |
chain | string | Blockchain network (may be empty when no on-chain authorization) |
userAddress | string | User authorized address |
authorizedAmount | string | Authorized amount |
cryptoAmount | string | Single deduction amount |
paidCount | integer | Number of completed deductions |
totalPaidAmount | string | Total deducted amount |
paymentChannel | string | Payment channel, e.g. GATEPAY, WEB3 (may be empty) |
period | string | Billing period, e.g. MONTH, NONE |
interval | integer | Billing interval |
totalPayCount | integer | Total number of deductions required |
trialDays | integer | Trial days |
endTime | int64 | Subscription end time in ms (0 if not set) |
lastPayTime | int64 | Last deduction time in ms (0 if none) |
orderStatus | string | Order status; matches top-level bizStatus |
createTime | int64 | Order creation time in ms |
updateTime | int64 | Order update time in ms |
Callback example
Running (bizStatus=RUNNING)
Order cancelled (bizStatus=CANCELLED)
Body
application/json
Subscription order status update notification POST method
Business type: SUBSCRIPTION_ORDER_STATUS
Business status: subscription order status code; same values as data.orderStatus.
Available options:
CREATED, AUTHORIZED, CONFIRMING, TRIAL, RUNNING, UNPAID, COMPLETED, CANCELLED, CLOSED, BLOCKED Subscription order details as a JSON string.
Subscription order number (usually matches data.subscriptionOrderNo).

