After creating an order with POST /v1/order and directing the user through an external payment flow, use this endpoint to poll for the outcome. The order status will progress from STARTED to one of the terminal states: COMPLETED, FAILED, or EXPIRED.
Request
Headers
string
required
Bearer token for the authenticated user. Format: Bearer <userAccessToken>
string
required
Your application’s client ID, issued during onboarding.
Path Parameters
string
required
The unique ID of a previously created order, as returned by POST /v1/order. Example: "abcd_1234"
The payment request identifier, correlating this order to a payment gateway transaction. Example: "payment_1234"
string
required
The unique identifier of the order.
enum
required
The current state of the order.
Value
Description
STARTED
Order created; payment not yet confirmed. Continue polling.
COMPLETED
Payment received and order fulfilled successfully.
FAILED
Payment failed or was rejected. Check metadata.note for context.
EXPIRED
Order was not paid within the allowed time window.
string
Timestamp of when payment was confirmed. Only present when status is COMPLETED.
object
Additional context about the payment outcome. Individual fields may be absent depending on the result.
Show metadata fields
string
The identifier assigned to the payment by the payment gateway.
string
The on-chain transaction hash for the crypto payment.
string
A short note providing context in failure cases, if available. Example: "payment_refunded"
Error Responses
401 — Authentication Error
The bearer token is missing, expired, or invalid.
403 — Authorization Error
The authenticated user does not have permission to access this order.
404 — Order Not Found
No order exists with the given orderId. Verify the ID matches one returned by POST /v1/order.
{ "error": "Order not found"}
498 — Invalid Client Key
The X-Client-ID header value is not recognised.
499 — Missing Client Key
The X-Client-ID header is absent from the request.
500 — Internal Server Error
An unexpected server error occurred. Retry with exponential backoff.
Polling Pattern
Order completion is asynchronous. Poll this endpoint after the user completes the external payment step, stopping when status reaches a terminal value (COMPLETED, FAILED, or EXPIRED).
async function waitForOrderCompletion(orderId, clientId, accessToken) { const TERMINAL_STATES = ['COMPLETED', 'FAILED', 'EXPIRED']; const MAX_ATTEMPTS = 40; // ~2 minutes at 3s intervals const POLL_INTERVAL_MS = 3000; for (let i = 0; i < MAX_ATTEMPTS; i++) { const response = await fetch(`https://api.baanx.com/v1/order/${orderId}`, { headers: { 'X-Client-ID': clientId, 'Authorization': `Bearer ${accessToken}` } }); if (!response.ok) throw new Error(`Unexpected error: ${response.status}`); const order = await response.json(); if (TERMINAL_STATES.includes(order.status)) return order; await new Promise(resolve => setTimeout(resolve, POLL_INTERVAL_MS)); } throw new Error('Order polling timed out. Please check back later.');}const order = await waitForOrderCompletion(orderId, clientId, accessToken);if (order.status === 'COMPLETED') { // Unlock product, show success UI} else { // Handle failure or expiry console.warn('Order did not complete:', order.metadata?.note);}
Related Endpoints
Create Order
Initiate a new order and receive the orderId to track here.
Get Available Products
Discover which products are available and eligible before ordering.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Baanx API","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"favicon":"https://mintcdn.com/baanxgroup/gdsc8t7WiEeGHqE_/favicon.svg?fit=max\u0026auto=format\u0026n=gdsc8t7WiEeGHqE_\u0026q=85\u0026s=2ba01309dbb7993a37c43420e80054cd","navbar":{"links":[{"href":"mailto:support@baanx.com","label":"Support"}]},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"baanxgroup","hasAudioNarration":false,"actualSubdomain":"baanxgroup","customDomains":["docs.baanx.com"],"gitSource":{"type":"github","owner":"baanx-group","repo":"api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae93ff587cae518f4656895:success","clientVersion":"0.0.4205","searchFilterCounts":[{"language":"default","tag":"API Reference","count":75},{"language":"default","tag":"Documentation","count":40},{"language":"default","tag":"Wallet","count":19},{"language":"default","tag":"Authentication","count":17},{"language":"default","tag":"Webhooks","count":16},{"language":"default","tag":"Consent","count":11},{"language":"default","tag":"Delegation","count":10},{"language":"default","tag":"Card","count":9},{"language":"default","tag":"Wallets","count":9},{"language":"default","tag":"Card Operations","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/order/status","slug":"/api-reference/order/status","pageMetadata":{"title":"Get Order Status","api":"GET /v1/order/{orderId}","description":"Fetch the current status of an order by ID. Use this to poll for async completion after a payment is submitted.","href":"/api-reference/order/status","hidden":false},"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: \"Fetch the current status of an order by ID. Use this to poll for async completion after a payment is submitted.\"\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},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,CodeGroup,Expandable,Heading,ParamField,ResponseField,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`After creating an order with `,_jsx(_components.a,{href:`/api-reference/order/create-order`,children:_jsx(_components.code,{children:`POST /v1/order`})}),` and directing the user through an external payment flow, use this endpoint to poll for the outcome. The order `,_jsx(_components.code,{children:`status`}),` will progress from `,_jsx(_components.code,{children:`STARTED`}),` to one of the terminal states: `,_jsx(_components.code,{children:`COMPLETED`}),`, `,_jsx(_components.code,{children:`FAILED`}),`, or `,_jsx(_components.code,{children:`EXPIRED`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`Bearer token for the authenticated user. Format: `,_jsx(_components.code,{children:`Bearer \u003cuserAccessToken>`})]})}),`\n`,_jsx(ParamField,{header:`X-Client-ID`,type:`string`,required:true,id:`param-x-client-id`,children:_jsx(_components.p,{children:`Your application’s client ID, issued during onboarding.`})}),`\n`,_jsx(Heading,{level:`3`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`orderId`,type:`string`,required:true,id:`param-order-id`,children:_jsxs(_components.p,{children:[`The unique ID of a previously created order, as returned by `,_jsx(_components.code,{children:`POST /v1/order`}),`. Example: `,_jsx(_components.code,{children:`\"abcd_1234\"`})]})}),`\n`,_jsx(Heading,{level:`3`,id:`example-request`,children:`Example Request`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`9`,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:`9`,children:[_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:` response`}),_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://api.baanx.com/v1/order/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`orderId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:` 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:` 'X-Client-ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your_client_id'`}),_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:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`userAccessToken`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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`,_jsx(_components.span,{className:`line`}),`\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:` order`}),_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:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_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:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`order`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// e.g. \"COMPLETED\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`12`,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:`12`,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:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.get(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.baanx.com/v1/order/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`order_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'`}),_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:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-Client-ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'your_client_id'`}),_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\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`user_access_token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`order `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(order[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'status'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# e.g. \"COMPLETED\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`4`,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:`4`,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:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_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:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.baanx.com/v1/order/abcd_1234`}),_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:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003cuserAccessToken>'`}),_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:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-Client-ID: your_client_id'`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`200-—-success`,children:`200 — Success`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,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:`11`,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:` \"requestId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"payment_1234\"`}),_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:` \"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abcd_1234\"`}),_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:`\"COMPLETED\"`}),_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:` \"paidAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2023-03-27 17:07:12.662+03\"`}),_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:` \"metadata\"`}),_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:` \"paymentId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abcpaymentId1234ABC\"`}),_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:` \"txHash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x3a11a86cf218c448be519728cd3ac5c741fb3424\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"payment_refunded\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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`]})})}),`\n`,_jsx(ResponseField,{name:`requestId`,type:`string`,id:`param-request-id`,children:_jsxs(_components.p,{children:[`The payment request identifier, correlating this order to a payment gateway transaction. Example: `,_jsx(_components.code,{children:`\"payment_1234\"`})]})}),`\n`,_jsx(ResponseField,{name:`orderId`,type:`string`,required:true,id:`param-order-id-1`,children:_jsx(_components.p,{children:`The unique identifier of the order.`})}),`\n`,_jsxs(ResponseField,{name:`status`,type:`enum`,required:true,id:`param-status`,children:[_jsx(_components.p,{children:`The current state of the order.`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`STARTED`})}),_jsx(_components.td,{children:`Order created; payment not yet confirmed. Continue polling.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`COMPLETED`})}),_jsx(_components.td,{children:`Payment received and order fulfilled successfully.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FAILED`})}),_jsxs(_components.td,{children:[`Payment failed or was rejected. Check `,_jsx(_components.code,{children:`metadata.note`}),` for context.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`EXPIRED`})}),_jsx(_components.td,{children:`Order was not paid within the allowed time window.`})]})]})]})]}),`\n`,_jsx(ResponseField,{name:`paidAt`,type:`string`,id:`param-paid-at`,children:_jsxs(_components.p,{children:[`Timestamp of when payment was confirmed. Only present when `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`COMPLETED`}),`.`]})}),`\n`,_jsxs(ResponseField,{name:`metadata`,type:`object`,id:`param-metadata`,children:[_jsx(_components.p,{children:`Additional context about the payment outcome. Individual fields may be absent depending on the result.`}),_jsxs(Expandable,{title:`metadata fields`,children:[_jsx(ResponseField,{name:`metadata.paymentId`,type:`string`,id:`param-metadata-payment-id`,children:_jsx(_components.p,{children:`The identifier assigned to the payment by the payment gateway.`})}),_jsx(ResponseField,{name:`metadata.txHash`,type:`string`,id:`param-metadata-tx-hash`,children:_jsx(_components.p,{children:`The on-chain transaction hash for the crypto payment.`})}),_jsx(ResponseField,{name:`metadata.note`,type:`string`,id:`param-metadata-note`,children:_jsxs(_components.p,{children:[`A short note providing context in failure cases, if available. Example: `,_jsx(_components.code,{children:`\"payment_refunded\"`})]})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`401 — Authentication Error`,id:`401-authentication-error`,children:_jsx(_components.p,{children:`The bearer token is missing, expired, or invalid.`})}),_jsx(Accordion,{title:`403 — Authorization Error`,id:`403-authorization-error`,children:_jsx(_components.p,{children:`The authenticated user does not have permission to access this order.`})}),_jsxs(Accordion,{title:`404 — Order Not Found`,id:`404-order-not-found`,children:[_jsxs(_components.p,{children:[`No order exists with the given `,_jsx(_components.code,{children:`orderId`}),`. Verify the ID matches one returned by `,_jsx(_components.code,{children:`POST /v1/order`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order not found\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsx(Accordion,{title:`498 — Invalid Client Key`,id:`498-invalid-client-key`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`X-Client-ID`}),` header value is not recognised.`]})}),_jsx(Accordion,{title:`499 — Missing Client Key`,id:`499-missing-client-key`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`X-Client-ID`}),` header is absent from the request.`]})}),_jsx(Accordion,{title:`500 — Internal Server Error`,id:`500-internal-server-error`,children:_jsx(_components.p,{children:`An unexpected server error occurred. Retry with exponential backoff.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`polling-pattern`,children:`Polling Pattern`}),`\n`,_jsxs(_components.p,{children:[`Order completion is asynchronous. Poll this endpoint after the user completes the external payment step, stopping when `,_jsx(_components.code,{children:`status`}),` reaches a terminal value (`,_jsx(_components.code,{children:`COMPLETED`}),`, `,_jsx(_components.code,{children:`FAILED`}),`, or `,_jsx(_components.code,{children:`EXPIRED`}),`).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`33`,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:`33`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` waitForOrderCompletion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`orderId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`clientId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`accessToken`}),_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:` TERMINAL_STATES`}),_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:`'COMPLETED'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'FAILED'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'EXPIRED'`}),_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:` MAX_ATTEMPTS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 40`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ~2 minutes at 3s intervals`})]}),`\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:` POLL_INTERVAL_MS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` MAX_ATTEMPTS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_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://api.baanx.com/v1/order/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`orderId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:` 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:` 'X-Client-ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` clientId`}),_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:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accessToken`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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`,_jsx(_components.span,{className:`line`}),`\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:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Unexpected error: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\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:` order`}),_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:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\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:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`TERMINAL_STATES`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`includes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`order`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` order`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`resolve`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setTimeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resolve`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`POLL_INTERVAL_MS`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Order polling timed out. Please check back later.'`}),_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`,_jsx(_components.span,{className:`line`}),`\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:` order`}),_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:` waitForOrderCompletion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`orderId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`clientId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accessToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\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:`order`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'COMPLETED'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Unlock product, show success UI`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Handle failure or expiry`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`warn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Order did not complete:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`order`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`metadata`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`note`}),_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`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Create Order`,icon:`plus`,href:`/api-reference/order/create-order`,children:_jsxs(_components.p,{children:[`Initiate a new order and receive the `,_jsx(_components.code,{children:`orderId`}),` to track here.`]})}),_jsx(Card,{title:`Get Available Products`,icon:`list`,href:`/api-reference/order/get-products`,children:_jsx(_components.p,{children:`Discover which products are available and eligible before ordering.`})})]})]})}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":"Get Order Status","api":"GET /v1/order/{orderId}","description":"Fetch the current status of an order by ID. Use this to poll for async completion after a payment is submitted.","href":"/api-reference/order/status","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Request","slug":"request","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Path Parameters","slug":"path-parameters","depth":3,"children":[]},{"title":"Example Request","slug":"example-request","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"200 — Success","slug":"200-—-success","depth":3,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":3,"children":[]}]},{"title":"Polling Pattern","slug":"polling-pattern","depth":2,"children":[]},{"title":"Related Endpoints","slug":"related-endpoints","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Get Order Status","path":"/v1/order/{orderId}","method":"get","request":{"security":[],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"Bearer token for the authenticated user. Format: `Bearer \u003cuserAccessToken>`","required":true}]},"X-Client-ID":{"schema":[{"type":"string","description":"Your application’s client ID, issued during onboarding.","required":true}]}},"cookie":{},"path":{"orderId":{"schema":[{"type":"string","description":"The unique ID of a previously created order, as returned by `POST /v1/order` . Example: `\"abcd_1234\"`","required":true}]}}},"body":{}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"requestId":[{"type":"string","description":"The payment request identifier, correlating this order to a payment gateway transaction. Example: `\"payment_1234\"`"}],"orderId":[{"type":"string","description":"The unique identifier of the order.","required":true}],"status":[{"type":"object","properties":{},"description":"The current state of the order. Value Description `STARTED` Order created; payment not yet confirmed. Continue polling. `COMPLETED` Payment received and order fulfilled successfully. `FAILED` Payment failed or was rejected. Check `metadata.note` for context. `EXPIRED` Order was not paid within the allowed time window.","required":true}],"paidAt":[{"type":"string","description":"Timestamp of when payment was confirmed. Only present when `status` is `COMPLETED` ."}],"metadata":[{"type":"object","properties":{"metadata.paymentId":[{"type":"string","description":"The identifier assigned to the payment by the payment gateway."}],"metadata.txHash":[{"type":"string","description":"The on-chain transaction hash for the crypto payment."}],"metadata.note":[{"type":"string","description":"A short note providing context in failure cases, if available. Example: `\"payment_refunded\"`"}]},"description":"Additional context about the payment outcome. Individual fields may be absent depending on the result."}]}}],"examples":{"example":{"value":{"requestId":"\u003cstring>","orderId":"\u003cstring>","status":{},"paidAt":"\u003cstring>","metadata":{"metadata.paymentId":"\u003cstring>","metadata.txHash":"\u003cstring>","metadata.note":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"baanxgroup","siteName":"Baanx API","title":"Get Order Status - Baanx API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-19T17:17:26.580Z","originalFileLocation":"api-reference/order/status.md"},"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=\"Fetch the current status of an order by ID. Use this to poll for async completion after a payment is submitted.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Baanx API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/baanxgroup/0noly4cKYD8qeZxA/_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/baanxgroup/0noly4cKYD8qeZxA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/baanxgroup/0noly4cKYD8qeZxA/_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/baanxgroup/0noly4cKYD8qeZxA/_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/baanxgroup/0noly4cKYD8qeZxA/_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/baanxgroup/0noly4cKYD8qeZxA/_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/baanxgroup/0noly4cKYD8qeZxA/_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/baanxgroup/0noly4cKYD8qeZxA/_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/baanxgroup/0noly4cKYD8qeZxA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Order Status - Baanx API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Fetch the current status of an order by ID. Use this to poll for async completion after a payment is submitted.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Baanx API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.baanx.com/api-reference/order/status\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://baanxgroup.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Get+Order+Status\u0026amp;description=Fetch+the+current+status+of+an+order+by+ID.+Use+this+to+poll+for+async+completion+after+a+payment+is+submitted.\u0026amp;theme=e5ed9adb1acc63d397db9eeb\u0026amp;signature=88cdd03ca40c96a0f4776d4638b9529d32e6c6f74205a05927ea54709b50e006\">\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=\"Get Order Status - Baanx API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Fetch the current status of an order by ID. Use this to poll for async completion after a payment is submitted.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://baanxgroup.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Get+Order+Status\u0026amp;description=Fetch+the+current+status+of+an+order+by+ID.+Use+this+to+poll+for+async+completion+after+a+payment+is+submitted.\u0026amp;theme=e5ed9adb1acc63d397db9eeb\u0026amp;signature=88cdd03ca40c96a0f4776d4638b9529d32e6c6f74205a05927ea54709b50e006\">\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/baanxgroup/0noly4cKYD8qeZxA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Baanx API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.baanx.com/api-reference/order/status\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/order/status.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.baanx.com/#organization\",\"name\":\"Baanx API\",\"url\":\"https://docs.baanx.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.baanx.com#website\",\"name\":\"Baanx API\",\"url\":\"https://docs.baanx.com\",\"publisher\":{\"@id\":\"https://docs.baanx.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.baanx.com/api-reference/order/status#webpage\",\"url\":\"https://docs.baanx.com/api-reference/order/status\",\"name\":\"Get Order Status\",\"description\":\"Fetch the current status of an order by ID. Use this to poll for async completion after a payment is submitted.\",\"dateModified\":\"2026-02-19T17:17:26.580Z\",\"isPartOf\":{\"@id\":\"https://docs.baanx.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.baanx.com/api-reference/order/status#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.baanx.com/api-reference/order/status#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Orders\",\"item\":\"https://docs.baanx.com/api-reference/order/enum-products\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Order Status\",\"item\":\"https://docs.baanx.com/api-reference/order/status\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.baanx.com/api-reference/order/status#apireference\",\"headline\":\"Get Order Status\",\"name\":\"Get Order Status\",\"description\":\"Fetch the current status of an order by ID. Use this to poll for async completion after a payment is submitted.\",\"url\":\"https://docs.baanx.com/api-reference/order/status\",\"mainEntityOfPage\":{\"@id\":\"https://docs.baanx.com/api-reference/order/status#webpage\"},\"dateModified\":\"2026-02-19T17:17:26.580Z\",\"publisher\":{\"@id\":\"https://docs.baanx.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.baanx.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Baanx API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Baanx API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/order/status.md","siteName":"Baanx API","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/guides/introduction"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"group":"Authentication","pages":[{"title":"Authenticate User","api":"POST https://dev.api.baanx.com/v1/auth/login","href":"/api-reference/auth/login"},{"title":"Send OTP Code","api":"POST https://dev.api.baanx.com/v1/auth/login/otp","href":"/api-reference/auth/login-otp"},{"title":"Logout User","api":"POST https://dev.api.baanx.com/v1/auth/logout","href":"/api-reference/auth/logout"},{"title":"Initiate OAuth Authorization","api":"GET https://dev.api.baanx.com/v1/auth/oauth/authorize/initiate","href":"/api-reference/auth/oauth-authorize-initiate"},{"title":"Generate Authorization Code","api":"POST https://dev.api.baanx.com/v1/auth/oauth/authorize","href":"/api-reference/auth/oauth-authorize"},{"title":"Exchange Code for Tokens","api":"POST https://dev.api.baanx.com/v1/auth/oauth/token","href":"/api-reference/auth/oauth-token"},{"title":"Revoke OAuth Authorization","api":"DELETE https://dev.api.baanx.com/v1/auth/oauth/revoke","href":"/api-reference/auth/oauth-revoke"},{"title":"Get Onboarding Details","api":"GET https://dev.api.baanx.com/v1/auth/register","href":"/api-reference/auth/register"},{"title":"Send Registration Email","api":"POST https://dev.api.baanx.com/v1/auth/register/email/send","href":"/api-reference/auth/register-email-send"},{"title":"Verify Email Code","api":"POST https://dev.api.baanx.com/v1/auth/register/email/verify","href":"/api-reference/auth/register-email-verify"},{"title":"Send Phone Verification SMS","api":"POST https://dev.api.baanx.com/v1/auth/register/phone/send","href":"/api-reference/auth/register-phone-send"},{"title":"Verify Phone Code","api":"POST https://dev.api.baanx.com/v1/auth/register/phone/verify","href":"/api-reference/auth/register-phone-verify"},{"title":"Update Personal Details","api":"POST https://dev.api.baanx.com/v1/auth/register/personal-details","href":"/api-reference/auth/register-personal-details"},{"title":"Update Physical Address","api":"POST https://dev.api.baanx.com/v1/auth/register/address","href":"/api-reference/auth/register-address"},{"title":"Update Mailing Address","api":"POST https://dev.api.baanx.com/v1/auth/register/mailing-address","href":"/api-reference/auth/register-mailing-address"},{"title":"Generate KYC Verification Session","api":"POST https://dev.api.baanx.com/v1/auth/register/verification","href":"/api-reference/auth/register-verification"},{"title":"Get Registration Settings","api":"GET https://dev.api.baanx.com/v1/auth/settings","href":"/api-reference/auth/settings"}]},{"group":"User","pages":[{"title":"Get User Details","api":"GET https://dev.api.baanx.com/v1/user","href":"/api-reference/user/get-user"},{"title":"Start User Verification","api":"GET https://dev.api.baanx.com/v1/user/verification","href":"/api-reference/user/verification"}]},{"group":"Card","pages":[{"title":"Order a Card","api":"POST https://dev.api.baanx.com/v1/card/order","href":"/api-reference/card/order"},{"title":"Get Card Status","api":"GET https://dev.api.baanx.com/v1/card/status","href":"/api-reference/card/status"},{"title":"Freeze Card","api":"POST https://dev.api.baanx.com/v1/card/freeze","href":"/api-reference/card/freeze"},{"title":"Unfreeze Card","api":"POST https://dev.api.baanx.com/v1/card/unfreeze","href":"/api-reference/card/unfreeze"},{"title":"Get Card Transactions","api":"GET https://dev.api.baanx.com/v1/card/transactions","href":"/api-reference/card/transactions"},{"title":"Generate Transaction Statement","api":"GET https://dev.api.baanx.com/v1/card/transactions/statement","href":"/api-reference/card/transactions-statement"},{"title":"Generate PIN View Token","api":"POST https://dev.api.baanx.com/v1/card/pin/token","href":"/api-reference/card/pin-token"},{"title":"Generate PIN Set Token","api":"POST https://dev.api.baanx.com/v1/card/set-pin/token","href":"/api-reference/card/set-pin-token"},{"title":"Generate Card Details Token","api":"POST https://dev.api.baanx.com/v1/card/details/token","href":"/api-reference/card/details-token"}]},{"group":"Orders","pages":[{"title":"Get Available Products","api":"GET /v1/order/products/available","href":"/api-reference/order/enum-products"},{"title":"Create Order","api":"POST /v1/order","description":"Initiate an order for a product such as a premium account upgrade or metal card. Returns a unique order reference to pass to your payment gateway.","href":"/api-reference/order/create"},{"title":"Get Order Status","api":"GET /v1/order/{orderId}","href":"/api-reference/order/status"}]},{"group":"Wallet","pages":[{"title":"Get/Create Internal Wallets","api":"GET https://dev.api.baanx.com/v1/wallet/internal","description":"Retrieve or create custodial wallets managed by the Baanx platform","href":"/api-reference/wallet/internal"},{"title":"List Card-Linked Wallets","api":"GET /v1/wallet/internal/card_linked","href":"/api-reference/wallet/internal-card-linked-get"},{"title":"Link Wallet to Card","api":"POST /v1/wallet/internal/card_linked","href":"/api-reference/wallet/internal-card-linked-post"},{"title":"Unlink Wallet from Card","api":"DELETE /v1/wallet/internal/card_linked","href":"/api-reference/wallet/internal-card-linked-delete"},{"title":"Update Linked Wallet Priority","api":"PUT https://dev.api.baanx.com/v1/wallet/internal/card_linked/priority","href":"/api-reference/wallet/internal-card-linked-priority"},{"title":"Withdraw from Internal Wallet","api":"POST https://dev.api.baanx.com/v1/wallet/internal/withdraw","href":"/api-reference/wallet/internal-withdraw"},{"title":"Get External Wallets","api":"GET https://dev.api.baanx.com/v1/wallet/external","href":"/api-reference/wallet/external"},{"title":"Get External Wallet Priority","api":"GET /v1/wallet/external/priority","href":"/api-reference/wallet/external-priority-get"},{"title":"Update External Wallet Priority","api":"PUT /v1/wallet/external/priority","href":"/api-reference/wallet/external-priority-put"},{"title":"Get Credit Wallet Balance","api":"GET https://dev.api.baanx.com/v1/wallet/credit","href":"/api-reference/wallet/credit"},{"title":"Withdraw from Credit Wallet","api":"POST https://dev.api.baanx.com/v1/wallet/credit/withdraw","href":"/api-reference/wallet/credit-withdraw"},{"title":"Estimate Credit Withdrawal Fees","api":"GET https://dev.api.baanx.com/v1/wallet/credit/withdraw-estimation","href":"/api-reference/wallet/credit-withdraw-estimation"},{"title":"Get Reward Wallet Balance","api":"GET https://dev.api.baanx.com/v1/wallet/reward","href":"/api-reference/wallet/reward"},{"title":"Withdraw from Reward Wallet","api":"POST https://dev.api.baanx.com/v1/wallet/reward/withdraw","href":"/api-reference/wallet/reward-withdraw"},{"title":"Estimate Reward Withdrawal Fees","api":"GET https://dev.api.baanx.com/v1/wallet/reward/withdraw-estimation","href":"/api-reference/wallet/reward-withdraw-estimation"},{"title":"Get Whitelisted Addresses","api":"GET /v1/wallet/whitelist","href":"/api-reference/wallet/whitelist-get"},{"title":"Add Addresses to Whitelist","api":"POST /v1/wallet/whitelist","href":"/api-reference/wallet/whitelist-post"},{"title":"Remove Addresses from Whitelist","api":"DELETE /v1/wallet/whitelist","href":"/api-reference/wallet/whitelist-delete"},{"title":"Get Wallet Transaction History","api":"GET https://dev.api.baanx.com/v1/wallet/history","href":"/api-reference/wallet/history"}]},{"group":"Delegation","pages":[{"title":"Get Delegation Token","api":"GET /v1/delegation/token","href":"/api-reference/delegation/get-token"},{"title":"Get Blockchain Configuration","api":"GET https://dev.api.baanx.com/v1/delegation/chain/config","href":"/api-reference/delegation/chain-config"},{"title":"Complete EVM Wallet Delegation","api":"POST https://dev.api.baanx.com/v1/delegation/evm/post-approval","href":"/api-reference/delegation/evm-post-approval"},{"title":"Complete Solana Wallet Delegation","api":"POST https://dev.api.baanx.com/v1/delegation/solana/post-approval","href":"/api-reference/delegation/solana-post-approval"}]},{"group":"Consent","pages":[{"title":"Create Onboarding Consent","api":"POST /v2/consent/onboarding","href":"/api-reference/consent/create-onboarding-consent"},{"title":"Get Consent Sets by Onboarding ID","api":"GET /v2/consent/onboarding/{onboardingId}","href":"/api-reference/consent/get-onboarding-consent"},{"title":"Link User to Consent Set","api":"PATCH /v2/consent/onboarding/{consentSetId}","href":"/api-reference/consent/link-user-to-consent"},{"title":"Get Consent Set by ID","api":"GET /v2/consent/consentSet/{consentSetId}","href":"/api-reference/consent/get-consent-set"},{"title":"Get User Consent Status","api":"GET /v2/consent/user/{userId}","href":"/api-reference/consent/get-user-consent"},{"title":"Get Consent Audit Trail","api":"GET /v2/consent/user/{userId}/audit","href":"/api-reference/consent/get-consent-audit"},{"title":"Revoke Consent","api":"DELETE /v2/consent/consentSet/{consentSetId}/consent/{consentId}","href":"/api-reference/consent/revoke-consent"}]},{"group":"Referral","pages":[{"title":"Get User Referral Code","api":"GET /v1/referral","href":"/api-reference/referral/get-referral-code"},{"title":"Validate Referral Code","api":"GET /v1/referral/{code}/validate","href":"/api-reference/referral/validate-referral-code"}]},{"group":"Webhooks","pages":[{"title":"List Webhook Endpoints","api":"GET /v1/webhooks","href":"/api-reference/webhooks/list-webhooks"},{"title":"Create Webhook Endpoint","api":"POST /v1/webhooks","href":"/api-reference/webhooks/create-webhook"},{"title":"Get Webhook Endpoint","api":"GET /v1/webhooks/{id}","href":"/api-reference/webhooks/get-webhook"},{"title":"Update Webhook Endpoint","api":"PUT /v1/webhooks/{id}","href":"/api-reference/webhooks/update-webhook"},{"title":"Delete Webhook Endpoint","api":"DELETE /v1/webhooks/{id}","href":"/api-reference/webhooks/delete-webhook"},{"title":"Rotate Webhook Signing Key","api":"POST /v1/webhooks/{id}/rotate-key","href":"/api-reference/webhooks/rotate-key"},{"title":"Get Webhook Delivery Logs","api":"GET /v1/webhooks/{id}/logs","href":"/api-reference/webhooks/webhook-logs"},{"title":"List Events","api":"GET /v1/webhooks/events","href":"/api-reference/webhooks/list-events"},{"title":"Get Event Status","api":"GET /v1/webhooks/events/{eventId}/status","href":"/api-reference/webhooks/event-status"},{"title":"Get Event Delivery Logs","api":"GET /v1/webhooks/events/{eventId}/logs","href":"/api-reference/webhooks/event-logs"},{"title":"Retry Event Delivery","api":"POST /v1/webhooks/events/{eventId}/retry","href":"/api-reference/webhooks/retry-event"}]}]}]},"basePath":"","title":"Get Order Status - Baanx API","deploymentId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","buildId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-B6WFFOBL.js","utils-BN5um1KA.js","cloneDeep-C3md22mN.js","_Uint8Array-DLlL8L26.js","isObject-FP1Yky1u.js","utils-BSmbkXJR.js","addUniqueKeysToSchema-2tqcVnUE.js","snippetPresets-CtWfvr2J.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DkKHBy30.js","isEqual-O3q7y6pq.js","usePlaygroundInputsStore-Brc5H9UJ.js","shallow-C4L4xvbs.js","getApiPlaygroundDisplay-2bxyq_aI.js","CodeSnippet-BJu8ddd5.js","CodeSnippets-dazWmoqB.js","Page-CnLhKuUV.js","getPastedJson-Chy3Qa1S.js","icon-CyO7h3jh.js","MethodPill-Dle0_91v.js","DuplicateIcon-CVvWAf4a.js","createIcon-Di07A27B.js","DynamicMarkdown-C4w9kavL.js","SectionHeading-XiBebVYC.js","axios-vUo_bRtp.js"]}