Create a crypto-to-fiat off-ramp order. The crypto is debited from the merchant’s crypto balance and local fiat is paid out to a registered beneficiary.
The crypto-to-fiat off-ramp lets your users convert cryptocurrency into local fiat, which is then paid out to the beneficiary identified by userPaymentId. Before calling this endpoint, ensure the target beneficiary has been registered via POST /v2/payments and has status: 1 (valid). Specify the amount in either crypto (cryptoAmount) or fiat (fiatAmount); if you send both, fiatAmount takes precedence. To lock the rate, pass a quoteId; without one, the order is priced at the current rate when it is created. The crypto is taken from the merchant’s crypto balance (see Funding the order).
Your own order reference ID, up to 40 characters. It must be unique across all fiat_to_crypto and crypto_to_fiat orders on your account; a second create request with the same clientId is rejected. It is returned in Get Order responses and can be used instead of orderId to look the order up. See Idempotency and retries.
Amount of fiat currency the beneficiary should receive (e.g., 21000.00). Provide fiatAmount or cryptoAmount; if you send both, fiatAmount takes precedence.
The crypto for an off-ramp order comes from the merchant’s crypto balance for the crypto and merchantId in the request. Check the balance with Crypto Balance and top it up through the merchant’s deposit address.
Balance covers the order: VelaFi debits the crypto from the balance when it creates the order.
Balance is too low: the request is rejected with an insufficient-balance error, unless post-funded off-ramp is enabled for your account (enablement can differ by fiat currency).
With post-funded off-ramp enabled, an underfunded order waits in status: 32 (awaiting crypto deposit). If the order first needs compliance review (status: 10 or 11), it moves to 32 once approved. While it is in 32, order detail returns orderExpireTimestamp, the funding deadline as a Unix timestamp in seconds. VelaFi checks the merchant’s balance every minute; when several orders are waiting on the same merchant and crypto, the balance is applied to them oldest first. Once the balance covers an order, VelaFi debits the crypto and the order moves to status: 40, or 31 if supporting documents are required. If the deadline passes first, the order is canceled (status: 70).
For a crypto_to_fiat order in status: 50 (paid), POST /v2/order/confirm completes the order (status: 60).
Use clientId to make order creation safe to retry.
clientId is optional. When you send it, it must be at most 40 characters and unique on your account across all fiat_to_crypto and crypto_to_fiat orders, for all of your merchants.
A create request that reuses an existing clientId is rejected with a repeated-submission error, and no new order is created. The response does not return the original order; look it up instead.
A clientId stays bound to its order permanently, including after the order is canceled. Use a new clientId for a new order.
Look up an order by clientId with GET /v2/order/detail?orderType=crypto_to_fiat&clientId={clientId}.
If a create request times out or returns no response:
Call GET /v2/order/detail with the same orderType and clientId.
If the order is found, the original request succeeded. Do not create it again.
If it is not found, retry with the same clientId. If the first request did create the order in the meantime, the retry is rejected as a duplicate instead of creating a second order.
A quoteId can be consumed by a create request that is then rejected. Request a new quote before you retry.
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"VelaFi","colors":{"primary":"#169f3f","light":"#040404","dark":"#88fa9b"},"logo":{"light":"https://mintcdn.com/vela-fi/kEiS0W9mzAeRFvm2/logo/light.svg?fit=max\u0026auto=format\u0026n=kEiS0W9mzAeRFvm2\u0026q=85\u0026s=3369d850da98cb834dddcd64c977c11f","dark":"https://mintcdn.com/vela-fi/kEiS0W9mzAeRFvm2/logo/dark.svg?fit=max\u0026auto=format\u0026n=kEiS0W9mzAeRFvm2\u0026q=85\u0026s=9770c7da4d30cb382b253680e64870ed"},"favicon":{"light":"https://mintcdn.com/vela-fi/XH9g8nudshhASCqT/favicon.svg?fit=max\u0026auto=format\u0026n=XH9g8nudshhASCqT\u0026q=85\u0026s=cf3c616ff2233c52dc591e9975563199","dark":"https://mintcdn.com/vela-fi/XH9g8nudshhASCqT/favicon-dark.svg?fit=max\u0026auto=format\u0026n=XH9g8nudshhASCqT\u0026q=85\u0026s=1371f9989873a608a201b7fbcfddb0c0"},"api":{"playground":{"display":"interactive","proxy":true},"examples":{"languages":["curl","python","javascript","java"]},"mdx":{"auth":{"method":"key","name":"X-BH-TOKEN"},"server":"https://api-test.velafi.com"}},"navbar":{"primary":{"type":"button","label":"Sign Up","href":"https://www.velafi.com/signup"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","href":""},{"language":"cn","href":"cn"},{"language":"es","href":"es"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vela-fi","hasAudioNarration":false,"actualSubdomain":"vela-fi","customDomains":["docs.velafi.com"],"gitSource":{"type":"github","owner":"velafi-tech","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6aeab1a18dbebd24c08c0aa1","collectionId":"fadc3c54-2265-4b31-ac50-4c4ebdd534a1","liveDeploymentHistoryId":"6aeab1a18dbebd24c08c0aa1","schemaVersion":"v3"},"feedback":{"edits":true,"issues":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeab1a18dbebd24c08c0aa1","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"en","tag":"API Reference","count":70},{"language":"cn","tag":"API 参考","count":70},{"language":"es","tag":"Referencia de API","count":70},{"language":"en","tag":"Documentation","count":20},{"language":"cn","tag":"文档","count":20},{"language":"es","tag":"Documentación","count":20},{"language":"en","tag":"Merchants","count":19},{"language":"cn","tag":"商户","count":19},{"language":"es","tag":"Comercios","count":19},{"language":"en","tag":"Configuration","count":11},{"language":"en","tag":"Webhooks","count":11},{"language":"cn","tag":"配置","count":11},{"language":"cn","tag":"Webhooks","count":11},{"language":"es","tag":"Configuración","count":11},{"language":"es","tag":"Webhooks","count":11},{"language":"en","tag":"Beneficiaries","count":9},{"language":"en","tag":"Guides","count":9},{"language":"cn","tag":"收款人","count":9},{"language":"cn","tag":"指南","count":9},{"language":"es","tag":"Beneficiarios","count":9},{"language":"es","tag":"Guías","count":9},{"language":"en","tag":"Crypto Wallet","count":7},{"language":"en","tag":"Orders","count":7},{"language":"cn","tag":"加密钱包","count":7},{"language":"cn","tag":"订单","count":7},{"language":"es","tag":"Billetera cripto","count":7},{"language":"es","tag":"Órdenes","count":7},{"language":"en","tag":"Core Concepts","count":6},{"language":"cn","tag":"核心概念","count":6},{"language":"es","tag":"Conceptos clave","count":6}]},"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":"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":"llms-txt-v2","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":"vite-origin","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/order/create-a-crypto-to-fiat-order","slug":"/api-reference/order/create-a-crypto-to-fiat-order","pageMetadata":{"title":"Create an Off-Ramp Order","sidebarTitle":"Crypto→Fiat Order","description":"Create a crypto-to-fiat off-ramp order. The crypto is debited from the merchant's crypto balance and local fiat is paid out to a registered beneficiary.","api":"POST /v2/order/crypto_to_fiat","href":"/api-reference/order/create-a-crypto-to-fiat-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 a crypto-to-fiat off-ramp order. The crypto is debited from the merchant’s crypto balance and local fiat is paid out to a registered beneficiary.\"\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`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The crypto-to-fiat off-ramp lets your users convert cryptocurrency into local fiat, which is then paid out to the beneficiary identified by `,_jsx(_components.code,{children:`userPaymentId`}),`. Before calling this endpoint, ensure the target beneficiary has been registered via `,_jsx(_components.code,{children:`POST /v2/payments`}),` and has `,_jsx(_components.code,{children:`status: 1`}),` (valid). Specify the amount in either crypto (`,_jsx(_components.code,{children:`cryptoAmount`}),`) or fiat (`,_jsx(_components.code,{children:`fiatAmount`}),`); if you send both, `,_jsx(_components.code,{children:`fiatAmount`}),` takes precedence. To lock the rate, pass a `,_jsx(_components.code,{children:`quoteId`}),`; without one, the order is priced at the current rate when it is created. The crypto is taken from the merchant’s crypto balance (see `,_jsx(_components.a,{href:`#funding-the-order`,children:`Funding the order`}),`).`]}),`\n`,_jsx(Heading,{level:`2`,id:`endpoint`,children:`Endpoint`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://api.velafi.com/v2/order/crypto_to_fiat`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`https://api-test.velafi.com/v2/order/crypto_to_fiat`}),` for sandbox testing.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-headers`,children:`Request Headers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`X-BH-TOKEN`})}),_jsxs(_components.td,{children:[`Your token from `,_jsx(_components.code,{children:`GET /v2/token/generate`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`application/json`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`request-body-parameters`,children:`Request Body Parameters`}),`\n`,_jsx(ParamField,{body:`country`,type:`string`,required:true,id:`param-country`,children:_jsxs(_components.p,{children:[`Full country name for the off-ramp (e.g., `,_jsx(_components.code,{children:`\"Mexico\"`}),`, `,_jsx(_components.code,{children:`\"Argentina\"`}),`). Must match the country associated with the chosen `,_jsx(_components.code,{children:`userPaymentId`}),`.`]})}),`\n`,_jsx(ParamField,{body:`crypto`,type:`string`,required:true,id:`param-crypto`,children:_jsxs(_components.p,{children:[`Ticker symbol of the cryptocurrency to convert (e.g., `,_jsx(_components.code,{children:`\"USDT\"`}),`, `,_jsx(_components.code,{children:`\"USDC\"`}),`).`]})}),`\n`,_jsx(ParamField,{body:`fiat`,type:`string`,required:true,id:`param-fiat`,children:_jsxs(_components.p,{children:[`ISO 4217 fiat currency code the beneficiary will receive (e.g., `,_jsx(_components.code,{children:`\"MXN\"`}),`, `,_jsx(_components.code,{children:`\"ARS\"`}),`, `,_jsx(_components.code,{children:`\"BRL\"`}),`).`]})}),`\n`,_jsx(ParamField,{body:`userPaymentId`,type:`integer`,required:true,id:`param-user-payment-id`,children:_jsxs(_components.p,{children:[`The numeric ID of the beneficiary (user payment method) to receive the fiat payout. Retrieve this from `,_jsx(_components.code,{children:`GET /v2/payments`}),`.`]})}),`\n`,_jsx(ParamField,{body:`clientId`,type:`string`,id:`param-client-id`,children:_jsxs(_components.p,{children:[`Your own order reference ID, up to 40 characters. It must be unique across all `,_jsx(_components.code,{children:`fiat_to_crypto`}),` and `,_jsx(_components.code,{children:`crypto_to_fiat`}),` orders on your account; a second create request with the same `,_jsx(_components.code,{children:`clientId`}),` is rejected. It is returned in Get Order responses and can be used instead of `,_jsx(_components.code,{children:`orderId`}),` to look the order up. See `,_jsx(_components.a,{href:`/api-reference/order/create-a-fiat-to-crypto-order#idempotency-and-retries`,children:`Idempotency and retries`}),`.`]})}),`\n`,_jsx(ParamField,{body:`merchantId`,type:`integer`,required:true,id:`param-merchant-id`,children:_jsxs(_components.p,{children:[`Numeric ID of the merchant the order belongs to. The crypto is debited from this merchant’s balance. Requests without a valid `,_jsx(_components.code,{children:`merchantId`}),` are rejected.`]})}),`\n`,_jsx(ParamField,{body:`cryptoAmount`,type:`decimal`,id:`param-crypto-amount`,children:_jsxs(_components.p,{children:[`Amount of cryptocurrency to convert (e.g., `,_jsx(_components.code,{children:`1000.00`}),`). Ignored when a positive `,_jsx(_components.code,{children:`fiatAmount`}),` is also sent.`]})}),`\n`,_jsx(ParamField,{body:`fiatAmount`,type:`decimal`,id:`param-fiat-amount`,children:_jsxs(_components.p,{children:[`Amount of fiat currency the beneficiary should receive (e.g., `,_jsx(_components.code,{children:`21000.00`}),`). Provide `,_jsx(_components.code,{children:`fiatAmount`}),` or `,_jsx(_components.code,{children:`cryptoAmount`}),`; if you send both, `,_jsx(_components.code,{children:`fiatAmount`}),` takes precedence.`]})}),`\n`,_jsx(ParamField,{body:`remark`,type:`string`,id:`param-remark`,children:_jsx(_components.p,{children:`Optional free-text note attached to the order.`})}),`\n`,_jsx(ParamField,{body:`quoteId`,type:`string`,id:`param-quote-id`,children:_jsx(_components.p,{children:`Quote ID from the Quote API to lock in a specific exchange rate. Omit to use the live spot rate.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response Fields`}),`\n`,_jsx(ResponseField,{name:`code`,type:`integer`,id:`param-code`,children:_jsxs(_components.p,{children:[`Response status code. `,_jsx(_components.code,{children:`200`}),` indicates success.`]})}),`\n`,_jsx(ResponseField,{name:`msg`,type:`string`,id:`param-msg`,children:_jsx(_components.p,{children:`Human-readable response message.`})}),`\n`,_jsxs(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:[_jsx(_components.p,{children:`Order result object.`}),_jsx(Expandable,{title:`data fields`,children:_jsx(ResponseField,{name:`data.orderId`,type:`integer`,id:`param-data-order-id`,children:_jsx(_components.p,{children:`The unique numeric ID of the created order. Use this to retrieve order status and details.`})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,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:`14`,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://api.velafi.com/v2/order/crypto_to_fiat\"`}),_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:` \"X-BH-TOKEN: YOUR_TOKEN\"`}),_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:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"Mexico\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"clientId\": \"my-offramp-2024-001\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchantId\": 3,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"crypto\": \"USDT\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"fiat\": \"MXN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cryptoAmount\": 1000.00,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"userPaymentId\": 91,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"remark\": \"Payout to supplier\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quoteId\": \"e46836d68a4a4a6f8f2f609352cffb2f\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_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:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SUCCESS\"`}),_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:` \"data\"`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1123123123`})]}),`\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(Heading,{level:`2`,id:`funding-the-order`,children:`Funding the order`}),`\n`,_jsxs(_components.p,{children:[`The crypto for an off-ramp order comes from the merchant’s crypto balance for the `,_jsx(_components.code,{children:`crypto`}),` and `,_jsx(_components.code,{children:`merchantId`}),` in the request. Check the balance with `,_jsx(_components.a,{href:`/api-reference/merchant/get-crypto-assets-balance`,children:`Crypto Balance`}),` and top it up through the merchant’s `,_jsx(_components.a,{href:`/api-reference/merchant/get-crypto-deposit-address`,children:`deposit address`}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Balance covers the order:`}),` VelaFi debits the crypto from the balance when it creates the order.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Balance is too low:`}),` the request is rejected with an insufficient-balance error, unless post-funded off-ramp is enabled for your account (enablement can differ by fiat currency).`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`With post-funded off-ramp enabled, an underfunded order waits in `,_jsx(_components.code,{children:`status: 32`}),` (awaiting crypto deposit). If the order first needs compliance review (`,_jsx(_components.code,{children:`status: 10`}),` or `,_jsx(_components.code,{children:`11`}),`), it moves to `,_jsx(_components.code,{children:`32`}),` once approved. While it is in `,_jsx(_components.code,{children:`32`}),`, order detail returns `,_jsx(_components.code,{children:`orderExpireTimestamp`}),`, the funding deadline as a Unix timestamp in seconds. VelaFi checks the merchant’s balance every minute; when several orders are waiting on the same merchant and crypto, the balance is applied to them oldest first. Once the balance covers an order, VelaFi debits the crypto and the order moves to `,_jsx(_components.code,{children:`status: 40`}),`, or `,_jsx(_components.code,{children:`31`}),` if supporting documents are required. If the deadline passes first, the order is canceled (`,_jsx(_components.code,{children:`status: 70`}),`).`]})}),`\n`,_jsxs(_components.p,{children:[`For a `,_jsx(_components.code,{children:`crypto_to_fiat`}),` order in `,_jsx(_components.code,{children:`status: 50`}),` (paid), `,_jsx(_components.a,{href:`/api-reference/order/confirm-a-specific-order`,children:_jsx(_components.code,{children:`POST /v2/order/confirm`})}),` completes the order (`,_jsx(_components.code,{children:`status: 60`}),`).`]}),`\n`,_jsx(Heading,{level:`2`,id:`idempotency-and-retries`,children:`Idempotency and retries`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`clientId`}),` to make order creation safe to retry.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`clientId`}),` is optional. When you send it, it must be at most 40 characters and unique on your account across all `,_jsx(_components.code,{children:`fiat_to_crypto`}),` and `,_jsx(_components.code,{children:`crypto_to_fiat`}),` orders, for all of your merchants.`]}),`\n`,_jsxs(_components.li,{children:[`A create request that reuses an existing `,_jsx(_components.code,{children:`clientId`}),` is rejected with a repeated-submission error, and no new order is created. The response does not return the original order; look it up instead.`]}),`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.code,{children:`clientId`}),` stays bound to its order permanently, including after the order is canceled. Use a new `,_jsx(_components.code,{children:`clientId`}),` for a new order.`]}),`\n`,_jsxs(_components.li,{children:[`Look up an order by `,_jsx(_components.code,{children:`clientId`}),` with `,_jsx(_components.code,{children:`GET /v2/order/detail?orderType=crypto_to_fiat\u0026clientId={clientId}`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`If a create request times out or returns no response:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Call `,_jsx(_components.code,{children:`GET /v2/order/detail`}),` with the same `,_jsx(_components.code,{children:`orderType`}),` and `,_jsx(_components.code,{children:`clientId`}),`.`]}),`\n`,_jsx(_components.li,{children:`If the order is found, the original request succeeded. Do not create it again.`}),`\n`,_jsxs(_components.li,{children:[`If it is not found, retry with the same `,_jsx(_components.code,{children:`clientId`}),`. If the first request did create the order in the meantime, the retry is rejected as a duplicate instead of creating a second order.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`quoteId`}),` can be consumed by a create request that is then rejected. Request a new quote before you retry.`]})})]})}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 an Off-Ramp Order","sidebarTitle":"Crypto→Fiat Order","description":"Create a crypto-to-fiat off-ramp order. The crypto is debited from the merchant's crypto balance and local fiat is paid out to a registered beneficiary.","api":"POST /v2/order/crypto_to_fiat","href":"/api-reference/order/create-a-crypto-to-fiat-order"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Endpoint","slug":"endpoint","depth":2,"children":[]},{"title":"Request Headers","slug":"request-headers","depth":2,"children":[]},{"title":"Request Body Parameters","slug":"request-body-parameters","depth":2,"children":[]},{"title":"Response Fields","slug":"response-fields","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]},{"title":"Funding the order","slug":"funding-the-order","depth":2,"children":[]},{"title":"Idempotency and retries","slug":"idempotency-and-retries","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Create an Off-Ramp Order","path":"/v2/order/crypto_to_fiat","servers":[{"url":"https://api-test.velafi.com"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"X-BH-TOKEN":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"country":[{"type":"string","description":"Full country name for the off-ramp (e.g., `\"Mexico\"` , `\"Argentina\"` ). Must match the country associated with the chosen `userPaymentId` .","required":true}],"crypto":[{"type":"string","description":"Ticker symbol of the cryptocurrency to convert (e.g., `\"USDT\"` , `\"USDC\"` ).","required":true}],"fiat":[{"type":"string","description":"ISO 4217 fiat currency code the beneficiary will receive (e.g., `\"MXN\"` , `\"ARS\"` , `\"BRL\"` ).","required":true}],"userPaymentId":[{"type":"integer","description":"The numeric ID of the beneficiary (user payment method) to receive the fiat payout. Retrieve this from `GET /v2/payments` .","required":true}],"clientId":[{"type":"string","description":"Your own order reference ID, up to 40 characters. It must be unique across all `fiat_to_crypto` and `crypto_to_fiat` orders on your account; a second create request with the same `clientId` is rejected. It is returned in Get Order responses and can be used instead of `orderId` to look the order up. See Idempotency and retries ."}],"merchantId":[{"type":"integer","description":"Numeric ID of the merchant the order belongs to. The crypto is debited from this merchant’s balance. Requests without a valid `merchantId` are rejected.","required":true}],"cryptoAmount":[{"type":"number","description":"Amount of cryptocurrency to convert (e.g., `1000.00` ). Ignored when a positive `fiatAmount` is also sent."}],"fiatAmount":[{"type":"number","description":"Amount of fiat currency the beneficiary should receive (e.g., `21000.00` ). Provide `fiatAmount` or `cryptoAmount` ; if you send both, `fiatAmount` takes precedence."}],"remark":[{"type":"string","description":"Optional free-text note attached to the order."}],"quoteId":[{"type":"string","description":"Quote ID from the Quote API to lock in a specific exchange rate. Omit to use the live spot rate."}]}}],"examples":{"example":{"value":{"country":"\u003cstring>","crypto":"\u003cstring>","fiat":"\u003cstring>","userPaymentId":123,"clientId":"\u003cstring>","merchantId":123,"cryptoAmount":123,"fiatAmount":123,"remark":"\u003cstring>","quoteId":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"code":[{"type":"integer","description":"Response status code. `200` indicates success."}],"msg":[{"type":"string","description":"Human-readable response message."}],"data":[{"type":"object","properties":{"data.orderId":[{"type":"integer","description":"The unique numeric ID of the created order. Use this to retrieve order status and details."}]},"description":"Order result object."}]}}],"examples":{"example":{"value":{"code":123,"msg":"\u003cstring>","data":{"data.orderId":123}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"vela-fi","siteName":"VelaFi","title":"Create an Off-Ramp Order - VelaFi","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/order/create-a-crypto-to-fiat-order","matchLevel":0},"cn":{"href":"/cn/api-reference/order/create-a-crypto-to-fiat-order","matchLevel":1},"es":{"href":"/es/api-reference/order/create-a-crypto-to-fiat-order","matchLevel":1}}},"lastModified":"2026-11-04T03:05:11.494Z","originalFileLocation":"api-reference/order/create-a-crypto-to-fiat-order.mdx","locale":"en"},"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 a crypto-to-fiat off-ramp order. The crypto is debited from the merchant\u0026#x27;s crypto balance and local fiat is paid out to a registered beneficiary.\">\u003cmeta data-mint-head name=\"application-name\" content=\"VelaFi\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vela-fi/FXnTM7SlGCRLFghR/_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/vela-fi/FXnTM7SlGCRLFghR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vela-fi/FXnTM7SlGCRLFghR/_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/vela-fi/FXnTM7SlGCRLFghR/_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/vela-fi/FXnTM7SlGCRLFghR/_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/vela-fi/FXnTM7SlGCRLFghR/_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/vela-fi/FXnTM7SlGCRLFghR/_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/vela-fi/FXnTM7SlGCRLFghR/_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/vela-fi/FXnTM7SlGCRLFghR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create an Off-Ramp Order - VelaFi\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a crypto-to-fiat off-ramp order. The crypto is debited from the merchant\u0026#x27;s crypto balance and local fiat is paid out to a registered beneficiary.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"VelaFi\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vela-fi.mintlify.app/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+an+Off-Ramp+Order\u0026amp;description=Create+a+crypto-to-fiat+off-ramp+order.+The+crypto+is+debited+from+the+merchant%27s+crypto+balance+and+local+fiat+is+paid+out+to+a+registered+beneficiary.\u0026amp;theme=d88b59e71e5970c6ea7086ed\u0026amp;signature=02613d48eefbf56701e5c25ff738ae7e585822a58dd995205078158001c7f665\">\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 an Off-Ramp Order - VelaFi\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a crypto-to-fiat off-ramp order. The crypto is debited from the merchant\u0026#x27;s crypto balance and local fiat is paid out to a registered beneficiary.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vela-fi.mintlify.app/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+an+Off-Ramp+Order\u0026amp;description=Create+a+crypto-to-fiat+off-ramp+order.+The+crypto+is+debited+from+the+merchant%27s+crypto+balance+and+local+fiat+is+paid+out+to+a+registered+beneficiary.\u0026amp;theme=d88b59e71e5970c6ea7086ed\u0026amp;signature=02613d48eefbf56701e5c25ff738ae7e585822a58dd995205078158001c7f665\">\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/vela-fi/FXnTM7SlGCRLFghR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"VelaFi\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#169f3f\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-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/order/create-a-crypto-to-fiat-order.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.velafi.com/cn/api-reference/order/create-a-crypto-to-fiat-order\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.velafi.com/es/api-reference/order/create-a-crypto-to-fiat-order\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.velafi.com/#organization\",\"name\":\"VelaFi\",\"url\":\"https://docs.velafi.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vela-fi/kEiS0W9mzAeRFvm2/logo/light.svg?fit=max\u0026auto=format\u0026n=kEiS0W9mzAeRFvm2\u0026q=85\u0026s=3369d850da98cb834dddcd64c977c11f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.velafi.com#website\",\"name\":\"VelaFi\",\"url\":\"https://docs.velafi.com\",\"publisher\":{\"@id\":\"https://docs.velafi.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order#webpage\",\"url\":\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order\",\"name\":\"Create an Off-Ramp Order\",\"description\":\"Create a crypto-to-fiat off-ramp order. The crypto is debited from the merchant's crypto balance and local fiat is paid out to a registered beneficiary.\",\"dateModified\":\"2026-11-04T03:05:11.494Z\",\"isPartOf\":{\"@id\":\"https://docs.velafi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Orders\",\"item\":\"https://docs.velafi.com/api-reference/order/create-a-fiat-to-crypto-order\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create an Off-Ramp Order\",\"item\":\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order#apireference\",\"headline\":\"Create an Off-Ramp Order\",\"name\":\"Create an Off-Ramp Order\",\"description\":\"Create a crypto-to-fiat off-ramp order. The crypto is debited from the merchant's crypto balance and local fiat is paid out to a registered beneficiary.\",\"url\":\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order\",\"mainEntityOfPage\":{\"@id\":\"https://docs.velafi.com/api-reference/order/create-a-crypto-to-fiat-order#webpage\"},\"dateModified\":\"2026-11-04T03:05:11.494Z\",\"publisher\":{\"@id\":\"https://docs.velafi.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.velafi.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"VelaFi\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"VelaFi","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Overview","sidebarTitle":"Overview","href":"/api-reference/overview"},{"title":"Authentication","sidebarTitle":"Authentication","href":"/api-reference/authentication"},{"title":"Generate a Token","sidebarTitle":"Generate Token","api":"GET /v2/token/generate","playground":"none","href":"/api-reference/generate-token"}]},{"group":"Account","pages":[{"title":"Get Account Details","sidebarTitle":"Get Account Details","api":"GET /v2/user/account","href":"/api-reference/account/get-account-details"}]},{"group":"Configuration","pages":[{"title":"Base URLs","sidebarTitle":"API Endpoint","href":"/api-reference/basic-configuration/api-endpoint"},{"title":"List Countries","sidebarTitle":"List Countries","api":"GET /v2/base/countrys","href":"/api-reference/basic-configuration/get-list-of-countries"},{"title":"List Fiat Currencies","sidebarTitle":"List Fiat Currencies","api":"GET /v2/base/fiats","href":"/api-reference/basic-configuration/get-list-of-fiat-currencies"},{"title":"List Cryptocurrencies","sidebarTitle":"List Crypto Currencies","api":"GET /v2/base/cryptos","href":"/api-reference/basic-configuration/get-list-of-crypto-currencies"},{"title":"List Fiat→Crypto Pairs","sidebarTitle":"Fiat/Crypto Pairs","api":"GET /v2/base/buy/symbols","href":"/api-reference/basic-configuration/get-fiat-crypto-pairs"},{"title":"List Crypto→Fiat Pairs","sidebarTitle":"Crypto/Fiat Pairs","api":"GET /v2/base/sell/symbols","href":"/api-reference/basic-configuration/get-crypto-fiat-pairs"},{"title":"List Fiat→Fiat Pairs","sidebarTitle":"Fiat/Fiat Pairs","api":"GET /v2/base/fiat/symbols","href":"/api-reference/basic-configuration/get-fiat-fiat-pairs"},{"title":"List Fiat→Crypto Payment Methods","sidebarTitle":"Fiat→Crypto Methods","api":"GET /v2/base/buy/payments","href":"/api-reference/basic-configuration/get-fiat-crypto-payment-methods"},{"title":"List Crypto→Fiat Payment Methods","sidebarTitle":"Crypto→Fiat Methods","api":"GET /v2/base/sell/payments","href":"/api-reference/basic-configuration/get-crypto-fiat-payment-methods"},{"title":"List Fiat→Fiat Payment Methods","sidebarTitle":"Fiat/Fiat Methods","api":"GET /v2/base/fiat/payments","href":"/api-reference/basic-configuration/get-fiat-fiat-payment-methods"},{"title":"Upload a File","sidebarTitle":"Upload File","api":"POST /v2/base/file/upload","href":"/api-reference/basic-configuration/upload-file"}]},{"group":"Merchants","pages":[{"title":"Create a Merchant","sidebarTitle":"Create Merchant","api":"POST /v2/merchants","href":"/api-reference/merchant/create-merchant"},{"title":"List Merchants","sidebarTitle":"List Merchants","api":"GET /v2/merchants","href":"/api-reference/merchant/get-a-list-of-merchants"},{"title":"Activate an Individual Merchant Account","sidebarTitle":"Activate Individual","api":"POST /v2/merchant/accounts","href":"/api-reference/merchant/activate-merchant-account-for-individual"},{"title":"Activate a Business Merchant Account","sidebarTitle":"Activate Business","api":"POST /v2/merchant/accounts","href":"/api-reference/merchant/activate-merchant-account-for-business"},{"title":"Create Virtual Accounts","sidebarTitle":"Create Virtual Accounts","api":"POST /v2/merchant/virtual/accounts","href":"/api-reference/merchant/create-multiple-virtual-account"},{"title":"List Merchant Accounts","sidebarTitle":"Merchant Accounts","api":"GET /v2/merchant/accounts","href":"/api-reference/merchant/get-a-list-of-merchant-accounts"},{"title":"Request a Limit Upgrade","sidebarTitle":"Upgrade Limit","api":"POST /v2/upgrade/limits","href":"/api-reference/merchant/upgrade-merchant-limit"},{"title":"Get Pending Fund Account","sidebarTitle":"Pending Fund Account","api":"GET /v2/merchant/addfunds","href":"/api-reference/merchant/get-pending-fund-account"},{"title":"List Virtual Accounts","sidebarTitle":"List Virtual Accounts","api":"GET /v2/merchant/virtual/addfunds","href":"/api-reference/merchant/get-multiple-virtual-account"},{"title":"Claim Pending Funds","sidebarTitle":"Claim Pending Fund","api":"POST /v2/merchant/claimfunds","href":"/api-reference/merchant/claim-pending-fund"},{"title":"Get Transfer Fee","sidebarTitle":"Transfer Fee","api":"GET /v2/merchant/transfer_fee","href":"/api-reference/merchant/get-transfer-pending-funds-fee"},{"title":"Transfer Pending Funds","sidebarTitle":"Transfer Funds","api":"POST /v2/merchant/transfer","href":"/api-reference/merchant/transfer-pending-funds"},{"title":"List Funding Records","sidebarTitle":"Funding Records","api":"GET /v2/merchant/funding/records","href":"/api-reference/merchant/retrieve-funding-records"},{"title":"List Fiat Flows","sidebarTitle":"Fiat Flow","api":"GET /v2/merchant/fiat/flows","href":"/api-reference/merchant/get-a-list-merchant-fiat-flow"},{"title":"Get Crypto Balance","sidebarTitle":"Crypto Balance","api":"GET /v2/assets/account/assets","href":"/api-reference/merchant/get-crypto-assets-balance"},{"title":"Get Crypto Deposit Address","sidebarTitle":"Deposit Address","api":"GET /v2/assets/depositAddress","href":"/api-reference/merchant/get-crypto-deposit-address"},{"title":"Create a Crypto Transfer","sidebarTitle":"Crypto Transfer","api":"POST /v2/assets/internalTransfer","href":"/api-reference/merchant/crypto-transfer"},{"title":"List Crypto Transfers","sidebarTitle":"Crypto Transfer History","api":"GET /v2/assets/internalTransferOrders","href":"/api-reference/merchant/query-crypto-transfers"},{"title":"Get Woovi Liveness URL","sidebarTitle":"Woovi Liveness","api":"POST /v2/merchant/woovi/liveness","href":"/api-reference/merchant/get-woovi-liveness-url"}]},{"group":"Crypto Wallet","pages":[{"api":"GET /v2/assets/withdrawQuota","title":"Get Withdrawal Quota","sidebarTitle":"Withdrawal Quota","href":"/api-reference/crypto-wallet/get-withdrawal-quota"},{"api":"POST /v2/assets/withdraw","title":"Create a Crypto Withdrawal","sidebarTitle":"Create Crypto Withdrawal","href":"/api-reference/crypto-wallet/create-crypto-withdrawal"},{"api":"GET /v2/assets/depositOrders","title":"List Crypto Deposits","sidebarTitle":"Crypto Deposit History","href":"/api-reference/crypto-wallet/get-crypto-deposit-history"},{"api":"GET /v2/assets/withdrawalOrders","title":"List Crypto Withdrawals","sidebarTitle":"Crypto Withdrawal History","href":"/api-reference/crypto-wallet/get-crypto-withdrawal-history"},{"api":"POST /v2/user/whitelistAddress","title":"Add a Whitelist Address","sidebarTitle":"Add Whitelist Address","href":"/api-reference/crypto-wallet/add-whitelist-address"},{"api":"GET /v2/user/whitelistAddress","title":"List Whitelist Addresses","sidebarTitle":"List Whitelist Addresses","href":"/api-reference/crypto-wallet/get-whitelist-addresses"},{"api":"DELETE /v2/user/whitelistAddress/{addressId}","title":"Delete a Whitelist Address","sidebarTitle":"Delete Whitelist Address","href":"/api-reference/crypto-wallet/delete-whitelist-address"}]},{"group":"Beneficiaries","pages":[{"api":"GET /v2/payments/support/templates","title":"List Supported Payment Methods","sidebarTitle":"Supported Payment Methods","href":"/api-reference/beneficiary/get-supported-payment-methods"},{"title":"Get Payment Templates","sidebarTitle":"Payment Templates","api":"GET /v2/payments/templates","href":"/api-reference/beneficiary/get-payment-templates"},{"title":"Get Template Metadata","sidebarTitle":"Template Metadata","api":"GET /v2/payments/templates/metamessage","href":"/api-reference/beneficiary/get-payment-templates-metamessage"},{"title":"Add a Beneficiary","sidebarTitle":"Add Beneficiary","api":"POST /v2/payments","href":"/api-reference/beneficiary/add-beneficiary"},{"title":"List Beneficiaries","sidebarTitle":"Get Beneficiaries","api":"GET /v2/payments","href":"/api-reference/beneficiary/get-beneficiary"},{"title":"Delete a Beneficiary","sidebarTitle":"Delete Beneficiary","href":"/api-reference/beneficiary/delete-beneficiary"},{"title":"Set the Refund Account","sidebarTitle":"Set Refund Account","api":"POST /v2/payments/refund_account","href":"/api-reference/beneficiary/set-refund-account"},{"api":"GET /v2/merchant/check/alias","title":"Check an Alias (ARS)","sidebarTitle":"Check Alias (ARS)","href":"/api-reference/beneficiary/check-alias"},{"api":"GET /v2/merchant/check/cvu","title":"Check a CVU/CBU (ARS)","sidebarTitle":"Check CVU (ARS)","href":"/api-reference/beneficiary/check-cvu"}]},{"group":"Quotes","pages":[{"title":"Get a Crypto/Fiat Quote","sidebarTitle":"Crypto/Fiat Quote","api":"GET /v2/user/crypto-quote","href":"/api-reference/quote/get-user-quote-for-crypto-fiat"},{"title":"Get a Fiat/Fiat Quote","sidebarTitle":"Fiat/Fiat Quote","api":"GET /v2/user/fiat-quote","href":"/api-reference/quote/get-user-quote-for-fiat-fiat"}]},{"group":"Orders","pages":[{"title":"Create an On-Ramp Order","sidebarTitle":"Fiat→Crypto Order","description":"Create a fiat-to-crypto on-ramp order. A user pays in local fiat and receives cryptocurrency to their wallet at the current exchange rate.","api":"POST /v2/order/fiat_to_crypto","href":"/api-reference/order/create-a-fiat-to-crypto-order"},{"title":"Create an Off-Ramp Order","sidebarTitle":"Crypto→Fiat Order","api":"POST /v2/order/crypto_to_fiat","href":"/api-reference/order/create-a-crypto-to-fiat-order"},{"title":"Create a Global Payment Order","sidebarTitle":"Fiat→Fiat Order","description":"Create a fiat-to-fiat global payment order. Funds are collected in one country's fiat and paid out in another's via stablecoin rails.","api":"POST /v2/order/fiat_to_fiat","href":"/api-reference/order/create-a-fiat-to-fiat-order"},{"title":"Confirm an Order","sidebarTitle":"Confirm Order","api":"POST /v2/order/confirm","href":"/api-reference/order/confirm-a-specific-order"},{"title":"Get an Order","sidebarTitle":"Get Order","api":"GET /v2/order/detail","href":"/api-reference/order/retrieve-a-specific-order"},{"title":"List Orders","sidebarTitle":"List Orders","api":"GET /v2/orders","href":"/api-reference/order/retrieve-a-list-of-orders"},{"title":"Upload Order Documents","sidebarTitle":"Upload Documents","api":"POST /v2/order/invoice","href":"/api-reference/order/upload-invoice-documents-for-a-specific-order"}]},{"group":"Webhooks","pages":[{"title":"Webhook Setup","sidebarTitle":"Webhook Setup","href":"/api-reference/webhooks/webhook-setup"},{"title":"Create a Webhook","sidebarTitle":"Create Webhook","api":"POST /v2/webhook","href":"/api-reference/webhooks/create-webhook-endpoints"},{"title":"List Webhooks","sidebarTitle":"Get Webhooks","api":"GET /v2/webhooks","href":"/api-reference/webhooks/get-webhook-endpoints"},{"title":"Update a Webhook","sidebarTitle":"Update Webhook","href":"/api-reference/webhooks/update-a-webhook"},{"title":"Delete a Webhook","sidebarTitle":"Delete Webhook","href":"/api-reference/webhooks/delete-a-webhook"},{"title":"Order Event","sidebarTitle":"Order Event","href":"/api-reference/webhooks/fiat-crypto-order-message-push"},{"title":"Global Payment Event","sidebarTitle":"Global Payment Event","href":"/api-reference/webhooks/fiat-fiat-order-message-push"},{"title":"Funding Event","sidebarTitle":"Funding Event","href":"/api-reference/webhooks/funding-records-message-push"},{"title":"Stablecoin Payment Event","sidebarTitle":"Stablecoin Payment Event","href":"/api-reference/webhooks/stablecoin-payment-order-message-push"},{"title":"On-Ramp Withdrawal Event","sidebarTitle":"On-Ramp Withdrawal Event","href":"/api-reference/webhooks/on-ramp-withdraw-message-push"},{"title":"Crypto Withdrawal Event","sidebarTitle":"Crypto Withdrawal Event","href":"/api-reference/webhooks/crypto-withdraw-message-push"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/docs/changelog"}]}]},{"language":"cn","pages":[{"title":"cn","href":"/cn/api-reference/order/create-a-crypto-to-fiat-order"}]},{"language":"es","pages":[{"title":"es","href":"/es/api-reference/order/create-a-crypto-to-fiat-order"}]}]},"basePath":"","title":"Create an Off-Ramp Order - VelaFi","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","b0f84f53ff","2b790eda92"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-BAvA99GL.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js"]}