// Node 18+const key = require("crypto").randomUUID(); // store it with your order so a retry reuses itconst res = await fetch("https://orders.balaipedia.com/v1/orders", { method: "POST", headers: { "Authorization": "Bearer " + process.env.BP_API_KEY, "Content-Type": "application/json", "Idempotency-Key": key }, body: JSON.stringify({ email: "[email protected]", name: "Budi", lang: "en", reference: "ORD-10293" })});const text = await res.text();let data = null;try { data = JSON.parse(text); } catch (e) {} // a 5xx from the platform may not be JSONif (res.status === 201) { /* save data.id with your own order */ }else if (res.status >= 500 || data === null) { /* retry later with the SAME key */ }else { /* data.error.code tells you what to fix */ }
<?php$ch = curl_init("https://orders.balaipedia.com/v1/orders");curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("BP_API_KEY"), "Content-Type: application/json", "Idempotency-Key: " . $key, // e.g. a UUID you stored with your order ], CURLOPT_POSTFIELDS => json_encode(["email" => "[email protected]", "name" => "Budi", "lang" => "en", "reference" => "ORD-10293"]),]);$body = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);$data = json_decode((string)$body, true); // null when the body is not JSON (retry with the same key)
import os, uuid, requestskey = str(uuid.uuid4()) # store it with your order so a retry reuses itr = requests.post( "https://orders.balaipedia.com/v1/orders", headers={"Authorization": "Bearer " + os.environ["BP_API_KEY"], "Idempotency-Key": key}, json={"email": "[email protected]", "name": "Budi", "lang": "en", "reference": "ORD-10293"}, timeout=30,)try: data = r.json()except ValueError: data = None # a 5xx from the platform may not be JSON: retry with the same key
{"error":{"code":"email_rejected","message":"The email address was rejected by validation. No credit was charged.","reason":"mailbox_full","note":"The recipient's mailbox is full.","request_id":"req_..."}}
// Node 18+const key = require("crypto").randomUUID(); // store it with your order so a retry reuses itconst res = await fetch("https://orders.balaipedia.com/v1/orders", { method: "POST", headers: { "Authorization": "Bearer " + process.env.BP_API_KEY, "Content-Type": "application/json", "Idempotency-Key": key }, body: JSON.stringify({ email: "[email protected]", name: "Budi", lang: "en", reference: "ORD-10293" })});const text = await res.text();let data = null;try { data = JSON.parse(text); } catch (e) {} // a 5xx from the platform may not be JSONif (res.status === 201) { /* save data.id with your own order */ }else if (res.status >= 500 || data === null) { /* retry later with the SAME key */ }else { /* data.error.code tells you what to fix */ }
<?php$ch = curl_init("https://orders.balaipedia.com/v1/orders");curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("BP_API_KEY"), "Content-Type: application/json", "Idempotency-Key: " . $key, // e.g. a UUID you stored with your order ], CURLOPT_POSTFIELDS => json_encode(["email" => "[email protected]", "name" => "Budi", "lang" => "en", "reference" => "ORD-10293"]),]);$body = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);$data = json_decode((string)$body, true); // null when the body is not JSON (retry with the same key)
import os, uuid, requestskey = str(uuid.uuid4()) # store it with your order so a retry reuses itr = requests.post( "https://orders.balaipedia.com/v1/orders", headers={"Authorization": "Bearer " + os.environ["BP_API_KEY"], "Idempotency-Key": key}, json={"email": "[email protected]", "name": "Budi", "lang": "en", "reference": "ORD-10293"}, timeout=30,)try: data = r.json()except ValueError: data = None # a 5xx from the platform may not be JSON: retry with the same key
{"error":{"code":"email_rejected","message":"The email address was rejected by validation. No credit was charged.","reason":"mailbox_full","note":"The recipient's mailbox is full.","request_id":"req_..."}}
Headers: Authorization and Content-Type: application/json (required), and Idempotency-Key (optional, recommended).
The Idempotency-Key header is optional, but we strongly recommend sending it on every POST /orders so the same order is never created twice. When a request times out or the connection drops you cannot know whether the order was created. Repeat the request with the same key and the same email: you get the same order back (header Idempotent-Replayed: true) and are never charged twice. Keys are remembered for 24 hours. Reusing a key with a different email returns 422 idempotency_conflict.
Without the header the request still works and the duplicate-email check (409 duplicate_order) still applies, but we cannot recognise a retry as the same request. In particular, retrying a timed-out request that has allow_duplicate: true and no key can create and charge a second order.
Headers
string
Optional, recommended. 8-64 characters (letters, digits, _ . : -), for example a UUID. Prevents the same order from being created twice when you retry. Store it with your order so a retry reuses it.
Body
string
required
Buyer’s email. One address per order.
string
Optional. Used in the greeting (max 60 chars).
string
default:"en"
"en" | "id". Language of the email sent to the buyer: English or Indonesian. Default "en". Any other value is rejected with 400. This is independent of your account currency.
string
Your own order reference (max 64). Returned in responses and webhooks; searchable via the list endpoint.
boolean
true or false only. By default an email that received an invitation in the last 30 days is refused with 409. Set true to send again (charged). Re-sending is only allowed when the earlier invitation was one of your own orders; otherwise it is still refused with 409.
Response
Returns the order object with status 201 Created, plus balance: your balance after the charge.
Rejected by validation, 422 (nothing charged)
{"error":{"code":"email_rejected","message":"The email address was rejected by validation. No credit was charged.","reason":"mailbox_full","note":"The recipient's mailbox is full.","request_id":"req_..."}}
reason is a stable code you can branch on; note is a short human-readable explanation you can log or show.
reason
Meaning
invalid_format
Not a valid email format.
typo_domain
Likely typo in the domain; suggestion may contain the corrected address.
domain_no_mail
Domain does not exist or does not accept email.
mailbox_not_found
The mailbox does not exist.
mailbox_full
The recipient’s inbox is full.
disposable_email
Temporary / disposable email service.
address_undeliverable
This address previously failed or is on our block list.
high_risk
Flagged as risky (spam trap, abuse, do-not-mail).
invalid_email
Other validation failure.
Other failure responses
Every failure uses the same body, {"error":{"code","message","request_id"}}. Branch on code, not on message. A failed request never creates an order. Credit is charged only on 201.
HTTP
code
Example body
What to do
400
invalid_request
{"error":{"code":"invalid_request","message":"Only one email address per order.","request_id":"req_..."}}
One email per request: no bulk, no list, and no comma-, semicolon- or space-separated addresses. Other messages: "email" is required., "email" must be a string., "lang" must be "id" or "en"., "allow_duplicate" must be a boolean., Request body must be a JSON object., Idempotency-Key must be 8-64 chars (letters, digits, _ . : -). Fix the request, do not retry unchanged.
400
invalid_json
{"error":{"code":"invalid_json","message":"Request body must be valid JSON.","request_id":"req_..."}}
Send valid JSON with Content-Type: application/json.
401
unauthorized
{"error":{"code":"unauthorized","message":"Missing or invalid API key.","request_id":"req_..."}}
Check the Authorization: Bearer ... header and the key.
402
insufficient_credit
{"error":{"code":"insufficient_credit","message":"Your credit balance is too low for this order.","balance":0,"required":0.15,"currency":"USD","request_id":"req_..."}}
Top up, then send the request again. Nothing was charged.
409
duplicate_order
{"error":{"code":"duplicate_order","message":"This email already received an invitation recently. Set \"allow_duplicate\": true to send again (charged).","request_id":"req_..."}}
The same email was ordered recently. Send "allow_duplicate": true only if you really want to send (and be charged) again. Some duplicates cannot be re-sent at all and need support.
409
request_in_progress
{"error":{"code":"request_in_progress","message":"A request with this Idempotency-Key is still being processed.","request_id":"req_..."}}
Wait a few seconds and send the same request with the same key again.
422
email_rejected
see above
Not charged. Ask the buyer for a correct address.
422
idempotency_conflict
{"error":{"code":"idempotency_conflict","message":"This Idempotency-Key was already used with a different email.","request_id":"req_..."}}
Use a new key for a different email.
429
rate_limited
{"error":{"code":"rate_limited","message":"Too many requests. Slow down.","request_id":"req_..."}}
Wait for the number of seconds in the Retry-After header, then retry.
503
temporarily_unavailable
{"error":{"code":"temporarily_unavailable","message":"We could not process this order right now. No credit was charged. Please retry shortly.","request_id":"req_..."}}
Header Retry-After: 30. Retry after that, with the same Idempotency-Key if you sent one.
Other statuses (403, 404, 405, 413, 500) are listed under Errors.
// Node 18+const key = require("crypto").randomUUID(); // store it with your order so a retry reuses itconst res = await fetch("https://orders.balaipedia.com/v1/orders", { method: "POST", headers: { "Authorization": "Bearer " + process.env.BP_API_KEY, "Content-Type": "application/json", "Idempotency-Key": key }, body: JSON.stringify({ email: "[email protected]", name: "Budi", lang: "en", reference: "ORD-10293" })});const text = await res.text();let data = null;try { data = JSON.parse(text); } catch (e) {} // a 5xx from the platform may not be JSONif (res.status === 201) { /* save data.id with your own order */ }else if (res.status >= 500 || data === null) { /* retry later with the SAME key */ }else { /* data.error.code tells you what to fix */ }
<?php$ch = curl_init("https://orders.balaipedia.com/v1/orders");curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("BP_API_KEY"), "Content-Type: application/json", "Idempotency-Key: " . $key, // e.g. a UUID you stored with your order ], CURLOPT_POSTFIELDS => json_encode(["email" => "[email protected]", "name" => "Budi", "lang" => "en", "reference" => "ORD-10293"]),]);$body = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);$data = json_decode((string)$body, true); // null when the body is not JSON (retry with the same key)
import os, uuid, requestskey = str(uuid.uuid4()) # store it with your order so a retry reuses itr = requests.post( "https://orders.balaipedia.com/v1/orders", headers={"Authorization": "Bearer " + os.environ["BP_API_KEY"], "Idempotency-Key": key}, json={"email": "[email protected]", "name": "Budi", "lang": "en", "reference": "ORD-10293"}, timeout=30,)try: data = r.json()except ValueError: data = None # a 5xx from the platform may not be JSON: retry with the same key
{"error":{"code":"email_rejected","message":"The email address was rejected by validation. No credit was charged.","reason":"mailbox_full","note":"The recipient's mailbox is full.","request_id":"req_..."}}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Balai Pedia","colors":{"primary":"#F28C28","light":"#FF9A3C","dark":"#E8770F"},"logo":{"light":"https://mintcdn.com/balai-pedia/3rrJ_VL6yKbvbHlO/logo/balai-pedia-logo-cropped.svg?fit=max\u0026auto=format\u0026n=3rrJ_VL6yKbvbHlO\u0026q=85\u0026s=2fce9c07f0a1c46c7eddcf67990e3bb1","dark":"https://mintcdn.com/balai-pedia/3rrJ_VL6yKbvbHlO/logo/balai-pedia-logo-cropped.svg?fit=max\u0026auto=format\u0026n=3rrJ_VL6yKbvbHlO\u0026q=85\u0026s=2fce9c07f0a1c46c7eddcf67990e3bb1"},"favicon":"https://mintcdn.com/balai-pedia/ZM6rU4j8iv-UjOnH/logo/balai-pedia-icon.png?fit=max\u0026auto=format\u0026n=ZM6rU4j8iv-UjOnH\u0026q=85\u0026s=7f8088ec2978de2fd8bb74ad68c566c6","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://orders.balaipedia.com/v1"}},"navbar":{"primary":{"type":"button","label":"Support","href":"https://t.me/balaipedia"}},"footer":{"socials":{"telegram":"https://t.me/balaipedia"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"balai-pedia","hasAudioNarration":false,"actualSubdomain":"balai-pedia","customDomains":["docs.balaipedia.com"],"gitSource":{"type":"github","owner":"balaipedia","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6af716865cf549fb568ab3de"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af7d368fd6a4e5d222c4ccb","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"Webhook endpoints","count":4},{"language":"default","tag":"Getting Started","count":4},{"language":"default","tag":"Guides","count":4},{"language":"default","tag":"Orders","count":3},{"language":"default","tag":"Account","count":2},{"language":"default","tag":"Utility","count":1},{"language":"default","tag":"Telegram bot","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/create-order","slug":"/api-reference/create-order","pageMetadata":{"title":"Create order","description":"Create an order and send the invitation.","api":"POST https://orders.balaipedia.com/v1/orders","href":"/api-reference/create-order"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create an order and send the invitation.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Headers: `,_jsx(_components.code,{children:`Authorization`}),` and `,_jsx(_components.code,{children:`Content-Type: application/json`}),` (required), and `,_jsx(_components.code,{children:`Idempotency-Key`}),` (optional, recommended).`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`Idempotency-Key`}),` header is optional, but we strongly recommend sending it on every `,_jsx(_components.code,{children:`POST /orders`}),` so the same order is never created twice. When a request times out or the connection drops you cannot know whether the order was created. Repeat the request with the same key and the same email: you get the same order back (header `,_jsx(_components.code,{children:`Idempotent-Replayed: true`}),`) and are never charged twice. Keys are remembered for 24 hours. Reusing a key with a different email returns `,_jsx(_components.code,{children:`422 idempotency_conflict`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Without the header the request still works and the duplicate-email check (`,_jsx(_components.code,{children:`409 duplicate_order`}),`) still applies, but we cannot recognise a retry as the same request. In particular, retrying a timed-out request that has `,_jsx(_components.code,{children:`allow_duplicate: true`}),` and no key can create and charge a second order.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Idempotency-Key`,type:`string`,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`Optional, recommended. 8-64 characters (letters, digits, `,_jsx(_components.code,{children:`_ . : -`}),`), for example a UUID. Prevents the same order from being created twice when you retry. Store it with your order so a retry reuses it.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`Buyer’s email. One address per order.`})}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`Optional. Used in the greeting (max 60 chars).`})}),`\n`,_jsx(ParamField,{body:`lang`,type:`string`,default:`en`,id:`param-lang`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"en\"`}),` | `,_jsx(_components.code,{children:`\"id\"`}),`. Language of the email sent to the buyer: English or Indonesian. Default `,_jsx(_components.code,{children:`\"en\"`}),`. Any other value is rejected with `,_jsx(_components.code,{children:`400`}),`. This is independent of your account currency.`]})}),`\n`,_jsx(ParamField,{body:`reference`,type:`string`,id:`param-reference`,children:_jsx(_components.p,{children:`Your own order reference (max 64). Returned in responses and webhooks; searchable via the list endpoint.`})}),`\n`,_jsx(ParamField,{body:`allow_duplicate`,type:`boolean`,id:`param-allow-duplicate`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` or `,_jsx(_components.code,{children:`false`}),` only. By default an email that received an invitation in the last 30 days is refused with `,_jsx(_components.code,{children:`409`}),`. Set true to send again (charged). Re-sending is only allowed when the earlier invitation was one of your own orders; otherwise it is still refused with `,_jsx(_components.code,{children:`409`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns the `,_jsx(_components.a,{href:`/api-reference/get-order#the-order-object`,children:`order object`}),` with status `,_jsx(_components.code,{children:`201 Created`}),`, plus `,_jsx(_components.code,{children:`balance`}),`: your balance after the charge.`]}),`\n`,_jsxs(Heading,{level:`2`,id:`rejected-by-validation-422-nothing-charged`,children:[`Rejected by validation, `,_jsx(_components.code,{children:`422`}),` (nothing charged)`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"email_rejected\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The email address was rejected by validation. No credit was charged.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mailbox_full\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"note\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The recipient's mailbox is full.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`reason`}),` is a stable code you can branch on; `,_jsx(_components.code,{children:`note`}),` is a short human-readable explanation you can log or show.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`reason`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_format`})}),_jsx(_components.td,{children:`Not a valid email format.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`typo_domain`})}),_jsxs(_components.td,{children:[`Likely typo in the domain; `,_jsx(_components.code,{children:`suggestion`}),` may contain the corrected address.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`domain_no_mail`})}),_jsx(_components.td,{children:`Domain does not exist or does not accept email.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mailbox_not_found`})}),_jsx(_components.td,{children:`The mailbox does not exist.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mailbox_full`})}),_jsx(_components.td,{children:`The recipient’s inbox is full.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`disposable_email`})}),_jsx(_components.td,{children:`Temporary / disposable email service.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`address_undeliverable`})}),_jsx(_components.td,{children:`This address previously failed or is on our block list.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`high_risk`})}),_jsx(_components.td,{children:`Flagged as risky (spam trap, abuse, do-not-mail).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_email`})}),_jsx(_components.td,{children:`Other validation failure.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`other-failure-responses`,children:`Other failure responses`}),`\n`,_jsxs(_components.p,{children:[`Every failure uses the same body, `,_jsx(_components.code,{children:`{\"error\":{\"code\",\"message\",\"request_id\"}}`}),`. Branch on `,_jsx(_components.code,{children:`code`}),`, not on `,_jsx(_components.code,{children:`message`}),`. A failed request never creates an order. Credit is charged only on `,_jsx(_components.code,{children:`201`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`code`}),_jsx(_components.th,{children:`Example body`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_request`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"invalid_request\",\"message\":\"Only one email address per order.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`One email per request: no bulk, no list, and no comma-, semicolon- or space-separated addresses. Other messages: `,_jsx(_components.code,{children:`\"email\" is required.`}),`, `,_jsx(_components.code,{children:`\"email\" must be a string.`}),`, `,_jsx(_components.code,{children:`\"lang\" must be \"id\" or \"en\".`}),`, `,_jsx(_components.code,{children:`\"allow_duplicate\" must be a boolean.`}),`, `,_jsx(_components.code,{children:`Request body must be a JSON object.`}),`, `,_jsx(_components.code,{children:`Idempotency-Key must be 8-64 chars (letters, digits, _ . : -).`}),` Fix the request, do not retry unchanged.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_json`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"invalid_json\",\"message\":\"Request body must be valid JSON.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`Send valid JSON with `,_jsx(_components.code,{children:`Content-Type: application/json`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unauthorized`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"unauthorized\",\"message\":\"Missing or invalid API key.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`Check the `,_jsx(_components.code,{children:`Authorization: Bearer ...`}),` header and the key.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`402`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`insufficient_credit`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"insufficient_credit\",\"message\":\"Your credit balance is too low for this order.\",\"balance\":0,\"required\":0.15,\"currency\":\"USD\",\"request_id\":\"req_...\"}}`})}),_jsx(_components.td,{children:`Top up, then send the request again. Nothing was charged.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`duplicate_order`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"duplicate_order\",\"message\":\"This email already received an invitation recently. Set \\\\\"allow_duplicate\\\\\": true to send again (charged).\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`The same email was ordered recently. Send `,_jsx(_components.code,{children:`\"allow_duplicate\": true`}),` only if you really want to send (and be charged) again. Some duplicates cannot be re-sent at all and need support.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`request_in_progress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"request_in_progress\",\"message\":\"A request with this Idempotency-Key is still being processed.\",\"request_id\":\"req_...\"}}`})}),_jsx(_components.td,{children:`Wait a few seconds and send the same request with the same key again.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`email_rejected`})}),_jsx(_components.td,{children:`see above`}),_jsx(_components.td,{children:`Not charged. Ask the buyer for a correct address.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`idempotency_conflict`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"idempotency_conflict\",\"message\":\"This Idempotency-Key was already used with a different email.\",\"request_id\":\"req_...\"}}`})}),_jsx(_components.td,{children:`Use a new key for a different email.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`rate_limited`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"rate_limited\",\"message\":\"Too many requests. Slow down.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`Wait for the number of seconds in the `,_jsx(_components.code,{children:`Retry-After`}),` header, then retry.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`temporarily_unavailable`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"temporarily_unavailable\",\"message\":\"We could not process this order right now. No credit was charged. Please retry shortly.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`Header `,_jsx(_components.code,{children:`Retry-After: 30`}),`. Retry after that, with the same `,_jsx(_components.code,{children:`Idempotency-Key`}),` if you sent one.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Other statuses (`,_jsx(_components.code,{children:`403`}),`, `,_jsx(_components.code,{children:`404`}),`, `,_jsx(_components.code,{children:`405`}),`, `,_jsx(_components.code,{children:`413`}),`, `,_jsx(_components.code,{children:`500`}),`) are listed under `,_jsx(_components.a,{href:`/errors`,children:`Errors`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create order","description":"Create an order and send the invitation.","api":"POST https://orders.balaipedia.com/v1/orders","href":"/api-reference/create-order"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,RequestExample,ResponseExample,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Headers: `,_jsx(_components.code,{children:`Authorization`}),` and `,_jsx(_components.code,{children:`Content-Type: application/json`}),` (required), and `,_jsx(_components.code,{children:`Idempotency-Key`}),` (optional, recommended).`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`Idempotency-Key`}),` header is optional, but we strongly recommend sending it on every `,_jsx(_components.code,{children:`POST /orders`}),` so the same order is never created twice. When a request times out or the connection drops you cannot know whether the order was created. Repeat the request with the same key and the same email: you get the same order back (header `,_jsx(_components.code,{children:`Idempotent-Replayed: true`}),`) and are never charged twice. Keys are remembered for 24 hours. Reusing a key with a different email returns `,_jsx(_components.code,{children:`422 idempotency_conflict`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Without the header the request still works and the duplicate-email check (`,_jsx(_components.code,{children:`409 duplicate_order`}),`) still applies, but we cannot recognise a retry as the same request. In particular, retrying a timed-out request that has `,_jsx(_components.code,{children:`allow_duplicate: true`}),` and no key can create and charge a second order.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Idempotency-Key`,type:`string`,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`Optional, recommended. 8-64 characters (letters, digits, `,_jsx(_components.code,{children:`_ . : -`}),`), for example a UUID. Prevents the same order from being created twice when you retry. Store it with your order so a retry reuses it.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`Buyer’s email. One address per order.`})}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`Optional. Used in the greeting (max 60 chars).`})}),`\n`,_jsx(ParamField,{body:`lang`,type:`string`,default:`en`,id:`param-lang`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"en\"`}),` | `,_jsx(_components.code,{children:`\"id\"`}),`. Language of the email sent to the buyer: English or Indonesian. Default `,_jsx(_components.code,{children:`\"en\"`}),`. Any other value is rejected with `,_jsx(_components.code,{children:`400`}),`. This is independent of your account currency.`]})}),`\n`,_jsx(ParamField,{body:`reference`,type:`string`,id:`param-reference`,children:_jsx(_components.p,{children:`Your own order reference (max 64). Returned in responses and webhooks; searchable via the list endpoint.`})}),`\n`,_jsx(ParamField,{body:`allow_duplicate`,type:`boolean`,id:`param-allow-duplicate`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` or `,_jsx(_components.code,{children:`false`}),` only. By default an email that received an invitation in the last 30 days is refused with `,_jsx(_components.code,{children:`409`}),`. Set true to send again (charged). Re-sending is only allowed when the earlier invitation was one of your own orders; otherwise it is still refused with `,_jsx(_components.code,{children:`409`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns the `,_jsx(_components.a,{href:`/api-reference/get-order#the-order-object`,children:`order object`}),` with status `,_jsx(_components.code,{children:`201 Created`}),`, plus `,_jsx(_components.code,{children:`balance`}),`: your balance after the charge.`]}),`\n`,_jsxs(Heading,{level:`2`,id:`rejected-by-validation-422-nothing-charged`,children:[`Rejected by validation, `,_jsx(_components.code,{children:`422`}),` (nothing charged)`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"email_rejected\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The email address was rejected by validation. No credit was charged.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mailbox_full\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"note\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The recipient's mailbox is full.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`reason`}),` is a stable code you can branch on; `,_jsx(_components.code,{children:`note`}),` is a short human-readable explanation you can log or show.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`reason`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_format`})}),_jsx(_components.td,{children:`Not a valid email format.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`typo_domain`})}),_jsxs(_components.td,{children:[`Likely typo in the domain; `,_jsx(_components.code,{children:`suggestion`}),` may contain the corrected address.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`domain_no_mail`})}),_jsx(_components.td,{children:`Domain does not exist or does not accept email.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mailbox_not_found`})}),_jsx(_components.td,{children:`The mailbox does not exist.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mailbox_full`})}),_jsx(_components.td,{children:`The recipient’s inbox is full.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`disposable_email`})}),_jsx(_components.td,{children:`Temporary / disposable email service.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`address_undeliverable`})}),_jsx(_components.td,{children:`This address previously failed or is on our block list.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`high_risk`})}),_jsx(_components.td,{children:`Flagged as risky (spam trap, abuse, do-not-mail).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_email`})}),_jsx(_components.td,{children:`Other validation failure.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`other-failure-responses`,children:`Other failure responses`}),`\n`,_jsxs(_components.p,{children:[`Every failure uses the same body, `,_jsx(_components.code,{children:`{\"error\":{\"code\",\"message\",\"request_id\"}}`}),`. Branch on `,_jsx(_components.code,{children:`code`}),`, not on `,_jsx(_components.code,{children:`message`}),`. A failed request never creates an order. Credit is charged only on `,_jsx(_components.code,{children:`201`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`code`}),_jsx(_components.th,{children:`Example body`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_request`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"invalid_request\",\"message\":\"Only one email address per order.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`One email per request: no bulk, no list, and no comma-, semicolon- or space-separated addresses. Other messages: `,_jsx(_components.code,{children:`\"email\" is required.`}),`, `,_jsx(_components.code,{children:`\"email\" must be a string.`}),`, `,_jsx(_components.code,{children:`\"lang\" must be \"id\" or \"en\".`}),`, `,_jsx(_components.code,{children:`\"allow_duplicate\" must be a boolean.`}),`, `,_jsx(_components.code,{children:`Request body must be a JSON object.`}),`, `,_jsx(_components.code,{children:`Idempotency-Key must be 8-64 chars (letters, digits, _ . : -).`}),` Fix the request, do not retry unchanged.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_json`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"invalid_json\",\"message\":\"Request body must be valid JSON.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`Send valid JSON with `,_jsx(_components.code,{children:`Content-Type: application/json`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`unauthorized`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"unauthorized\",\"message\":\"Missing or invalid API key.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`Check the `,_jsx(_components.code,{children:`Authorization: Bearer ...`}),` header and the key.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`402`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`insufficient_credit`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"insufficient_credit\",\"message\":\"Your credit balance is too low for this order.\",\"balance\":0,\"required\":0.15,\"currency\":\"USD\",\"request_id\":\"req_...\"}}`})}),_jsx(_components.td,{children:`Top up, then send the request again. Nothing was charged.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`duplicate_order`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"duplicate_order\",\"message\":\"This email already received an invitation recently. Set \\\\\"allow_duplicate\\\\\": true to send again (charged).\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`The same email was ordered recently. Send `,_jsx(_components.code,{children:`\"allow_duplicate\": true`}),` only if you really want to send (and be charged) again. Some duplicates cannot be re-sent at all and need support.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`request_in_progress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"request_in_progress\",\"message\":\"A request with this Idempotency-Key is still being processed.\",\"request_id\":\"req_...\"}}`})}),_jsx(_components.td,{children:`Wait a few seconds and send the same request with the same key again.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`email_rejected`})}),_jsx(_components.td,{children:`see above`}),_jsx(_components.td,{children:`Not charged. Ask the buyer for a correct address.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`422`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`idempotency_conflict`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"idempotency_conflict\",\"message\":\"This Idempotency-Key was already used with a different email.\",\"request_id\":\"req_...\"}}`})}),_jsx(_components.td,{children:`Use a new key for a different email.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`rate_limited`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"rate_limited\",\"message\":\"Too many requests. Slow down.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`Wait for the number of seconds in the `,_jsx(_components.code,{children:`Retry-After`}),` header, then retry.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`temporarily_unavailable`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{\"error\":{\"code\":\"temporarily_unavailable\",\"message\":\"We could not process this order right now. No credit was charged. Please retry shortly.\",\"request_id\":\"req_...\"}}`})}),_jsxs(_components.td,{children:[`Header `,_jsx(_components.code,{children:`Retry-After: 30`}),`. Retry after that, with the same `,_jsx(_components.code,{children:`Idempotency-Key`}),` if you sent one.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Other statuses (`,_jsx(_components.code,{children:`403`}),`, `,_jsx(_components.code,{children:`404`}),`, `,_jsx(_components.code,{children:`405`}),`, `,_jsx(_components.code,{children:`413`}),`, `,_jsx(_components.code,{children:`500`}),`) are listed under `,_jsx(_components.a,{href:`/errors`,children:`Errors`}),`.`]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`curl`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://orders.balaipedia.com/v1/orders`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: 6f1c2f7e-9a4b-4d0e-8f3a-1b2c3d4e5f60\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"email\":\"[email protected]\",\"name\":\"Budi\",\"lang\":\"en\",\"reference\":\"ORD-10293\"}'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`17`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Node 18+`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"crypto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// store it with your order so a retry reuses it`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://orders.balaipedia.com/v1/orders\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`BP_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` key`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"[email protected]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Budi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`lang:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reference:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ORD-10293\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {} `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// a 5xx from the platform may not be JSON`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 201`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) { `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* save data.id with your own order */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 500`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) { `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* retry later with the SAME key */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* data.error.code tells you what to fix */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`PHP`,numberOfLines:`16`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c?`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`php`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` curl_init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://orders.balaipedia.com/v1/orders\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`curl_setopt_array`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` CURLOPT_POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` CURLOPT_RETURNTRANSFER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` CURLOPT_TIMEOUT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 30`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` CURLOPT_HTTPHEADER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` getenv`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BP_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key: \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// e.g. a UUID you stored with your order`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` CURLOPT_POSTFIELDS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` json_encode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"email\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"[email protected]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Budi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lang\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"reference\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ORD-10293\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$body`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` curl_exec`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` curl_getinfo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CURLINFO_HTTP_CODE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` json_decode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// null when the body is not JSON (retry with the same key)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`11`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os, uuid, requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`key `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid.uuid4()) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# store it with your order so a retry reuses it`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`r `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://orders.balaipedia.com/v1/orders\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BP_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: key},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[email protected]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Budi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lang\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"reference\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-10293\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` r.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # a 5xx from the platform may not be JSON: retry with the same key`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`201 Created`,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BP-7K3M9QXA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"order\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[email protected]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reference\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-10293\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"processing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"note\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-12T03:10:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completed_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-12\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.15`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"refunded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"balance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`42.2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`422 Rejected`,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"email_rejected\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The email address was rejected by validation. No credit was charged.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mailbox_full\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"note\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The recipient's mailbox is full.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create order","description":"Create an order and send the invitation.","api":"POST https://orders.balaipedia.com/v1/orders","href":"/api-reference/create-order"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Rejected by validation, 422 (nothing charged)","slug":"rejected-by-validation-422-nothing-charged","depth":2,"children":[]},{"title":"Other failure responses","slug":"other-failure-responses","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"curl","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://orders.balaipedia.com/v1/orders\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer YOUR_KEY\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Idempotency-Key: 6f1c2f7e-9a4b-4d0e-8f3a-1b2c3d4e5f60\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\"email\":\"[email protected]\",\"name\":\"Budi\",\"lang\":\"en\",\"reference\":\"ORD-10293\"}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Node.js","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// Node 18+\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> key\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> require\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"crypto\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">).\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">randomUUID\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(); \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// store it with your order so a retry reuses it\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> res\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://orders.balaipedia.com/v1/orders\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Bearer \"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> +\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> process\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">BP_API_KEY\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Idempotency-Key\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> key\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({ \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">email:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"[email protected]\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">name:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Budi\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">lang:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"en\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">reference:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"ORD-10293\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> })\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> text\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">text\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">let\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">try\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">parse\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">text\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">); } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">catch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">e\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) {} \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// a 5xx from the platform may not be JSON\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">if\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">status\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> ===\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 201\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) { \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">/* save data.id with your own order */\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">else\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> if\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">status\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> >=\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 500\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> ||\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> ===\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) { \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">/* retry later with the SAME key */\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">else\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">/* data.error.code tells you what to fix */\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"PHP","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"php\">\u003ccode language=\"php\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">\u0026#x3C;?\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\">php\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$ch\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\"> curl_init\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://orders.balaipedia.com/v1/orders\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">curl_setopt_array\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$ch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\"> CURLOPT_POST\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =>\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\"> CURLOPT_RETURNTRANSFER\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =>\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\"> CURLOPT_TIMEOUT\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =>\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 30\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\"> CURLOPT_HTTPHEADER\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =>\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer \"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> .\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\"> getenv\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"BP_API_KEY\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">),\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Idempotency-Key: \"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> .\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> $key\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// e.g. a UUID you stored with your order\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\"> CURLOPT_POSTFIELDS\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =>\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\"> json_encode\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">([\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"email\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =>\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"[email protected]\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"name\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =>\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Budi\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"lang\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =>\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"en\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"reference\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =>\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"ORD-10293\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]),\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$body\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\"> curl_exec\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$ch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$status\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\"> curl_getinfo\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$ch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#D4D4D4\">CURLINFO_HTTP_CODE\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\"> json_decode\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">((\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$body\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">); \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// null when the body is not JSON (retry with the same key)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> os, uuid, requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">key \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> str\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(uuid.uuid4()) \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># store it with your order so a retry reuses it\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">r \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://orders.balaipedia.com/v1/orders\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer \"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> +\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> os.environ[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"BP_API_KEY\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">], \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Idempotency-Key\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: key},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"email\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"[email protected]\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Budi\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"lang\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"en\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"reference\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ORD-10293\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> timeout\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">30\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">try\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: data \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> r.json()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">except\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> ValueError\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: data \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> None\u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"> # a 5xx from the platform may not be JSON: retry with the same key\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"201 Created","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"15\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"BP-7K3M9QXA\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"object\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"order\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"email\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"[email protected]\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"reference\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ORD-10293\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"processing\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"note\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-11-12T03:10:00.000Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"completed_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expires_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-12-12\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"amount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0.15\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currency\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"USD\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"refunded\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"balance\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">42.2\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"422 Rejected","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"1\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">:{\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"email_rejected\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"The email address was rejected by validation. No credit was charged.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"reason\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"mailbox_full\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"note\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"The recipient's mailbox is full.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"request_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"req_...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create order","path":"/v1/orders","servers":[{"url":"https://orders.balaipedia.com"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"Idempotency-Key":{"schema":[{"type":"string","description":"Optional, recommended. 8-64 characters (letters, digits, `_ . : -` ), for example a UUID. Prevents the same order from being created twice when you retry. Store it with your order so a retry reuses it."}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"email":[{"type":"string","description":"Buyer’s email. One address per order.","required":true}],"name":[{"type":"string","description":"Optional. Used in the greeting (max 60 chars)."}],"lang":[{"type":"string","description":"`\"en\"` | `\"id\"` . Language of the email sent to the buyer: English or Indonesian. Default `\"en\"` . Any other value is rejected with `400` . This is independent of your account currency."}],"reference":[{"type":"string","description":"Your own order reference (max 64). Returned in responses and webhooks; searchable via the list endpoint."}],"allow_duplicate":[{"type":"boolean","description":"`true` or `false` only. By default an email that received an invitation in the last 30 days is refused with `409` . Set true to send again (charged). Re-sending is only allowed when the earlier invitation was one of your own orders; otherwise it is still refused with `409` ."}]}}],"examples":{"example":{"value":{"email":"\u003cstring>","name":"\u003cstring>","lang":"\u003cstring>","reference":"\u003cstring>","allow_duplicate":true}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"balai-pedia","siteName":"Balai Pedia","title":"Create order - Balai Pedia","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-14T02:33:30.848Z","originalFileLocation":"api-reference/create-order.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create an order and send the invitation.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Balai Pedia\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create order - Balai Pedia\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create an order and send the invitation.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Balai Pedia\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.balaipedia.com/api-reference/create-order\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://balai-pedia.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+order\u0026amp;description=Create+an+order+and+send+the+invitation.\u0026amp;theme=2382f4a43ef5a0c0def8e5ac\u0026amp;signature=c63571204bd14a18018a500b1b1a37a6b338167f38cd6c711d15887f2f97474a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create order - Balai Pedia\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create an order and send the invitation.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://balai-pedia.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+order\u0026amp;description=Create+an+order+and+send+the+invitation.\u0026amp;theme=2382f4a43ef5a0c0def8e5ac\u0026amp;signature=c63571204bd14a18018a500b1b1a37a6b338167f38cd6c711d15887f2f97474a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/balai-pedia/Gx1HzVWRb4av_K_u/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Balai Pedia\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F28C28\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.balaipedia.com/api-reference/create-order\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/create-order.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.balaipedia.com/#organization\",\"name\":\"Balai Pedia\",\"url\":\"https://docs.balaipedia.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/balai-pedia/3rrJ_VL6yKbvbHlO/logo/balai-pedia-logo-cropped.svg?fit=max\u0026auto=format\u0026n=3rrJ_VL6yKbvbHlO\u0026q=85\u0026s=2fce9c07f0a1c46c7eddcf67990e3bb1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.balaipedia.com#website\",\"name\":\"Balai Pedia\",\"url\":\"https://docs.balaipedia.com\",\"publisher\":{\"@id\":\"https://docs.balaipedia.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.balaipedia.com/api-reference/create-order#webpage\",\"url\":\"https://docs.balaipedia.com/api-reference/create-order\",\"name\":\"Create order\",\"description\":\"Create an order and send the invitation.\",\"dateModified\":\"2026-11-14T02:33:30.848Z\",\"isPartOf\":{\"@id\":\"https://docs.balaipedia.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.balaipedia.com/api-reference/create-order#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.balaipedia.com/api-reference/create-order#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Balai Pedia\",\"item\":\"https://docs.balaipedia.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create order\",\"item\":\"https://docs.balaipedia.com/api-reference/create-order\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.balaipedia.com/api-reference/create-order#apireference\",\"headline\":\"Create order\",\"name\":\"Create order\",\"description\":\"Create an order and send the invitation.\",\"url\":\"https://docs.balaipedia.com/api-reference/create-order\",\"mainEntityOfPage\":{\"@id\":\"https://docs.balaipedia.com/api-reference/create-order#webpage\"},\"dateModified\":\"2026-11-14T02:33:30.848Z\",\"publisher\":{\"@id\":\"https://docs.balaipedia.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.balaipedia.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Balai Pedia\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Balai Pedia\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/create-order.md","siteName":"Balai Pedia","nav":{"global":null,"pages":[{"group":"Getting Started","pages":[{"title":"Reseller API v1","sidebarTitle":"Overview","href":"/index"},{"title":"Quickstart","href":"/quickstart"},{"title":"Authentication","href":"/authentication"},{"title":"Currency and credit","href":"/currency-and-credit"}]},{"group":"Guides","pages":[{"title":"Webhooks","href":"/webhooks"},{"title":"Data retention","href":"/data-retention"},{"title":"Errors and limits","href":"/errors"},{"title":"Best practices","description":"Recommendations for a reliable integration.","href":"/best-practices"}]},{"group":"Orders","pages":[{"title":"Create order","api":"POST https://orders.balaipedia.com/v1/orders","href":"/api-reference/create-order"},{"title":"Get order status","description":"Get the status of one order.","api":"GET https://orders.balaipedia.com/v1/orders/{id}","href":"/api-reference/get-order"},{"title":"List orders","api":"GET https://orders.balaipedia.com/v1/orders","href":"/api-reference/list-orders"}]},{"group":"Account","pages":[{"title":"Get balance","api":"GET https://orders.balaipedia.com/v1/balance","href":"/api-reference/get-balance"},{"title":"List transactions","api":"GET https://orders.balaipedia.com/v1/transactions","href":"/api-reference/list-transactions"}]},{"group":"Webhook endpoints","pages":[{"title":"Set webhook","api":"POST https://orders.balaipedia.com/v1/webhook","href":"/api-reference/set-webhook"},{"title":"Get webhook","api":"GET https://orders.balaipedia.com/v1/webhook","href":"/api-reference/get-webhook"},{"title":"Remove webhook","api":"POST https://orders.balaipedia.com/v1/webhook/disable","href":"/api-reference/disable-webhook"},{"title":"Test webhook","api":"POST https://orders.balaipedia.com/v1/webhook/test","href":"/api-reference/test-webhook"}]},{"group":"Utility","pages":[{"title":"Health check","api":"GET https://orders.balaipedia.com/v1/ping","href":"/api-reference/ping"}]},{"group":"Telegram bot","pages":[{"title":"Telegram bot","href":"/telegram-bot"}]}]},"basePath":"","title":"Create order - Balai Pedia","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-NXj-Rqjv.js","utils-m0thOP-_.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D13EKcfm.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema--XTdfsEb.js","snippetPresets-D3s4lmAH.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-ChURybxL.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DL8CiXq2.js","shallow-DI2-YB2E.js","getApiPlaygroundDisplay-DxbW7b_y.js","CodeSnippet-CiNYS0pP.js","CodeSnippets-BT87bThu.js","Page-DSpdRuhM.js","getPastedJson-F_g_IrFQ.js","icon-CCIG5BAs.js","MethodPill-DY3E0jwx.js","DuplicateIcon-BN88xnEg.js","createIcon-VCCc5HO5.js","DynamicMarkdown-CaSwclgK.js","SectionHeading-DXV8nWhc.js","axios-vUo_bRtp.js"]}