Subscription
Payment Deduction Notification
Callback when a subscription deduction attempt completes (payment / deduction notification).
WEBHOOK
Overview
This page documentswebhook subscriptionOrderPaymentWebhook. The full schema, parameters, and examples are rendered from the linked OpenAPI or webhook definition above.
After a subscription billing cycle completes, GatePay sends an asynchronous notification to the merchant-configured callback URL. Depending on the payment channel, bizType may be SUBSCRIPTION_PAYMENT (Web3 on-chain deduction) or ACCOUNT_AUTH_DEDUCTION (Gate account authorized deduction).
Notes
- Use
bizId,paymentOrderNo, ordeductOrderNofor 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 after each subscription billing cycle completes (success or failure)
- If delivery fails, GatePay retries according to Notifications overview
- Use Deduction order detail as a query fallback when needed
Message structure
| Field | Type | Description |
|---|---|---|
bizType | string | SUBSCRIPTION_PAYMENT or ACCOUNT_AUTH_DEDUCTION |
bizId | string | Deduction order ID (for SUBSCRIPTION_PAYMENT, usually paymentOrderNo) |
bizStatus | string | See table below |
data | string | Deduction details as a JSON string; fields vary by bizType |
bizStatus values
| bizType | bizStatus | Description |
|---|---|---|
SUBSCRIPTION_PAYMENT | SUCCESS | Web3 on-chain deduction succeeded |
ACCOUNT_AUTH_DEDUCTION | DEDUCT_SUCCESS | Gate account authorized deduction succeeded |
ACCOUNT_AUTH_DEDUCTION | DEDUCT_FAILED | Gate account authorized deduction failed |
data fields (bizType=SUBSCRIPTION_PAYMENT)
| Field | Type | Description |
|---|---|---|
subscriptionOrderNo | string | Subscription order number |
merchantSubscriptionOrderNo | string | Merchant subscription order number |
planNo | string | Subscription plan number |
paymentOrderNo | string | Deduction order number for this cycle |
merchantId | string | Merchant ID |
cryptoCurrency | string | Cryptocurrency |
chain | string | Blockchain network |
cryptoAmount | string | Single deduction amount |
userAddress | string | User authorized address |
authorizedAddress | string | User authorized address (same as userAddress in some payloads) |
merchantAddress | string | Platform address that receives the deduction |
txHash | string | On-chain transaction hash |
payStatus | string | Deduction status: SUCCESS / FAILED |
payTime | int64 | Deduction time in ms |
paymentChannel | string | Payment channel; Web3 scenarios typically use WEB3 |
data fields (bizType=ACCOUNT_AUTH_DEDUCTION)
| Field | Type | Description |
|---|---|---|
subscriptionOrderNo | string | Subscription order number |
merchantSubscriptionOrderNo | string | Merchant subscription order number |
merchantId | string | Merchant ID |
deductOrderNo | string | Platform deduction order number |
merchantDeductNo | string | Merchant deduction order number |
currency | string | Deduction currency |
amount | number | Amount deducted in this cycle |
totalDeducted | number | Cumulative deducted amount |
remainingAmount | number | Remaining authorized balance |
deductStatus | string | Deduction status: SUCCESS / FAILED |
deductTime | int64 | Deduction time in ms |
paymentChannel | string | Payment channel; authorized deduction typically uses GATEPAY |
Callback examples
Web3 deduction success (bizType=SUBSCRIPTION_PAYMENT)
Authorized payment deduction success (bizType=ACCOUNT_AUTH_DEDUCTION)
Authorized payment deduction failed (bizType=ACCOUNT_AUTH_DEDUCTION)
Body
application/json
Subscription order deduction notification parameters POST method
Business type: SUBSCRIPTION_PAYMENT — subscription payment deduction notification; ACCOUNT_AUTH_DEDUCTION — authorized payment deduction notification.
Business status: SUCCESS for successful SUBSCRIPTION_PAYMENT; DEDUCT_SUCCESS / DEDUCT_FAILED for ACCOUNT_AUTH_DEDUCTION.
Deduction details as a JSON string; fields vary by bizType.
Deduction order ID (for SUBSCRIPTION_PAYMENT, usually paymentOrderNo).

