Accept local fiat payments from your users and automatically deliver crypto to their wallets using the VelaFi fiat-to-crypto on-ramp API.
The VelaFi fiat-to-crypto on-ramp lets you accept local currency payments — such as MXN, ARS, BRL, or COP — and settle the equivalent cryptocurrency directly to your user’s wallet. The API handles exchange rate quoting, order creation, payment instruction delivery, and crypto release, so you can focus on building your product rather than managing payment rails.
Make sure the paymentId and merchantId you supply correspond to active, configured records in your VelaFi account.
⌘I
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"VelaFi","colors":{"primary":"#169f3f","light":"#040404","dark":"#88fa9b"},"logo":{"light":"https://media.brand.dev/5ab20df8-ac5f-4968-a43a-f8e39fc9446f.png","dark":"https://media.brand.dev/ff731e01-19fe-4676-bde7-5b4740c3ce6e.png"},"favicon":"https://mintcdn.com/vela-fi/lFv-KZlq_laGOaTc/favicon.svg?fit=max\u0026auto=format\u0026n=lFv-KZlq_laGOaTc\u0026q=85\u0026s=20380ad9468dd215dde002fa198ae5da","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"}]}},"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":"6aea9ab388bdcffc22cb7db4","collectionId":"896a9ecb-43c5-42ab-b2d7-0901b2481bed","liveDeploymentHistoryId":"6aea9ab388bdcffc22cb7db4","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeaa0e24c678c369dc1dc2d","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"en","tag":"API Reference","count":70},{"language":"cn","tag":"API 参考","count":70},{"language":"en","tag":"Documentation","count":21},{"language":"cn","tag":"文档","count":21},{"language":"en","tag":"Merchants","count":19},{"language":"cn","tag":"商户","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":"en","tag":"Beneficiaries","count":9},{"language":"en","tag":"Guides","count":9},{"language":"cn","tag":"收款人","count":9},{"language":"cn","tag":"指南","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":"en","tag":"Core Concepts","count":6},{"language":"cn","tag":"核心概念","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":"byok-sep-25","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":"billing-updated-9-15","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":"docs/guides/on-ramp","slug":"/docs/guides/on-ramp","pageMetadata":{"title":"On-Ramp (Fiat to Crypto)","sidebarTitle":"On-Ramp","description":"Accept local fiat payments from your users and automatically deliver crypto to their wallets using the VelaFi fiat-to-crypto on-ramp API.","href":"/docs/guides/on-ramp"},"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: \"Accept local fiat payments from your users and automatically deliver crypto to their wallets using the VelaFi fiat-to-crypto on-ramp API.\"\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseField,Steps,Tip}=_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(!Steps)_missingMdxReference(`Steps`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The VelaFi fiat-to-crypto on-ramp lets you accept local currency payments — such as MXN, ARS, BRL, or COP — and settle the equivalent cryptocurrency directly to your user’s wallet. The API handles exchange rate quoting, order creation, payment instruction delivery, and crypto release, so you can focus on building your product rather than managing payment rails.`}),`\n`,_jsxs(Steps,{children:[_jsx(Heading,{level:`3`,id:`confirm-prerequisites`,children:`Confirm prerequisites`}),_jsx(_components.p,{children:`Before creating an on-ramp order, make sure you have completed the following setup steps:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Merchant account activated`}),` — your merchant record must exist and its fiat account must be in an active state.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Payment method ID ready`}),` — obtain the `,_jsx(_components.code,{children:`paymentId`}),` for the on-ramp payment method you want to use (e.g., SPEI for Mexico, PIX for Brazil). Refer to the `,_jsx(_components.a,{href:`/docs/payment-methods`,children:`Payment Method ID guide`}),` for how to look these up.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API credentials available`}),` — all requests require the `,_jsx(_components.code,{children:`X-BH-TOKEN`}),` header containing a business token from `,_jsx(_components.code,{children:`GET /v2/token/generate`}),`.`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`get-a-quote-optional`,children:`Get a quote (optional)`}),_jsxs(_components.p,{children:[`Request a real-time exchange rate before placing the order. The `,_jsx(_components.code,{children:`price`}),` is in units of fiat per 1 unit of crypto. With `,_jsx(_components.code,{children:`createQuoteId=true`}),`, the response also includes a `,_jsx(_components.code,{children:`quoteId`}),` you can pass when creating the order to guarantee that rate.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`GET /v2/user/crypto-quote`})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Query parameters:`})}),_jsx(ParamField,{query:`country`,type:`string`,required:true,id:`param-country`,children:_jsxs(_components.p,{children:[`Name of the country where the fiat payment originates (e.g., `,_jsx(_components.code,{children:`\"Mexico\"`}),`).`]})}),_jsx(ParamField,{query:`from`,type:`string`,required:true,id:`param-from`,children:_jsxs(_components.p,{children:[`The fiat currency code to convert from (e.g., `,_jsx(_components.code,{children:`\"MXN\"`}),`).`]})}),_jsx(ParamField,{query:`to`,type:`string`,required:true,id:`param-to`,children:_jsxs(_components.p,{children:[`The cryptocurrency to convert to (e.g., `,_jsx(_components.code,{children:`\"USDT\"`}),`).`]})}),_jsx(ParamField,{query:`createQuoteId`,type:`boolean`,id:`param-create-quote-id`,children:_jsxs(_components.p,{children:[`Set to `,_jsx(_components.code,{children:`true`}),` to generate a `,_jsx(_components.code,{children:`quoteId`}),` that you can use to lock the quoted price when placing an order.`]})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example response:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,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:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"21.4104\"`}),_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:` \"quoteId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"e46836d68a4a4a6f8f2f609352cffb2f\"`})]}),`\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(Tip,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`quoteId`}),` is valid for `,_jsx(_components.strong,{children:`10 seconds`}),` in production (300 seconds in the sandbox) and is single-use by default. Pass it in the `,_jsx(_components.code,{children:`quoteId`}),` field when you create the order to honour the quoted rate. If you omit it, the order uses the rate at the time of placement.`]})}),_jsx(Heading,{level:`3`,id:`create-the-on-ramp-order`,children:`Create the on-ramp order`}),_jsxs(_components.p,{children:[`Submit a `,_jsx(_components.code,{children:`POST`}),` request to `,_jsx(_components.code,{children:`/v2/order/fiat_to_crypto`}),` with the order details. The response returns an `,_jsx(_components.code,{children:`orderId`}),` you use to track the order.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`POST /v2/order/fiat_to_crypto`})]}),_jsx(Heading,{level:`4`,id:`request-parameters`,children:`Request parameters`}),_jsx(ParamField,{body:`country`,type:`string`,required:true,id:`param-country-1`,children:_jsxs(_components.p,{children:[`Name of the country where the fiat payment originates (e.g., `,_jsx(_components.code,{children:`\"Mexico\"`}),`).`]})}),_jsx(ParamField,{body:`crypto`,type:`string`,required:true,id:`param-crypto`,children:_jsxs(_components.p,{children:[`Cryptocurrency to deliver to the user (e.g., `,_jsx(_components.code,{children:`\"USDT\"`}),`).`]})}),_jsx(ParamField,{body:`fiat`,type:`string`,required:true,id:`param-fiat`,children:_jsxs(_components.p,{children:[`Fiat currency the user pays in (e.g., `,_jsx(_components.code,{children:`\"MXN\"`}),`).`]})}),_jsx(ParamField,{body:`paymentId`,type:`number`,required:true,id:`param-payment-id`,children:_jsxs(_components.p,{children:[`ID of the payment method for the on-ramp deposit (e.g., SPEI, PIX). See `,_jsx(_components.a,{href:`/docs/payment-methods`,children:`Payment Method IDs`}),`.`]})}),_jsx(ParamField,{body:`fiatAmount`,type:`decimal`,id:`param-fiat-amount`,children:_jsxs(_components.p,{children:[`Amount of fiat currency the user will pay (e.g., `,_jsx(_components.code,{children:`1000.00`}),`). Provide either `,_jsx(_components.code,{children:`fiatAmount`}),` or `,_jsx(_components.code,{children:`cryptoAmount`}),`.`]})}),_jsx(ParamField,{body:`cryptoAmount`,type:`decimal`,id:`param-crypto-amount`,children:_jsxs(_components.p,{children:[`Amount of crypto to deliver to the user (e.g., `,_jsx(_components.code,{children:`50.00`}),`). Provide either `,_jsx(_components.code,{children:`cryptoAmount`}),` or `,_jsx(_components.code,{children:`fiatAmount`}),`.`]})}),_jsx(ParamField,{body:`clientId`,type:`string`,id:`param-client-id`,children:_jsxs(_components.p,{children:[`Your own order reference ID, up to 40 characters, unique across all your `,_jsx(_components.code,{children:`fiat_to_crypto`}),` and `,_jsx(_components.code,{children:`crypto_to_fiat`}),` orders. A repeated `,_jsx(_components.code,{children:`clientId`}),` is rejected, so you can safely retry a create request with the same value. Returned as-is in subsequent order queries. See `,_jsx(_components.a,{href:`/api-reference/order/create-a-fiat-to-crypto-order#idempotency-and-retries`,children:`Idempotency and retries`}),`.`]})}),_jsx(ParamField,{body:`merchantId`,type:`number`,required:true,id:`param-merchant-id`,children:_jsxs(_components.p,{children:[`ID of the merchant the order belongs to. Requests without a valid `,_jsx(_components.code,{children:`merchantId`}),` are rejected.`]})}),_jsx(ParamField,{body:`quoteId`,type:`string`,id:`param-quote-id`,children:_jsxs(_components.p,{children:[`Quote ID returned by `,_jsx(_components.code,{children:`GET /v2/user/crypto-quote`}),`. Pass this to lock the quoted exchange rate for this order.`]})}),_jsx(ParamField,{body:`depositAlias`,type:`string`,id:`param-deposit-alias`,children:_jsx(_components.p,{children:`Alias of a virtual account to associate with this deposit, if your setup uses virtual account routing.`})}),_jsxs(ParamField,{body:`inFieldJson`,type:`object`,id:`param-in-field-json`,children:[_jsx(_components.p,{children:`Additional structured fields required by certain payment methods.`}),_jsx(Expandable,{title:`inFieldJson fields`,children:_jsx(ParamField,{body:`inFieldJson.bank`,type:`enum`,id:`param-in-field-json-bank`,children:_jsxs(_components.p,{children:[`Bank code required when using Colombian payment methods (e.g., `,_jsx(_components.code,{children:`paymentId=141`}),`). See the `,_jsx(_components.a,{href:`/api-reference/beneficiary/get-payment-templates#colombian-bank-codes-1`,children:`Colombian bank codes list`}),`.`]})})})]}),_jsx(ParamField,{body:`remark`,type:`string`,id:`param-remark`,children:_jsx(_components.p,{children:`Free-text note attached to the order for your reference.`})}),_jsx(Heading,{level:`4`,id:`example-request`,children:`Example request`}),_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/fiat_to_crypto`}),_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-order-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:` \"fiatAmount\": 1000.00,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"paymentId\": 105,`})}),`\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:` \"remark\": \"On-ramp for user #1234\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(Heading,{level:`4`,id:`example-response`,children:`Example response`}),_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`]})})}),_jsxs(_components.p,{children:[`Store the returned `,_jsx(_components.code,{children:`orderId`}),` — you will use it to retrieve payment instructions and monitor order status.`]}),_jsx(Heading,{level:`3`,id:`send-payment-to-the-designated-account`,children:`Send payment to the designated account`}),_jsx(_components.p,{children:`After the order is created, retrieve the order details to get the payment instructions (e.g., CLABE account number for Mexico). VelaFi supports two payment flows:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Pending Fund balance payment`}),` — if your merchant account holds a Pending Fund balance, VelaFi can deduct the fiat amount from it automatically without requiring a real-time bank transfer.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Bank transfer`}),` — the user (or your system) sends a bank transfer to the payment account details returned in `,_jsx(_components.code,{children:`paymentInfo`}),`. On automatic payment methods, VelaFi’s bank integration moves the order to `,_jsx(_components.code,{children:`status: 50`}),` (paid). On manual payment methods, call `,_jsx(_components.a,{href:`/api-reference/order/confirm-a-specific-order`,children:_jsx(_components.code,{children:`POST /v2/order/confirm`})}),` with `,_jsx(_components.code,{children:`orderType`}),` set to `,_jsx(_components.code,{children:`fiat_to_crypto`}),` after the transfer is sent, to mark the order as paid.`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`retrieve-the-order-and-monitor-status`,children:`Retrieve the order and monitor status`}),_jsxs(_components.p,{children:[`Poll `,_jsx(_components.code,{children:`GET /v2/order/detail`}),` with the `,_jsx(_components.code,{children:`orderId`}),` and `,_jsx(_components.code,{children:`orderType=fiat_to_crypto`}),` to check the current state of the order.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`GET /v2/order/detail?orderId={orderId}\u0026orderType=fiat_to_crypto`})]}),_jsx(Heading,{level:`4`,id:`example-request-2`,children:`Example request`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,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:` GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.velafi.com/v2/order/detail?orderId=493829236956962816\u0026orderType=fiat_to_crypto\"`}),_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\"`})]}),`\n`]})})}),_jsx(Heading,{level:`4`,id:`example-response-2`,children:`Example response`}),_jsx(CodeBlock,{filename:``,numberOfLines:`27`,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:`27`,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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"493829236956962816\"`}),_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:` \"clientId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-order-001\"`}),_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:` \"merchantId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_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:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`105`}),_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:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Mexico\"`}),_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:` \"crypto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USDT\"`}),_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:` \"fiat\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MXN\"`}),_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:` \"orderType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fiat_to_crypto\"`}),_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:` \"orderPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"21.4104\"`}),_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:` \"cryptoAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5.1376\"`}),_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:` \"fiatAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"110\"`}),_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:` \"fiatFee\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_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:` \"orderStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_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:` \"traceNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"20241223907069062e51744c4f0e57\"`}),_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:` \"paymentInfo\"`}),_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:` \"Cuenta CLABE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"000000000000000001\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"failCode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"failReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createTime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1740214865000\"`}),_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:` \"completedTime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1740214866000\"`})]}),`\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(Heading,{level:`4`,id:`response-fields`,children:`Response fields`}),_jsx(ResponseField,{name:`orderId`,type:`string`,id:`param-order-id`,children:_jsx(_components.p,{children:`Unique identifier for this order.`})}),_jsx(ResponseField,{name:`clientId`,type:`string`,id:`param-client-id-1`,children:_jsx(_components.p,{children:`Your own reference ID, echoed back from the create request.`})}),_jsx(ResponseField,{name:`merchantId`,type:`number`,id:`param-merchant-id-1`,children:_jsx(_components.p,{children:`ID of the merchant associated with this order.`})}),_jsx(ResponseField,{name:`paymentId`,type:`number`,id:`param-payment-id-1`,children:_jsx(_components.p,{children:`ID of the payment method used for the fiat deposit.`})}),_jsx(ResponseField,{name:`country`,type:`string`,id:`param-country-2`,children:_jsx(_components.p,{children:`Country where the fiat payment originates.`})}),_jsx(ResponseField,{name:`crypto`,type:`string`,id:`param-crypto-1`,children:_jsx(_components.p,{children:`Cryptocurrency being delivered.`})}),_jsx(ResponseField,{name:`fiat`,type:`string`,id:`param-fiat-1`,children:_jsx(_components.p,{children:`Fiat currency paid by the user.`})}),_jsx(ResponseField,{name:`orderType`,type:`string`,id:`param-order-type`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`fiat_to_crypto`}),` for on-ramp orders.`]})}),_jsx(ResponseField,{name:`orderPrice`,type:`string`,id:`param-order-price`,children:_jsx(_components.p,{children:`Exchange rate captured at the time the order was created.`})}),_jsx(ResponseField,{name:`cryptoAmount`,type:`string`,id:`param-crypto-amount-1`,children:_jsx(_components.p,{children:`Amount of crypto to be delivered to the user.`})}),_jsx(ResponseField,{name:`fiatAmount`,type:`string`,id:`param-fiat-amount-1`,children:_jsx(_components.p,{children:`Amount of fiat currency paid by the user.`})}),_jsx(ResponseField,{name:`fiatFee`,type:`string`,id:`param-fiat-fee`,children:_jsx(_components.p,{children:`Fee charged in fiat currency for this order.`})}),_jsx(ResponseField,{name:`orderStatus`,type:`number`,id:`param-order-status`,children:_jsxs(_components.p,{children:[`Current status code. See `,_jsx(_components.a,{href:`/docs/order-statuses`,children:`Order Statuses`}),`.`]})}),_jsx(ResponseField,{name:`traceNumber`,type:`string`,id:`param-trace-number`,children:_jsx(_components.p,{children:`National central bank reference number for the transaction.`})}),_jsx(ResponseField,{name:`paymentInfo`,type:`object`,id:`param-payment-info`,children:_jsx(_components.p,{children:`Payment instructions for the user (e.g., bank account details). Contents vary by country and payment method.`})}),_jsx(ResponseField,{name:`failCode`,type:`integer`,id:`param-fail-code`,children:_jsxs(_components.p,{children:[`Error code recorded for a failed order. `,_jsx(_components.code,{children:`0`}),` when no failure code is recorded.`]})}),_jsx(ResponseField,{name:`failReason`,type:`string`,id:`param-fail-reason`,children:_jsx(_components.p,{children:`Human-readable description of why the order failed.`})}),_jsx(ResponseField,{name:`createTime`,type:`string`,id:`param-create-time`,children:_jsx(_components.p,{children:`Order creation timestamp in milliseconds (Unix epoch).`})}),_jsx(ResponseField,{name:`completedTime`,type:`string`,id:`param-completed-time`,children:_jsx(_components.p,{children:`Order completion timestamp in milliseconds (Unix epoch).`})}),_jsx(Heading,{level:`4`,id:`order-status-codes`,children:`Order status codes`}),_jsxs(_components.p,{children:[`On-ramp orders use the ramp status codes. See `,_jsx(_components.a,{href:`/docs/order-statuses`,children:`Order Statuses`}),` for the full table, including which codes end an order.`]}),_jsx(Heading,{level:`3`,id:`order-complete-—-crypto-delivered`,children:`Order complete — crypto delivered`}),_jsxs(_components.p,{children:[`Once `,_jsx(_components.code,{children:`orderStatus`}),` reaches `,_jsx(_components.code,{children:`60`}),` (completed), the order is complete. You can also `,_jsx(_components.a,{href:`/docs/guides/webhooks`,children:`subscribe to webhooks`}),` to receive real-time push notifications on every status change instead of polling.`]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Make sure the `,_jsx(_components.code,{children:`paymentId`}),` and `,_jsx(_components.code,{children:`merchantId`}),` you supply correspond to active, configured records in your VelaFi account.`]})})]})}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":"On-Ramp (Fiat to Crypto)","sidebarTitle":"On-Ramp","description":"Accept local fiat payments from your users and automatically deliver crypto to their wallets using the VelaFi fiat-to-crypto on-ramp API.","href":"/docs/guides/on-ramp"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Confirm prerequisites","slug":"confirm-prerequisites","depth":3,"children":[]},{"title":"Get a quote (optional)","slug":"get-a-quote-optional","depth":3,"children":[]},{"title":"Create the on-ramp order","slug":"create-the-on-ramp-order","depth":3,"children":[]},{"title":"Request parameters","slug":"request-parameters","depth":4,"children":[]},{"title":"Example request","slug":"example-request","depth":4,"children":[]},{"title":"Example response","slug":"example-response","depth":4,"children":[]},{"title":"Send payment to the designated account","slug":"send-payment-to-the-designated-account","depth":3,"children":[]},{"title":"Retrieve the order and monitor status","slug":"retrieve-the-order-and-monitor-status","depth":3,"children":[]},{"title":"Example request","slug":"example-request-2","depth":4,"children":[]},{"title":"Example response","slug":"example-response-2","depth":4,"children":[]},{"title":"Response fields","slug":"response-fields","depth":4,"children":[]},{"title":"Order status codes","slug":"order-status-codes","depth":4,"children":[]},{"title":"Order complete — crypto delivered","slug":"order-complete-—-crypto-delivered","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"vela-fi","siteName":"VelaFi","title":"On-Ramp (Fiat to Crypto) - VelaFi","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/docs/guides/on-ramp","matchLevel":0},"cn":{"href":"/cn/docs/guides/on-ramp","matchLevel":1}}},"lastModified":"2026-11-04T03:05:11.133Z","originalFileLocation":"docs/guides/on-ramp.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=\"Accept local fiat payments from your users and automatically deliver crypto to their wallets using the VelaFi fiat-to-crypto on-ramp API.\">\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/JsvLRsd1rZ65JDPr/_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/JsvLRsd1rZ65JDPr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vela-fi/JsvLRsd1rZ65JDPr/_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/JsvLRsd1rZ65JDPr/_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/JsvLRsd1rZ65JDPr/_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/JsvLRsd1rZ65JDPr/_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/JsvLRsd1rZ65JDPr/_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/JsvLRsd1rZ65JDPr/_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/JsvLRsd1rZ65JDPr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"On-Ramp (Fiat to Crypto) - VelaFi\">\u003cmeta data-mint-head property=\"og:description\" content=\"Accept local fiat payments from your users and automatically deliver crypto to their wallets using the VelaFi fiat-to-crypto on-ramp API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"VelaFi\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.velafi.com/docs/guides/on-ramp\">\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=Guides\u0026amp;title=On-Ramp+%28Fiat+to+Crypto%29\u0026amp;description=Accept+local+fiat+payments+from+your+users+and+automatically+deliver+crypto+to+their+wallets+using+the+VelaFi+fiat-to-crypto+on-ramp+API.\u0026amp;theme=bbb8c211a423ee0e815bd8f0\u0026amp;signature=e2cc3dce2aedc1c6799b91bdaaf0dc93ad60c1478afcf78b3821ec78f3f197bd\">\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=\"On-Ramp (Fiat to Crypto) - VelaFi\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Accept local fiat payments from your users and automatically deliver crypto to their wallets using the VelaFi fiat-to-crypto on-ramp API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vela-fi.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=On-Ramp+%28Fiat+to+Crypto%29\u0026amp;description=Accept+local+fiat+payments+from+your+users+and+automatically+deliver+crypto+to+their+wallets+using+the+VelaFi+fiat-to-crypto+on-ramp+API.\u0026amp;theme=bbb8c211a423ee0e815bd8f0\u0026amp;signature=e2cc3dce2aedc1c6799b91bdaaf0dc93ad60c1478afcf78b3821ec78f3f197bd\">\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/JsvLRsd1rZ65JDPr/_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/docs/guides/on-ramp\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/guides/on-ramp.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.velafi.com/docs/guides/on-ramp\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.velafi.com/cn/docs/guides/on-ramp\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.velafi.com/docs/guides/on-ramp\">\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://media.brand.dev/5ab20df8-ac5f-4968-a43a-f8e39fc9446f.png\"}},{\"@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/docs/guides/on-ramp#webpage\",\"url\":\"https://docs.velafi.com/docs/guides/on-ramp\",\"name\":\"On-Ramp (Fiat to Crypto)\",\"description\":\"Accept local fiat payments from your users and automatically deliver crypto to their wallets using the VelaFi fiat-to-crypto on-ramp API.\",\"dateModified\":\"2026-11-04T03:05:11.133Z\",\"isPartOf\":{\"@id\":\"https://docs.velafi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.velafi.com/docs/guides/on-ramp#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.velafi.com/docs/guides/on-ramp#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.velafi.com/docs/guides/creating-account\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"On-Ramp (Fiat to Crypto)\",\"item\":\"https://docs.velafi.com/docs/guides/on-ramp\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.velafi.com/docs/guides/on-ramp#article\",\"headline\":\"On-Ramp (Fiat to Crypto)\",\"name\":\"On-Ramp (Fiat to Crypto)\",\"description\":\"Accept local fiat payments from your users and automatically deliver crypto to their wallets using the VelaFi fiat-to-crypto on-ramp API.\",\"url\":\"https://docs.velafi.com/docs/guides/on-ramp\",\"mainEntityOfPage\":{\"@id\":\"https://docs.velafi.com/docs/guides/on-ramp#webpage\"},\"dateModified\":\"2026-11-04T03:05:11.133Z\",\"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","groups":[{"group":"Get Started","pages":[{"title":"VelaFi API Docs","sidebarTitle":"Home","href":""},{"title":"Introduction","sidebarTitle":"Introduction","href":"/docs/introduction"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/docs/quickstart"},{"title":"Sandbox","sidebarTitle":"Sandbox","href":"/docs/sandbox"}]},{"group":"Core Concepts","pages":[{"title":"Merchants","sidebarTitle":"Merchants","href":"/docs/merchants"},{"title":"Supported Currencies","sidebarTitle":"Currencies","href":"/docs/currencies"},{"title":"Trading Pairs","sidebarTitle":"Trading Pairs","href":"/docs/pairs"},{"title":"Payment Methods","sidebarTitle":"Payment Methods","href":"/docs/payment-methods"},{"title":"Transaction Limits","sidebarTitle":"Limits","href":"/docs/limits"},{"title":"Order Statuses","sidebarTitle":"Order Statuses","href":"/docs/order-statuses"}]},{"group":"Guides","pages":[{"title":"Create an Account","sidebarTitle":"Create Account","href":"/docs/guides/creating-account"},{"title":"Create an API Key","sidebarTitle":"API Keys","href":"/docs/guides/creating-api-key"},{"title":"Create a Merchant","sidebarTitle":"Create Merchant","href":"/docs/guides/creating-merchant"},{"title":"Activate a Merchant Account","sidebarTitle":"Activate Account","href":"/docs/guides/activating-merchant-account"},{"title":"Manage Beneficiaries","sidebarTitle":"Beneficiaries","description":"Save payment destinations for off-ramp and global payments by fetching templates, adding beneficiaries, and managing them via the VelaFi API.","href":"/docs/guides/managing-beneficiaries"},{"title":"On-Ramp (Fiat to Crypto)","sidebarTitle":"On-Ramp","href":"/docs/guides/on-ramp"},{"title":"Off-Ramp (Crypto to Fiat)","sidebarTitle":"Off-Ramp","description":"Accept crypto from your users and deliver local fiat currency directly to their bank accounts using the VelaFi crypto-to-fiat off-ramp API.","href":"/docs/guides/off-ramp"},{"title":"Global Payments (Fiat to Fiat)","sidebarTitle":"Global Payments","href":"/docs/guides/global-payments"},{"title":"Webhooks","sidebarTitle":"Webhooks","href":"/docs/guides/webhooks"}]},{"group":"Reference","pages":[{"title":"Error Codes","sidebarTitle":"Error Codes","href":"/docs/error-codes"},{"title":"Changelog","sidebarTitle":"Changelog","href":"/docs/changelog"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]}]},{"language":"cn","pages":[{"title":"cn","href":"/cn/docs/guides/on-ramp"}]}]},"basePath":"","title":"On-Ramp (Fiat to Crypto) - VelaFi","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":[],"chunks":[]}