Skip to main content
WEBHOOK

Overview

This page documents webhook otcCallbackWebhook. The full schema, parameters, and examples are rendered from the linked OpenAPI or webhook definition above. Use this webhook to receive OTC on-ramp and off-ramp order status change notifications.

Notes

  • Use bizId or clientOrderId for idempotency.
  • For OTC callbacks, data is a JSON string — call JSON.parse before reading fields. See below for the parsed structure.
  • Signature verification, retries, and the success response are covered in Notifications Overview; see Security and Signature for signing rules.

Trigger scenarios

  • GatePay sends notifications when OTC on-ramp or off-ramp order status changes
  • If delivery fails, GatePay retries according to the schedule in Notifications overview

Message Structure

On-ramp data fields (type=BUY, bizStatus is RECHARGE_*)

Off-ramp data fields (type=SELL, bizStatus is WITHDRAW_*)

feeDetail[] fields

Callback examples

On-ramp success (bizStatus=RECHARGE_SUCCESS)

Off-ramp dispatched (bizStatus=WITHDRAW_DISPATCHED)

Body

application/json

OTC order status callback notification structure

bizType
string
required

Fixed OTC business type.

bizId
string
required

OTC order ID.

bizStatus
string
required

OTC callback business status: RECHARGE_SUCCESS on-ramp succeeded, RECHARGE_FAIL on-ramp failed, WITHDRAW_DISPATCHED off-ramp payout dispatched, WITHDRAW_SUCCESS off-ramp succeeded, WITHDRAW_FAIL off-ramp failed, WITHDRAW_REFUND off-ramp refunded after successful payout

data
On-ramp (BUY) · object
required

Order details as a JSON string; on-ramp (type=BUY) and off-ramp (type=SELL) parsed structures differ — see Option below.

clientId
string

Merchant client ID.

Response

200 - application/json

Returns HTTP 200 to indicate the notification has been received successfully.

Response body returned by the merchant after receiving the notification.

returnCode
string
required

Return status code; SUCCESS indicates successful processing.

returnMessage
string | null

Return message; may be empty on success.