[{"data":1,"prerenderedAt":395},["ShallowReactive",2],{"navigation-en":3,"en:\u002Fwebhooks\u002Foverview":193,"en:\u002Fwebhooks\u002Foverview:surround":390},[4,20,51,77,95,110,133,158,172],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15],{"title":11,"path":12,"stem":13,"icon":14},"Portal Preparation","\u002Fgetting-started\u002Fportal-setup","1.getting-started\u002F1.portal-setup","i-lucide-rocket",{"title":16,"path":17,"stem":18,"icon":19},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F2.quickstart","i-lucide-zap",{"title":21,"icon":22,"path":23,"stem":24,"children":25,"page":6},"Core Concepts","i-lucide-key-round","\u002Fconcepts","2.concepts",[26,31,36,41,46],{"title":27,"path":28,"stem":29,"icon":30},"Authentication","\u002Fconcepts\u002Fauthentication","2.concepts\u002F1.authentication","i-lucide-fingerprint",{"title":32,"path":33,"stem":34,"icon":35},"IP Allowlist","\u002Fconcepts\u002Fip-allowlist","2.concepts\u002F2.ip-allowlist","i-lucide-shield-check",{"title":37,"path":38,"stem":39,"icon":40},"Money Format","\u002Fconcepts\u002Fmoney","2.concepts\u002F3.money","i-lucide-banknote",{"title":42,"path":43,"stem":44,"icon":45},"Idempotency","\u002Fconcepts\u002Fidempotency","2.concepts\u002F4.idempotency","i-lucide-repeat",{"title":47,"path":48,"stem":49,"icon":50},"Error envelope & codes","\u002Fconcepts\u002Ferrors","2.concepts\u002F5.errors","i-lucide-octagon-alert",{"title":52,"icon":53,"path":54,"stem":55,"children":56,"page":6},"Deposits","i-lucide-arrow-down-to-line","\u002Fdeposits","3.deposits",[57,62,67,72],{"title":58,"path":59,"stem":60,"icon":61},"Deposit Overview & State Machine","\u002Fdeposits\u002Foverview","3.deposits\u002F1.overview","i-lucide-info",{"title":63,"path":64,"stem":65,"icon":66},"Create a Deposit","\u002Fdeposits\u002Fcreate","3.deposits\u002F2.create","i-lucide-plus",{"title":68,"path":69,"stem":70,"icon":71},"Get a Deposit","\u002Fdeposits\u002Fretrieve","3.deposits\u002F3.retrieve","i-lucide-search",{"title":73,"path":74,"stem":75,"icon":76},"Cancel a Deposit","\u002Fdeposits\u002Fcancel","3.deposits\u002F4.cancel","i-lucide-x",{"title":78,"icon":79,"path":80,"stem":81,"children":82,"page":6},"Withdrawals","i-lucide-arrow-up-from-line","\u002Fwithdrawals","4.withdrawals",[83,87,91],{"title":84,"path":85,"stem":86,"icon":61},"Withdrawal Overview","\u002Fwithdrawals\u002Foverview","4.withdrawals\u002F1.overview",{"title":88,"path":89,"stem":90,"icon":66},"Create a Withdrawal","\u002Fwithdrawals\u002Fcreate","4.withdrawals\u002F2.create",{"title":92,"path":93,"stem":94,"icon":71},"Get & List Withdrawals","\u002Fwithdrawals\u002Fretrieve","4.withdrawals\u002F3.retrieve",{"title":96,"icon":97,"path":98,"stem":99,"children":100,"page":6},"Balance & Banks","i-lucide-wallet","\u002Fbalance","5.balance",[101,105],{"title":102,"path":103,"stem":104,"icon":97},"Get Balance","\u002Fbalance\u002Fget-balance","5.balance\u002F1.get-balance",{"title":106,"path":107,"stem":108,"icon":109},"Bank List","\u002Fbalance\u002Fbanks","5.balance\u002F2.banks","i-lucide-landmark",{"title":111,"icon":112,"path":113,"stem":114,"children":115,"page":6},"Webhooks","i-lucide-webhook","\u002Fwebhooks","6.webhooks",[116,120,125,129],{"title":117,"path":118,"stem":119,"icon":61},"Webhook Overview","\u002Fwebhooks\u002Foverview","6.webhooks\u002F1.overview",{"title":121,"path":122,"stem":123,"icon":124},"Event Catalog & Payloads","\u002Fwebhooks\u002Fevents","6.webhooks\u002F2.events","i-lucide-list",{"title":126,"path":127,"stem":128,"icon":35},"Signature Verification","\u002Fwebhooks\u002Fsignature-verification","6.webhooks\u002F3.signature-verification",{"title":130,"path":131,"stem":132,"icon":45},"Endpoint Requirements, Retries & SSRF","\u002Fwebhooks\u002Fdelivery-and-retries","6.webhooks\u002F4.delivery-and-retries",{"title":134,"icon":135,"path":136,"stem":137,"children":138,"page":6},"Sandbox","i-lucide-flask-conical","\u002Fsandbox","7.sandbox",[139,143,148,153],{"title":140,"path":141,"stem":142,"icon":61},"Test Mode Overview","\u002Fsandbox\u002Foverview","7.sandbox\u002F1.overview",{"title":144,"path":145,"stem":146,"icon":147},"Simulate Transfer","\u002Fsandbox\u002Fsimulate-transfer","7.sandbox\u002F2.simulate-transfer","i-lucide-banknote-arrow-down",{"title":149,"path":150,"stem":151,"icon":152},"Top-up & Reset","\u002Fsandbox\u002Ftop-up-and-reset","7.sandbox\u002F3.top-up-and-reset","i-lucide-rotate-ccw",{"title":154,"path":155,"stem":156,"icon":157},"End-to-End Test Flow","\u002Fsandbox\u002Fe2e-test-flow","7.sandbox\u002F4.e2e-test-flow","i-lucide-list-checks",{"title":159,"icon":14,"path":160,"stem":161,"children":162,"page":6},"Go-live","\u002Fgo-live","8.go-live",[163,167],{"title":164,"path":165,"stem":166,"icon":157},"Go-live Checklist","\u002Fgo-live\u002Fchecklist","8.go-live\u002F1.checklist",{"title":168,"path":169,"stem":170,"icon":171},"Contact & Support","\u002Fgo-live\u002Fsupport","8.go-live\u002F2.support","i-lucide-life-buoy",{"title":173,"icon":174,"path":175,"stem":176,"children":177,"page":6},"Reference","i-lucide-book-marked","\u002Freference","9.reference",[178,183,188],{"title":179,"path":180,"stem":181,"icon":182},"Endpoint Catalog","\u002Freference\u002Fendpoints","9.reference\u002F1.endpoints","i-lucide-table",{"title":184,"path":185,"stem":186,"icon":187},"Code Samples (Node.js & PHP)","\u002Freference\u002Fcode-samples","9.reference\u002F2.code-samples","i-lucide-code",{"title":189,"path":190,"stem":191,"icon":192},"Status Values & Glossary","\u002Freference\u002Fglossary-states","9.reference\u002F3.glossary-states","i-lucide-book-a",{"id":194,"title":117,"badge":195,"body":196,"description":384,"extension":385,"links":195,"meta":386,"method":195,"navigation":387,"path":118,"seo":388,"stem":119,"__hash__":389},"docs_en\u002F6.webhooks\u002F1.overview.md",null,{"type":197,"value":198,"toc":376},"minimark",[199,208,212,238,249,254,275,278,300,303,323,333,340,360,367],[200,201,202,203,207],"p",{},"UnknownPay sends an HTTP ",[204,205,206],"strong",{},"POST"," to the URL you configure (your merchant endpoint) every time one of your deposits or withdrawals moves into an important terminal state. This lets your system reconcile orders in near real time — without polling.",[209,210],"placeholder-image",{"subject":211},"sequence diagram — customer transfers → UnknownPay matches\u002Fcredits → POST webhook to merchant endpoint → merchant returns 2xx → UnknownPay marks delivered",[213,214,215],"warning",{},[200,216,217,220,221,224,225,229,230,233,234,237],{},[204,218,219],{},"Money reminder:"," every money field on a webhook payload is a ",[204,222,223],{},"baht string with 2 decimals",", e.g. ",[226,227,228],"code",{},"\"100.50\""," (not a JSON number, not satang). Fields without a value yet (e.g. ",[226,231,232],{},"matched_amount"," before crediting) are ",[226,235,236],{},"null",".",[239,240,241],"note",{},[200,242,243,244,248],{},"You configure the URL + secret in the Portal — the detailed steps live in ",[245,246,247],"a",{"href":12},"Portal Preparation → Configure a webhook",". This group focuses on payload structure, signature verification, and retry behavior.",[250,251,253],"h2",{"id":252},"configure-a-webhook-in-the-portal","Configure a webhook (in the Portal)",[200,255,256,257,260,261,264,265,268,269,272,273,237],{},"Webhook configuration is done through the ",[204,258,259],{},"Portal"," (not the S2S API) — enter the ",[204,262,263],{},"destination URL"," + ",[204,266,267],{},"select the events to receive",". On a successful save the system issues a ",[204,270,271],{},"show-once signing secret","; keep it to verify the signature on every request. The detailed steps live in ",[245,274,247],{"href":12},[209,276],{"subject":277},"Portal page for configuring the webhook URL + checkboxes to select events + a Test button + a show-once secret box",[200,279,280,281,284,285,284,288,284,291,284,294,284,297,237],{},"The events you can subscribe to: ",[226,282,283],{},"deposit.success",", ",[226,286,287],{},"deposit.expired",[226,289,290],{},"withdrawal.success",[226,292,293],{},"withdrawal.rejected",[226,295,296],{},"withdrawal.failed",[226,298,299],{},"withdrawal.refunded",[200,301,302],{},"In the Portal you also get:",[304,305,306,317],"ul",{},[307,308,309,312,313,316],"li",{},[204,310,311],{},"Test button:"," sends a ",[226,314,315],{},"webhook.test"," event to your URL to confirm it is reachable.",[307,318,319,322],{},[204,320,321],{},"Delivery log \u002F replay:"," review past deliveries and re-send a failed event.",[200,324,325,326,284,328,330,331,237],{},"The next pages explain what each event's payload looks like, and how your endpoint must verify the signature and respond. See ",[245,327,121],{"href":122},[245,329,126],{"href":127},", and ",[245,332,130],{"href":131},[250,334,336,337,339],{"id":335},"the-webhooktest-event","The ",[226,338,315],{}," event",[200,341,336,342,345,346,349,350,352,353,356,357,237],{},[204,343,344],{},"\"Test\""," button in the Portal sends an event with ",[226,347,348],{},"event_type"," = ",[226,351,315],{},". It carries a minimal payload (",[226,354,355],{},"{\"event_id\":\"test\",\"event_type\":\"webhook.test\"}",") plus the header ",[226,358,359],{},"X-Webhook-Event-Id: test",[200,361,362,363,366],{},"It only confirms that your endpoint is ",[204,364,365],{},"reachable and returns 2xx"," — it is not a real event and carries no transaction data.",[239,368,369],{},[200,370,371,372,375],{},"You only receive events you have ",[204,373,374],{},"subscribed to"," — events you did not subscribe to are skipped (no POST, and not counted as a failure).",{"title":377,"searchDepth":378,"depth":379,"links":380},"",1,2,[381,382],{"id":252,"depth":379,"text":253},{"id":335,"depth":379,"text":383},"The webhook.test event","How UnknownPay notifies your server of terminal deposit and withdrawal states, and how to configure a webhook in the Portal","md",{},{"icon":61},{"title":117,"description":384},"41EAoI-9TCGQevh6msEoy2oob5OHQWwWzKcJfsFRWj0",[391,393],{"title":106,"path":107,"stem":108,"description":392,"icon":109,"children":-1},"Fetch the public bank master keyed by bank_code, used to set receiver_bank_provider on withdrawals",{"title":121,"path":122,"stem":123,"description":394,"icon":124,"children":-1},"Every webhook event UnknownPay actually sends, plus the shared payload fields and real JSON examples for deposits and withdrawals",1781891152608]