[{"data":1,"prerenderedAt":611},["ShallowReactive",2],{"navigation-en":3,"en:\u002Fbalance\u002Fget-balance":193,"en:\u002Fbalance\u002Fget-balance:surround":606},[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":102,"badge":195,"body":196,"description":599,"extension":600,"links":601,"meta":602,"method":601,"navigation":603,"path":103,"seo":604,"stem":104,"__hash__":605},"docs_en\u002F5.balance\u002F1.get-balance.md","GET",{"type":197,"value":198,"toc":592},"minimark",[199,206,214,232,237,270,274,345,367,371,453,457,537,541,588],[200,201,202],"p",{},[203,204,205],"code",{},"GET \u002Fv1\u002Fbalance",[200,207,208,209,213],{},"Use this to check ",[210,211,212],"strong",{},"your own merchant's"," wallet balance before creating a withdrawal — so you can confirm there are enough funds to cover the payout.",[215,216,217],"warning",{},[200,218,219,220,223,224,227,228,231],{},"Every money field on the wire is a ",[210,221,222],{},"string of baht with 2 decimals",", e.g. ",[203,225,226],{},"\"100.50\""," — not a JSON number and not satang. Always parse it as a decimal on your side; never use ",[203,229,230],{},"float"," to do money math.",[233,234,236],"h2",{"id":235},"endpoint","Endpoint",[238,239,240,249,259],"ul",{},[241,242,243,246,247],"li",{},[210,244,245],{},"Method \u002F Path:"," ",[203,248,205],{},[241,250,251,254,255,258],{},[210,252,253],{},"Auth:"," must go through S2S (API key + HMAC signature), the same as every other S2S endpoint — see ",[256,257,27],"a",{"href":28},".",[241,260,261,262,265,266,269],{},"The system derives the merchant ",[210,263,264],{},"only from the API key used to sign"," — it accepts ",[210,267,268],{},"no"," parameter identifying a merchant. You always get your own balance (own balance only).",[233,271,273],{"id":272},"response-fields","Response fields",[275,276,277,293],"table",{},[278,279,280],"thead",{},[281,282,283,287,290],"tr",{},[284,285,286],"th",{},"Field",[284,288,289],{},"Type",[284,291,292],{},"Description",[294,295,296,314,329],"tbody",{},[281,297,298,304,307],{},[299,300,301],"td",{},[203,302,303],{},"available",[299,305,306],{},"string (baht)",[299,308,309,310,313],{},"The amount ",[210,311,312],{},"actually usable"," — this is what you can withdraw.",[281,315,316,321,323],{},[299,317,318],{},[203,319,320],{},"pending",[299,322,306],{},[299,324,309,325,328],{},[210,326,327],{},"still held"," (in processing \u002F not yet usable). Not withdrawable yet.",[281,330,331,336,339],{},[299,332,333],{},[203,334,335],{},"currency",[299,337,338],{},"string",[299,340,341,342,258],{},"Currency — currently ",[203,343,344],{},"\"THB\"",[346,347,348],"caution",{},[200,349,350,352,353,355,356,359,360,362,363,366],{},[203,351,303],{}," and ",[203,354,320],{}," are baht strings, e.g. ",[203,357,358],{},"\"15000.00\"",". Before creating a withdrawal, verify that ",[203,361,303],{}," is ",[210,364,365],{},"greater than or equal to"," (the amount to withdraw + the fee).",[233,368,370],{"id":369},"example-request","Example request",[372,373,379],"pre",{"className":374,"code":375,"filename":376,"language":377,"meta":378,"style":378},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -X GET 'https:\u002F\u002Fapi.unkpay.co\u002Fv1\u002Fbalance' \\\n  -H 'X-Api-Key: unk_live_xxxxxxxxxxxx' \\\n  -H 'X-Timestamp: 1718790000' \\\n  -H 'X-Signature: \u003Chex hmac-sha256 over \"GET\\n\u002Fv1\u002Fbalance\\n1718790000\\nsha256(empty)\">'\n","cURL","bash","",[203,380,381,411,426,440],{"__ignoreMap":378},[382,383,386,390,394,397,401,404,407],"span",{"class":384,"line":385},"line",1,[382,387,389],{"class":388},"sBMFI","curl",[382,391,393],{"class":392},"sfazB"," -X",[382,395,396],{"class":392}," GET",[382,398,400],{"class":399},"sMK4o"," '",[382,402,403],{"class":392},"https:\u002F\u002Fapi.unkpay.co\u002Fv1\u002Fbalance",[382,405,406],{"class":399},"'",[382,408,410],{"class":409},"sTEyZ"," \\\n",[382,412,414,417,419,422,424],{"class":384,"line":413},2,[382,415,416],{"class":392},"  -H",[382,418,400],{"class":399},[382,420,421],{"class":392},"X-Api-Key: unk_live_xxxxxxxxxxxx",[382,423,406],{"class":399},[382,425,410],{"class":409},[382,427,429,431,433,436,438],{"class":384,"line":428},3,[382,430,416],{"class":392},[382,432,400],{"class":399},[382,434,435],{"class":392},"X-Timestamp: 1718790000",[382,437,406],{"class":399},[382,439,410],{"class":409},[382,441,443,445,447,450],{"class":384,"line":442},4,[382,444,416],{"class":392},[382,446,400],{"class":399},[382,448,449],{"class":392},"X-Signature: \u003Chex hmac-sha256 over \"GET\\n\u002Fv1\u002Fbalance\\n1718790000\\nsha256(empty)\">",[382,451,452],{"class":399},"'\n",[233,454,456],{"id":455},"example-response-200-ok","Example response (200 OK)",[372,458,462],{"className":459,"code":460,"language":461,"meta":378,"style":378},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"available\": \"15000.00\",\n  \"pending\": \"2500.50\",\n  \"currency\": \"THB\"\n}\n","json",[203,463,464,469,494,513,531],{"__ignoreMap":378},[382,465,466],{"class":384,"line":385},[382,467,468],{"class":399},"{\n",[382,470,471,474,477,480,483,486,489,491],{"class":384,"line":413},[382,472,473],{"class":399},"  \"",[382,475,303],{"class":476},"spNyl",[382,478,479],{"class":399},"\"",[382,481,482],{"class":399},":",[382,484,485],{"class":399}," \"",[382,487,488],{"class":392},"15000.00",[382,490,479],{"class":399},[382,492,493],{"class":399},",\n",[382,495,496,498,500,502,504,506,509,511],{"class":384,"line":428},[382,497,473],{"class":399},[382,499,320],{"class":476},[382,501,479],{"class":399},[382,503,482],{"class":399},[382,505,485],{"class":399},[382,507,508],{"class":392},"2500.50",[382,510,479],{"class":399},[382,512,493],{"class":399},[382,514,515,517,519,521,523,525,528],{"class":384,"line":442},[382,516,473],{"class":399},[382,518,335],{"class":476},[382,520,479],{"class":399},[382,522,482],{"class":399},[382,524,485],{"class":399},[382,526,527],{"class":392},"THB",[382,529,530],{"class":399},"\"\n",[382,532,534],{"class":384,"line":533},5,[382,535,536],{"class":399},"}\n",[233,538,540],{"id":539},"errors","Errors",[275,542,543,556],{},[278,544,545],{},[281,546,547,550,553],{},[284,548,549],{},"HTTP",[284,551,552],{},"Code",[284,554,555],{},"When",[294,557,558,573],{},[281,559,560,563,568],{},[299,561,562],{},"401",[299,564,565],{},[203,566,567],{},"UNAUTHORIZED",[299,569,570,571,258],{},"Missing\u002Finvalid signature, API key, or timestamp — see ",[256,572,27],{"href":28},[281,574,575,578,583],{},[299,576,577],{},"403",[299,579,580],{},[203,581,582],{},"IP_NOT_ALLOWED",[299,584,585,586,258],{},"The calling IP is not on your allowlist — see ",[256,587,32],{"href":33},[589,590,591],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"title":378,"searchDepth":385,"depth":413,"links":593},[594,595,596,597,598],{"id":235,"depth":413,"text":236},{"id":272,"depth":413,"text":273},{"id":369,"depth":413,"text":370},{"id":455,"depth":413,"text":456},{"id":539,"depth":413,"text":540},"Check your merchant wallet balance (available + pending) before creating a withdrawal","md",null,{},{"icon":97},{"title":102,"description":599},"nuLaiHlLlCrogAVfOUVX0m6uKiKWhuWmO8jipMPO9JA",[607,609],{"title":92,"path":93,"stem":94,"description":608,"icon":71,"children":-1},"GET \u002Fv1\u002Fwithdrawals\u002F:id to get one (caller-scoped) and GET \u002Fv1\u002Fwithdrawals to list your own withdrawals",{"title":106,"path":107,"stem":108,"description":610,"icon":109,"children":-1},"Fetch the public bank master keyed by bank_code, used to set receiver_bank_provider on withdrawals",1781891154831]