[{"data":1,"prerenderedAt":835},["ShallowReactive",2],{"navigation-en":3,"en:\u002Fsandbox\u002Fsimulate-transfer":193,"en:\u002Fsandbox\u002Fsimulate-transfer:surround":830},[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":144,"badge":195,"body":196,"description":823,"extension":824,"links":825,"meta":826,"method":825,"navigation":827,"path":145,"seo":828,"stem":146,"__hash__":829},"docs_en\u002F7.sandbox\u002F2.simulate-transfer.md","POST",{"type":197,"value":198,"toc":815},"minimark",[199,206,246,255,279,288,397,417,426,537,548,552,670,674,811],[200,201,202],"p",{},[203,204,205],"code",{},"POST \u002Fv1\u002Ftest\u002Fsimulate-transfer",[200,207,208,209,212,213,217,218,221,222,225,226,229,230,233,234,237,238,241,242,245],{},"Test mode only — requires HMAC + ",[203,210,211],{},"Idempotency-Key",". This simulates ",[214,215,216],"strong",{},"money arriving on the account of a deposit that is PENDING",". The system injects a test ",[203,219,220],{},"bank_transaction"," (mode ",[203,223,224],{},"test",", ",[203,227,228],{},"bank_txn_id"," prefixed ",[203,231,232],{},"test_",") into the ",[214,235,236],{},"real code path",", then lets the ",[214,239,240],{},"real matcher"," run asynchronously to decide the result (match → credit → fires the ",[203,243,244],{},"deposit.success"," webhook).",[200,247,248,249,254],{},"It returns ",[214,250,251],{},[203,252,253],{},"202 Accepted"," immediately (meaning \"injected\" — the match\u002Fcredit happens afterward, asynchronously).",[256,257,258],"caution",{},[200,259,260,261,264,265,268,269,271,272,274,275,278],{},"A ",[203,262,263],{},"202"," does ",[214,266,267],{},"not"," mean the deposit was credited. The real outcome arrives only via the terminal ",[203,270,244],{}," webhook — never treat the ",[203,273,263],{}," ",[203,276,277],{},"injected"," response as success.",[280,281,283,284,287],"h2",{"id":282},"request-body-simreq","Request body (",[203,285,286],{},"SimReq",")",[289,290,291,310],"table",{},[292,293,294],"thead",{},[295,296,297,301,304,307],"tr",{},[298,299,300],"th",{},"field",[298,302,303],{},"type",[298,305,306],{},"required",[298,308,309],{},"description",[311,312,313,336,355,369,383],"tbody",{},[295,314,315,321,324,329],{},[316,317,318],"td",{},[203,319,320],{},"deposit_id",[316,322,323],{},"string",[316,325,326],{},[214,327,328],{},"yes",[316,330,331,332,335],{},"id of your own test deposit in status ",[203,333,334],{},"PENDING",".",[295,337,338,343,346,349],{},[316,339,340],{},[203,341,342],{},"amount",[316,344,345],{},"string (baht)",[316,347,348],{},"no",[316,350,351,352,335],{},"Override the amount (omit → use the exact amount the deposit expects → matches); a non-matching amount drives ",[203,353,354],{},"AMOUNT_MISMATCH",[295,356,357,362,364,366],{},[316,358,359],{},[203,360,361],{},"sender_bank",[316,363,323],{},[316,365,348],{},[316,367,368],{},"The payer's bank — must match the declared payer, otherwise the matcher decides it is a mismatch.",[295,370,371,376,378,380],{},[316,372,373],{},[203,374,375],{},"sender_name",[316,377,323],{},[316,379,348],{},[316,381,382],{},"Sender name.",[295,384,385,390,392,394],{},[316,386,387],{},[203,388,389],{},"sender_account",[316,391,323],{},[316,393,348],{},[316,395,396],{},"Sender account number.",[398,399,400],"tip",{},[200,401,402,405,406,409,410,413,414,416],{},[214,403,404],{},"To get the deposit credited:"," send ",[203,407,408],{},"sender_*"," matching ",[214,411,412],{},"the payer declared when the deposit was created",", and leave ",[203,415,342],{}," empty (so the exact expected amount is used). Every payment method must pass the same payer gate.",[280,418,420,421,225,423,287],{"id":419},"response-202-simresult","Response (",[203,422,263],{},[203,424,425],{},"SimResult",[427,428,433],"pre",{"className":429,"code":430,"language":431,"meta":432,"style":432},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"bank_txn_id\": \"test_8f1c2e9a-...\",\n  \"amount\": \"500.37\",\n  \"currency\": \"THB\",\n  \"status\": \"injected\"\n}\n","json","",[203,434,435,444,471,491,512,531],{"__ignoreMap":432},[436,437,440],"span",{"class":438,"line":439},"line",1,[436,441,443],{"class":442},"sMK4o","{\n",[436,445,447,450,453,456,459,462,466,468],{"class":438,"line":446},2,[436,448,449],{"class":442},"  \"",[436,451,228],{"class":452},"spNyl",[436,454,455],{"class":442},"\"",[436,457,458],{"class":442},":",[436,460,461],{"class":442}," \"",[436,463,465],{"class":464},"sfazB","test_8f1c2e9a-...",[436,467,455],{"class":442},[436,469,470],{"class":442},",\n",[436,472,474,476,478,480,482,484,487,489],{"class":438,"line":473},3,[436,475,449],{"class":442},[436,477,342],{"class":452},[436,479,455],{"class":442},[436,481,458],{"class":442},[436,483,461],{"class":442},[436,485,486],{"class":464},"500.37",[436,488,455],{"class":442},[436,490,470],{"class":442},[436,492,494,496,499,501,503,505,508,510],{"class":438,"line":493},4,[436,495,449],{"class":442},[436,497,498],{"class":452},"currency",[436,500,455],{"class":442},[436,502,458],{"class":442},[436,504,461],{"class":442},[436,506,507],{"class":464},"THB",[436,509,455],{"class":442},[436,511,470],{"class":442},[436,513,515,517,520,522,524,526,528],{"class":438,"line":514},5,[436,516,449],{"class":442},[436,518,519],{"class":452},"status",[436,521,455],{"class":442},[436,523,458],{"class":442},[436,525,461],{"class":442},[436,527,277],{"class":464},[436,529,530],{"class":442},"\"\n",[436,532,534],{"class":438,"line":533},6,[436,535,536],{"class":442},"}\n",[200,538,539,541,542,545,546,245],{},[203,540,519],{}," is always ",[203,543,544],{},"\"injected\""," (this is not the match result yet — the real result comes via the ",[203,547,244],{},[280,549,551],{"id":550},"errors","Errors",[289,553,554,566],{},[292,555,556],{},[295,557,558,561,564],{},[298,559,560],{},"Situation",[298,562,563],{},"HTTP",[298,565,203],{},[311,567,568,587,600,615,629,642,657],{},[295,569,570,575,578],{},[316,571,572,574],{},[203,573,320],{}," empty",[316,576,577],{},"422",[316,579,580,583,584,287],{},[203,581,582],{},"VALIDATION"," (",[203,585,586],{},"deposit_id is required",[295,588,589,592,595],{},[316,590,591],{},"deposit not found \u002F not yours \u002F wrong mode (incl. live key → 404)",[316,593,594],{},"404",[316,596,597],{},[203,598,599],{},"NOT_FOUND",[295,601,602,607,610],{},[316,603,604,605],{},"deposit is not in status ",[203,606,334],{},[316,608,609],{},"409",[316,611,612],{},[203,613,614],{},"DEPOSIT_NOT_PENDING",[295,616,617,622,624],{},[316,618,619,621],{},[203,620,342],{}," override malformed \u002F ≤ 0",[316,623,577],{},[316,625,626],{},[203,627,628],{},"INVALID_AMOUNT",[295,630,631,634,637],{},[316,632,633],{},"Missing\u002Finvalid signature, API key, or timestamp",[316,635,636],{},"401",[316,638,639],{},[203,640,641],{},"UNAUTHORIZED",[295,643,644,649,652],{},[316,645,646,647],{},"Missing ",[203,648,211],{},[316,650,651],{},"400",[316,653,654],{},[203,655,656],{},"IDEMPOTENCY_KEY_REQUIRED",[295,658,659,662,665],{},[316,660,661],{},"More than 60 calls\u002Fminute per merchant",[316,663,664],{},"429",[316,666,667],{},[203,668,669],{},"RATE_LIMITED",[280,671,673],{"id":672},"example-request","Example request",[427,675,680],{"className":676,"code":677,"filename":678,"language":679,"meta":432,"style":432},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -X POST https:\u002F\u002Fapi.unkpay.co\u002Fv1\u002Ftest\u002Fsimulate-transfer \\\n  -H \"X-Api-Key: unk_test_xxxxxxxxxxxxxxxx\" \\\n  -H \"X-Timestamp: 1718790000\" \\\n  -H \"X-Signature: \u003Chex hmac>\" \\\n  -H \"Idempotency-Key: sim-0001\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"deposit_id\": \"11111111-1111-4111-8111-111111111111\",\n    \"sender_bank\": \"KBANK\",\n    \"sender_name\": \"Payer Name\",\n    \"sender_account\": \"1234567890\"\n  }'\n","cURL","bash",[203,681,682,701,715,728,741,754,767,778,784,790,796,802],{"__ignoreMap":432},[436,683,684,688,691,694,697],{"class":438,"line":439},[436,685,687],{"class":686},"sBMFI","curl",[436,689,690],{"class":464}," -X",[436,692,693],{"class":464}," POST",[436,695,696],{"class":464}," https:\u002F\u002Fapi.unkpay.co\u002Fv1\u002Ftest\u002Fsimulate-transfer",[436,698,700],{"class":699},"sTEyZ"," \\\n",[436,702,703,706,708,711,713],{"class":438,"line":446},[436,704,705],{"class":464},"  -H",[436,707,461],{"class":442},[436,709,710],{"class":464},"X-Api-Key: unk_test_xxxxxxxxxxxxxxxx",[436,712,455],{"class":442},[436,714,700],{"class":699},[436,716,717,719,721,724,726],{"class":438,"line":473},[436,718,705],{"class":464},[436,720,461],{"class":442},[436,722,723],{"class":464},"X-Timestamp: 1718790000",[436,725,455],{"class":442},[436,727,700],{"class":699},[436,729,730,732,734,737,739],{"class":438,"line":493},[436,731,705],{"class":464},[436,733,461],{"class":442},[436,735,736],{"class":464},"X-Signature: \u003Chex hmac>",[436,738,455],{"class":442},[436,740,700],{"class":699},[436,742,743,745,747,750,752],{"class":438,"line":514},[436,744,705],{"class":464},[436,746,461],{"class":442},[436,748,749],{"class":464},"Idempotency-Key: sim-0001",[436,751,455],{"class":442},[436,753,700],{"class":699},[436,755,756,758,760,763,765],{"class":438,"line":533},[436,757,705],{"class":464},[436,759,461],{"class":442},[436,761,762],{"class":464},"Content-Type: application\u002Fjson",[436,764,455],{"class":442},[436,766,700],{"class":699},[436,768,770,773,776],{"class":438,"line":769},7,[436,771,772],{"class":464},"  -d",[436,774,775],{"class":442}," '",[436,777,443],{"class":464},[436,779,781],{"class":438,"line":780},8,[436,782,783],{"class":464},"    \"deposit_id\": \"11111111-1111-4111-8111-111111111111\",\n",[436,785,787],{"class":438,"line":786},9,[436,788,789],{"class":464},"    \"sender_bank\": \"KBANK\",\n",[436,791,793],{"class":438,"line":792},10,[436,794,795],{"class":464},"    \"sender_name\": \"Payer Name\",\n",[436,797,799],{"class":438,"line":798},11,[436,800,801],{"class":464},"    \"sender_account\": \"1234567890\"\n",[436,803,805,808],{"class":438,"line":804},12,[436,806,807],{"class":464},"  }",[436,809,810],{"class":442},"'\n",[812,813,814],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}",{"title":432,"searchDepth":439,"depth":446,"links":816},[817,819,821,822],{"id":282,"depth":446,"text":818},"Request body (SimReq)",{"id":419,"depth":446,"text":820},"Response (202, SimResult)",{"id":550,"depth":446,"text":551},{"id":672,"depth":446,"text":673},"Inject a simulated bank transfer into a PENDING test deposit to drive the real matcher and a deposit.success webhook","md",null,{},{"icon":147},{"title":144,"description":823},"cGwaNB4bQXiRrLifZjfY4B8pM05I3GD8IJuPTPwunuM",[831,833],{"title":140,"path":141,"stem":142,"description":832,"icon":61,"children":-1},"Sandbox \u002F Test Mode works Stripe-style — same business endpoints, signed with a test key, on a fully isolated test ledger",{"title":149,"path":150,"stem":151,"description":834,"icon":152,"children":-1},"Credit your test balance and wipe your own test data — two sandbox-only triggers",1781891157310]