Skip to main content
WEBHOOK

Overview

This page documents webhook 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 bizId or data.subscriptionOrderNo for idempotency after parsing data.
  • 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 (authorized, running, cancelled, closed, etc.)
  • Top-level bizStatus matches orderStatus inside parsed data
  • No notification is sent when bizStatus=CREATED
  • 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

Structure example

bizStatus / orderStatus values

data fields

After parsing the data JSON string, common fields include:

Callback example

Running (bizStatus=RUNNING)

Order cancelled (bizStatus=CANCELLED)

Body

application/json

Subscription order status update notification POST method

bizType
string

Business type: SUBSCRIPTION_ORDER_STATUS

bizStatus
enum<string>

Business status: subscription order status code; same values as data.orderStatus.

Available options:
AUTHORIZED,
CONFIRMING,
TRIAL,
RUNNING,
UNPAID,
COMPLETED,
CANCELLED,
CLOSED,
BLOCKED
data
string

Subscription order details as a JSON string.

bizId
string

Subscription order number (usually matches data.subscriptionOrderNo).

Response

200 - application/json

Return HTTP 200 to indicate callback notification has been received.

returnCode
string

Response code, SUCCESS indicates success, FAIL indicates failure

returnMessage
string

Response description, empty when successful