Wonder

Webhook

How webhook creates?

1 Create an HTTPS endpoint: Your server must accept POST requests and return 200 ok.

2 Generate webhook destination in Wonder dashboard: Go to Settings → Open API credentials and generate webhook destination, this webhook destination that you configured in Wonder dashboard will receive webhook events from Wonder.

TIP

Reliability matters. Wonder retries up to 15 times over 24 hours if your endpoint doesn't return 200. And if you have firewall requirements and need to allow specific IP address to access your production environment, please add the following IP addresses as whitelist: 119.8.39.23/32 and 119.8.232.135/32

Webhook events

ModuleX-actionTrigger
OrdersDOCOrder.createdOrder created
Order.paidPartial or full payment received
Order.payment_failureA payment attempt failed
Order.voidedOrder voided
Order.refundedPartial or full refund processed
Transaction.voidedIndividual transaction voided
Payout requestDOCPayout request.initiatedPayout request created
Payout request.processing transferPayout request has processed to bank
Payout request.settledPayout request settled
Payout request.reversedPayout request reversed
Payout request.refundedPayout request refunded due to rejected by bank
Card issuingDOCCard transaction.authorizedCard transaction authorized
Card transaction.reversedCard transaction reversed
Card transaction.settledCard transaction settled

Webhook examples

Order webhook

Order webhook has the same format as get an orderAPI

json
{
    "source": "Wonder OpenAPI",
    "type": "Invoice",
    "number": "202601151500014115038150",
    "due_date": null,
    "paid_total": "3",
    "unpaid_total": "0",
    "reference_number": "PAY2026011515000128400000030",
    "initial_total": 3,
    "initial_tips": 0,
    "subtotal": 3,
    "state": "completed",
    "correspondence_state": "paid",
    "currency": "HKD",
    "note": null,
    "auth_code": "EWKff1ffZr7bhFt",
    "return_url": "<Your return url>",
    "notify_url": "<Your server callback url>",
    "business": {
        "id": "<business id>",
        "business_name": "<business name>"
    },
    "line_items": [
        {
            "label": "<product name>",
            "purchasable_type": "Charge",
            "purchasable_id": null,
            "price": 3,
            "quantity": 1,
            "total": 3,
            "uuid": "66a86066-89a6-439a-809a-210e720542d6",
            "created_at": "2026-01-15T07:00:02Z",
            "updated_at": "2026-01-15T07:00:02Z"
        }
    ],
    "transactions": [
        {
            "type": "Sales",
            "source": "Wonder OpenAPI",
            "success": true,
            "is_pending": false,
            "captured": false,
            "allow_void": true,
            "allow_refund": true,
            "refunded_amount": 0,
            "void_is_pending": false,
            "payment_method": "unionpay_wallet",
            "currency": "HKD",
            "amount": 3,
            "change_amount": null,
            "original_currency_amount": null,
            "tips_amount": null,
            "uuid": "1a4bafa9-c44a-498d-8ca0-b44c3b6c5063",
            "note": null,
            "payment_data": {
                "datetime": "",
                "acquirer_name": "fake",
                "acquirer_type": "unionpay_wallet",
                "brn": "76270837",
                "merchant_id": "3333",
                "new_gateway_txn_id": "4611446116183971840",
                "payment_method": "unionpay_wallet",
                "rrn": "1446116653727745",
                "transaction_state": "success"
            },
            "voided": false,
            "voided_at": null,
            "device_sn": "c7a7321c44fad348af8bf655c66643cb",
            "extra": null,
            "acquirer_response_body": "{\"unionpay_wallet\":{\"first_6_digits\":\"625094\",\"in_web\":{},\"last_4_digits\":\"3456\"}}",
            "created_at": "2026-01-15T07:00:08Z",
            "3ds": {
                "enrolled": "",
                "redirect_url": ""
            },
            "original_transaction_uuid": null
        }
    ],
    "created_at": "2026-01-15T07:00:02Z",
    "updated_at": "2026-01-15T07:00:08Z"
}

Payout request webhook

The webhook format for Payout request.

json
{
    "payout_request": {
        "id": "1a2b3c4d-1111-2222-3333-444455556666",
        "reference_id": "INV-2026-0001",
        "payee_id": "<payee id>",
        "amount": "100.50",
        "currency": "HKD",
        "fee_amount": "1.50",
        "fee_currency": "HKD",
        "remark": "Invoice payment",
        "transfer_method": "HK FPS - Account Number",
        "transfer_status": "Settled",
        "schedule_at": null,
        "error_code": "",
        "error_message": "",
        "settled_at": "2026-07-22T04:05:00Z",
        "reversed_at": null,
        "refunded_at": null,
        "cancelled_at": null,
        "created_at": "2026-07-22T04:00:00Z",
        "updated_at": "2026-07-22T04:05:00Z"
    }
}

Card issuing webhook

The webhook format for Card issuing.

json
{
    "action": "Authorization",
    "card_transaction": {
        "id": "33cc2ca1-b4bf-4516-9962-31c67a885eeb",
        "p_business_id": "<business id>",
        "card": "<card id>",
        "status": "Declined",
        "type": "Sales",
        "transaction_currency": "HKD",
        "transaction_amount": "-101",
        "local_currency": "HKD",
        "local_amount": "-101",
        "final_local_amount": "-101",
        "billing_currency" : "HKD",
        "billing_amount" : "-106"
        "calculated_fee": "5",
        "merchant_id": "666666660057123",
        "merchant_country": "HK",
        "merchant_city": "",
        "merchant_name": "Bindo Simulator Test",
        "p_created_at": "2025-03-04T03:32:11.051702Z"
      }
}

3DS webhook

The webhook format for 3DS.

json
{
    "p_business_id": "<business id>",
    "card_reference_id": "<card reference id>",
    "verification_id": "03e69dd9-a70c-4b0f-b084-c0ee077772fb",
    "business_name": "<business name>",
    "card_num": "356772******8213"
    "transaction_currency": "HKD",
    "transaction_amount": "-101",
    "merchant_id": "666666660057123",
    "merchant_country": "HK",
    "merchant_city": "",
    "merchant_name": "Bindo Simulator Test",
    "p_created_at": "2025-03-04T03:32:11.051702Z"
    "otp_code": "123456" // verification code
}