The server-to-server endpoints and GET /payments/v1/payment-method-config authenticate with your secret key in the Authorization header, using the Api-Key prefix:
Widget URLs that carry sensitive query parameters require a signature parameter, computed with your secret key. This is separate from API authentication. See URL signing.
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"MoonPay Developer Docs","description":"Integrate MoonPay's on-ramp, off-ramp, and swap products: widgets, SDKs, and APIs that let your users buy, sell, and swap crypto.","colors":{"primary":"#903DD9","light":"#A473EE","dark":"#903DD9"},"logo":{"light":"https://mintcdn.com/moonpay/BslMWtNt3goK8NG4/images/platform/logo/light.svg?fit=max\u0026auto=format\u0026n=BslMWtNt3goK8NG4\u0026q=85\u0026s=c5835bb4dbc3485f635eb0a055a9aeda","dark":"https://mintcdn.com/moonpay/BslMWtNt3goK8NG4/images/platform/logo/dark.svg?fit=max\u0026auto=format\u0026n=BslMWtNt3goK8NG4\u0026q=85\u0026s=c9414586d4260a86b2ecc81cf3be164b"},"favicon":"https://mintcdn.com/moonpay/ngx7B4NPEl3EzY5E/favicon.svg?fit=max\u0026auto=format\u0026n=ngx7B4NPEl3EzY5E\u0026q=85\u0026s=9873c77c8542701f6ac2203b0e49caf4","api":{"openapi":["https://api.moonpay.com/platform/openapi.json","api-reference/widget/ramps-and-swaps.openapi.json","api-reference/widget/virtual-accounts.openapi.json","api-reference/widget/server-to-server.openapi.json"],"playground":{"display":"simple"}},"appearance":{"default":"dark"},"seo":{"metatags":{"canonical":"https://dev.moonpay.com"}},"integrations":{"ga4":{"measurementId":"G-PPC3SM5WJD"}},"contextual":{"options":["copy","view","mcp","claude","cursor","chatgpt"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Help Center","icon":"life-ring","href":"https://support.moonpay.com/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"moonpay","hasAudioNarration":false,"actualSubdomain":"moonpay","customDomains":["dev.moonpay.com"],"gitSource":{"type":"github","owner":"moonpay","repo":"developer-platform-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae47c7ec0a5d590d24c7725","collectionId":"56c9b4ae-1600-474d-904b-9a34b02ea4fb","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae47c7ec0a5d590d24c7725"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae47c7ec0a5d590d24c7725","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Platform","count":96},{"language":"default","tag":"API Reference","count":71},{"language":"default","tag":"SDK Reference","count":56},{"language":"default","tag":"Widget API","count":43},{"language":"default","tag":"Widget","count":40},{"language":"default","tag":"React Native","count":29},{"language":"default","tag":"Platform API","count":28},{"language":"default","tag":"Web","count":20},{"language":"default","tag":"On-Ramp","count":17},{"language":"default","tag":"Customers","count":16}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/widget/using-the-api","slug":"/api-reference/widget/using-the-api","pageMetadata":{"title":"Using the API","description":"Base URL, API keys, and which widget endpoints need which authentication scheme","href":"/api-reference/widget/using-the-api"},"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: \"Base URL, API keys, and which widget endpoints need which authentication scheme\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`base-url`,children:`Base URL`}),`\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:`https://api.moonpay.com`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Test and live environments use the same base URL. The key prefix determines the environment.`}),`\n`,_jsx(Heading,{level:`2`,id:`availability`,children:`Availability`}),`\n`,_jsx(_components.p,{children:`Not every endpoint in this reference is available to every account:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tier`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`Endpoints`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Self-serve`}),_jsx(_components.td,{children:`Works with your API keys today`}),_jsx(_components.td,{children:`Currencies, quotes, limits, countries, transactions, customers, payment methods, DeFi tokens`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Requires enablement`}),_jsxs(_components.td,{children:[`Returns `,_jsx(_components.code,{children:`403`}),` until enabled for your account. Contact support`]}),_jsx(_components.td,{children:`Virtual accounts`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`The widget API uses two authentication schemes. Every endpoint page in this reference declares the scheme it needs in its `,_jsx(_components.strong,{children:`Authorizations`}),` section.`]}),`\n`,_jsx(Heading,{level:`3`,id:`api-keys`,children:`API keys`}),`\n`,_jsxs(_components.p,{children:[`You have two kinds of API key, both found on the `,_jsx(_components.a,{href:`https://dashboard.moonpay.com/developers/api-keys`,children:`API keys page`}),` of your MoonPay dashboard:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Key`}),_jsx(_components.th,{children:`Prefixes`}),_jsx(_components.th,{children:`Where it can live`}),_jsx(_components.th,{children:`Used as`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Publishable key`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pk_test_`}),`, `,_jsx(_components.code,{children:`pk_live_`})]}),_jsx(_components.td,{children:`Client-side code, widget URLs`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`apiKey`}),` query parameter`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Secret key`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`sk_test_`}),`, `,_jsx(_components.code,{children:`sk_live_`})]}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Server-side only`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Authorization: Api-Key \u003csecret key>`}),` header`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`_test_`}),` keys operate against the sandbox, `,_jsx(_components.code,{children:`_live_`}),` keys against production. Test and live data are fully separate.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Never expose a secret key in client-side code, mobile apps, or version\ncontrol. Anyone holding it can read your customers’ transaction data.`})}),`\n`,_jsx(Heading,{level:`3`,id:`publishable-key-query-parameter`,children:`Publishable key (query parameter)`}),`\n`,_jsxs(_components.p,{children:[`Currencies, quotes, limits, network fees, and single-transaction lookups authenticate with your publishable key as the `,_jsx(_components.code,{children:`apiKey`}),` query parameter:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.moonpay.com/v3/currencies/btc/buy_quote?apiKey=pk_test_key\u0026baseCurrencyAmount=100\u0026baseCurrencyCode=usd\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GET /v3/countries`}),` works without a key; passing one tailors availability to your account’s configuration.`]}),`\n`,_jsx(Heading,{level:`3`,id:`secret-key-authorization-header`,children:`Secret key (Authorization header)`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/api-reference/widget/getbuytransactions`,children:`server-to-server endpoints`}),` and `,_jsx(_components.code,{children:`GET /payments/v1/payment-method-config`}),` authenticate with your secret key in the `,_jsx(_components.code,{children:`Authorization`}),` header, using the `,_jsx(_components.code,{children:`Api-Key`}),` prefix:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`curl`,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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.moonpay.com/v1/transactions\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Api-Key sk_test_key\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`fetch`,numberOfLines:`3`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.moonpay.com/v1/transactions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Api-Key sk_test_key\"`}),_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:`3`,id:`url-signing`,children:`URL signing`}),`\n`,_jsxs(_components.p,{children:[`Widget URLs that carry sensitive query parameters require a `,_jsx(_components.code,{children:`signature`}),` parameter, computed with your secret key. This is separate from API authentication. See `,_jsx(_components.a,{href:`/widget/on-ramp/customization/url-signing`,children:`URL signing`}),`.`]})]})}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":"Using the API","description":"Base URL, API keys, and which widget endpoints need which authentication scheme","href":"/api-reference/widget/using-the-api"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Base URL","slug":"base-url","depth":2,"children":[]},{"title":"Availability","slug":"availability","depth":2,"children":[]},{"title":"Authentication","slug":"authentication","depth":2,"children":[{"title":"API keys","slug":"api-keys","depth":3,"children":[]},{"title":"Publishable key (query parameter)","slug":"publishable-key-query-parameter","depth":3,"children":[]},{"title":"Secret key (Authorization header)","slug":"secret-key-authorization-header","depth":3,"children":[]},{"title":"URL signing","slug":"url-signing","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"moonpay","siteName":"MoonPay Developer Docs","title":"Using the API - MoonPay Developer Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-23T14:33:58.812Z","originalFileLocation":"api-reference/widget/using-the-api.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}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=\"Base URL, API keys, and which widget endpoints need which authentication scheme\">\u003cmeta data-mint-head name=\"application-name\" content=\"MoonPay Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/moonpay/Ab1BP3eXcK1clOJ3/_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/moonpay/Ab1BP3eXcK1clOJ3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/moonpay/Ab1BP3eXcK1clOJ3/_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/moonpay/Ab1BP3eXcK1clOJ3/_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/moonpay/Ab1BP3eXcK1clOJ3/_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/moonpay/Ab1BP3eXcK1clOJ3/_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/moonpay/Ab1BP3eXcK1clOJ3/_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/moonpay/Ab1BP3eXcK1clOJ3/_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/moonpay/Ab1BP3eXcK1clOJ3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Using the API - MoonPay Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Base URL, API keys, and which widget endpoints need which authentication scheme\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MoonPay Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://dev.moonpay.com/api-reference/widget/using-the-api\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://moonpay.mintlify.app/_mintlify/api/og/v2?division=Overview\u0026amp;title=Using+the+API\u0026amp;description=Base+URL%2C+API+keys%2C+and+which+widget+endpoints+need+which+authentication+scheme\u0026amp;theme=a47d0be1f7e6328ec525d617\u0026amp;signature=996a538cf20aa7c0876b0ff688747340bf6736b2d16c26bc69039a58e2aed1d0\">\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=\"Using the API - MoonPay Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Base URL, API keys, and which widget endpoints need which authentication scheme\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://moonpay.mintlify.app/_mintlify/api/og/v2?division=Overview\u0026amp;title=Using+the+API\u0026amp;description=Base+URL%2C+API+keys%2C+and+which+widget+endpoints+need+which+authentication+scheme\u0026amp;theme=a47d0be1f7e6328ec525d617\u0026amp;signature=996a538cf20aa7c0876b0ff688747340bf6736b2d16c26bc69039a58e2aed1d0\">\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/moonpay/Ab1BP3eXcK1clOJ3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MoonPay Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#903DD9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://dev.moonpay.com/api-reference/widget/using-the-api\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/widget/using-the-api.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://dev.moonpay.com/#organization\",\"name\":\"MoonPay Developer Docs\",\"url\":\"https://dev.moonpay.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/moonpay/BslMWtNt3goK8NG4/images/platform/logo/light.svg?fit=max\u0026auto=format\u0026n=BslMWtNt3goK8NG4\u0026q=85\u0026s=c5835bb4dbc3485f635eb0a055a9aeda\"}},{\"@type\":\"WebSite\",\"@id\":\"https://dev.moonpay.com#website\",\"name\":\"MoonPay Developer Docs\",\"url\":\"https://dev.moonpay.com\",\"publisher\":{\"@id\":\"https://dev.moonpay.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://dev.moonpay.com/api-reference/widget/using-the-api#webpage\",\"url\":\"https://dev.moonpay.com/api-reference/widget/using-the-api\",\"name\":\"Using the API\",\"description\":\"Base URL, API keys, and which widget endpoints need which authentication scheme\",\"dateModified\":\"2026-07-23T14:33:58.812Z\",\"isPartOf\":{\"@id\":\"https://dev.moonpay.com#website\"},\"breadcrumb\":{\"@id\":\"https://dev.moonpay.com/api-reference/widget/using-the-api#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://dev.moonpay.com/api-reference/widget/using-the-api#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Overview\",\"item\":\"https://dev.moonpay.com/api-reference/widget/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using the API\",\"item\":\"https://dev.moonpay.com/api-reference/widget/using-the-api\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://dev.moonpay.com/api-reference/widget/using-the-api#article\",\"headline\":\"Using the API\",\"name\":\"Using the API\",\"description\":\"Base URL, API keys, and which widget endpoints need which authentication scheme\",\"url\":\"https://dev.moonpay.com/api-reference/widget/using-the-api\",\"mainEntityOfPage\":{\"@id\":\"https://dev.moonpay.com/api-reference/widget/using-the-api#webpage\"},\"dateModified\":\"2026-07-23T14:33:58.812Z\",\"publisher\":{\"@id\":\"https://dev.moonpay.com/#organization\"},\"isPartOf\":{\"@id\":\"https://dev.moonpay.com#website\"}}]}\u003c/script>","siteName":"MoonPay Developer Docs","nav":{"global":{"anchors":[{"anchor":"Help Center","icon":"life-ring","href":"https://support.moonpay.com/"}]},"tabs":[{"tab":"Platform","pages":[{"title":"Platform","href":"/platform/overview/introduction"}]},{"tab":"Widget","pages":[{"title":"Widget","href":"/widget/overview"}]},{"tab":"API Reference","dropdowns":[{"dropdown":"Platform API","icon":"code","groups":[{"group":"Documentation","pages":[{"title":"Using the Platform API","href":"/api-reference/platform/documentation/using-the-api"}]},{"group":"Sessions","pages":[{"title":"Create a session","openapi":"POST /platform/v1/sessions","href":"/api-reference/platform/endpoints/sessions/create"},{"title":"Revoke a session","openapi":"DELETE /platform/v1/sessions","href":"/api-reference/platform/endpoints/sessions/revoke"}]},{"group":"Customers","pages":[{"title":"Get a customer","openapi":"GET /platform/v1/customers/{id}","href":"/api-reference/platform/endpoints/customers/get"},{"title":"Get customers by external customer ID","openapi":"GET /platform/v1/customers/ext/{externalCustomerId}","href":"/api-reference/platform/endpoints/customers/get-by-external-id"},{"title":"Submit KYC data","openapi":"PATCH /platform/v1/customers/{id}/kyc","href":"/api-reference/platform/endpoints/customers/submit-kyc"},{"title":"Get a file upload URL","openapi":"POST /platform/v1/customers/{id}/files/upload-url","href":"/api-reference/platform/endpoints/customers/get-upload-url"},{"title":"Confirm uploaded files","openapi":"POST /platform/v1/customers/{id}/files","href":"/api-reference/platform/endpoints/customers/submit-files"},{"title":"Export customer data","openapi":"POST /platform/v1/customers/export","href":"/api-reference/platform/endpoints/customers/export"}]},{"group":"Payment Methods","pages":[{"title":"List payment methods","openapi":"GET /platform/v1/payment-methods","href":"/api-reference/platform/endpoints/payment-methods/list"},{"title":"Delete a payment method","openapi":"DELETE /platform/v1/payment-methods/{paymentMethodId}","href":"/api-reference/platform/endpoints/payment-methods/delete"}]},{"group":"Assets","pages":[{"title":"List assets","openapi":"GET /platform/v1/assets","href":"/api-reference/platform/endpoints/assets/list"}]},{"group":"Quotes","pages":[{"title":"Get a quote","openapi":"POST /platform/v1/quotes/buy","href":"/api-reference/platform/endpoints/quotes/get"}]},{"group":"Transactions","pages":[{"title":"List transactions","openapi":"GET /platform/v1/transactions","href":"/api-reference/platform/endpoints/transactions/list"},{"title":"Get a transaction","openapi":"GET /platform/v1/transactions/{id}","href":"/api-reference/platform/endpoints/transactions/get"},{"title":"Simulate bank-transfer settlement","openapi":"POST /platform/v1/transactions/{id}/simulate-bank-transfer","href":"/api-reference/platform/endpoints/transactions/simulate-bank-transfer"}]},{"group":"Webhooks","pages":[{"title":"Overview","href":"/api-reference/platform/webhooks/overview"},{"title":"Customer identity status updated","openapi":"openapi-webhooks.json webhook customerIdentityStatusUpdated","href":"/api-reference/platform/webhooks/customer-identity-status-updated"}]},{"group":"Objects \u0026 Types","pages":[{"title":"Customer","href":"/api-reference/platform/objects-and-types/customer"},{"title":"Customer export","href":"/api-reference/platform/objects-and-types/customer-export"},{"title":"Transaction","href":"/api-reference/platform/objects-and-types/transaction"},{"title":"Stage","href":"/api-reference/platform/objects-and-types/stage"},{"title":"Stage failure reasons","href":"/api-reference/platform/objects-and-types/stage-failure-reasons"},{"title":"Quote","href":"/api-reference/platform/objects-and-types/quote"},{"title":"Payment Method","href":"/api-reference/platform/objects-and-types/payment-method"},{"title":"Asset","href":"/api-reference/platform/objects-and-types/asset"},{"title":"Fees","href":"/api-reference/platform/objects-and-types/fees"},{"title":"Wallet","href":"/api-reference/platform/objects-and-types/wallet"}]}]},{"dropdown":"Widget API","icon":"window","groups":[{"group":"Overview","pages":[{"title":"Overview","description":"API reference for the MoonPay widget integration.","href":"/api-reference/widget/overview"},{"title":"Using the API","href":"/api-reference/widget/using-the-api"},{"title":"Errors","description":"The error response shape, the moonPayErrorCode catalog, and how to resolve common errors","href":"/api-reference/widget/errors"}]},{"group":"Customers","pages":[{"title":"Get customer","openapi":"GET /v1/customers/{customerId}","href":"/api-reference/widget/getcustomer"},{"title":"Get customer by externalId","openapi":"GET /v1/customers/ext/{customerId}","href":"/api-reference/widget/getcustomerbyexternalid"},{"title":"Import customer identity","openapi":"POST /v3/customers/import","href":"/api-reference/widget/importcustomer"}]},{"group":"On-ramp","pages":[{"title":"Get Real-time Buy quote","openapi":"GET /v3/currencies/{currencyCode}/buy_quote","href":"/api-reference/widget/getbuyquote"},{"title":"Get Crypto Currency limits","openapi":"GET /v3/currencies/{currencyCode}/limits","href":"/api-reference/widget/getcurrencylimits"},{"title":"Get Crypto network fees","openapi":"GET /v3/currencies/network_fees","href":"/api-reference/widget/getnetworkfees"},{"title":"Get Buy transaction","openapi":"GET /v1/transactions/{transactionId}","href":"/api-reference/widget/getbuytransaction"},{"title":"List Buy transactions","openapi":"GET /v1/transactions","href":"/api-reference/widget/getbuytransactions"},{"title":"Get Buy transaction by External identifier","openapi":"GET /v1/transactions/ext/{externalTransactionId}","href":"/api-reference/widget/getbuytransactionbyexternalid"}]},{"group":"Off-ramp","pages":[{"title":"Get Sell quote","openapi":"GET /v3/currencies/{currencyCode}/sell_quote","href":"/api-reference/widget/getsellquote"},{"title":"Get Sell transaction","openapi":"GET /v3/sell_transactions/{transactionId}","href":"/api-reference/widget/getselltransaction"},{"title":"List Sell transactions","openapi":"GET /v3/sell_transactions","href":"/api-reference/widget/getselltransactions"},{"title":"Get Sell transaction by External identifier","openapi":"GET /v3/sell_transactions/ext/{externalTransactionId}","href":"/api-reference/widget/getselltransactionbyexternalid"},{"title":"Cancel Sell transaction","openapi":"DELETE /v3/sell_transactions/{transactionId}","href":"/api-reference/widget/cancelselltransaction"},{"title":"Cancel Sell transaction by externalId","openapi":"DELETE /v3/sell_transactions/ext/{transactionId}","href":"/api-reference/widget/webhooks/cancelselltransactionbyexternalid"}]},{"group":"Data","pages":[{"title":"List supported countries","openapi":"GET /v3/countries","href":"/api-reference/widget/getcountries"},{"title":"List supported currencies","openapi":"GET /v3/currencies","href":"/api-reference/widget/getcurrencies"},{"title":"List currencies (v4)","openapi":"GET /v4/currencies","href":"/api-reference/widget/getv4currencies"},{"title":"List available payment methods","openapi":"GET /payments/v1/payment-method-config","href":"/api-reference/widget/listpaymentmethods"},{"title":"Check Customer's IP address","openapi":"GET /v3/ip_address","href":"/api-reference/widget/getipaddress"}]},{"group":"DeFi tokens","pages":[{"title":"Get DeFi token","openapi":"GET /v1/defi/token","href":"/api-reference/widget/getdefitoken"},{"title":"List DeFi tokens","openapi":"GET /v1/defi/tokens","href":"/api-reference/widget/getdefitokens"}]},{"group":"Virtual Accounts","pages":[{"title":"Get virtual accounts","openapi":"GET /v1/virtual-accounts","href":"/api-reference/widget/getvirtualaccounts"},{"title":"Update on ramp virtual account","openapi":"PATCH /v1/virtual-accounts/onramp/{id}","href":"/api-reference/widget/updateonrampvirtualaccount"},{"title":"Get on ramp transactions","openapi":"GET /v1/virtual-accounts/transactions/onramp","href":"/api-reference/widget/getonramptransactions"},{"title":"Get on ramp transaction","openapi":"GET /v1/virtual-accounts/transactions/onramp/{transactionId}","href":"/api-reference/widget/getonramptransaction"},{"title":"Get off ramp transactions","openapi":"GET /v1/virtual-accounts/transactions/offramp","href":"/api-reference/widget/getofframptransactions"},{"title":"Get off ramp transaction","openapi":"GET /v1/virtual-accounts/transactions/offramp/{transactionId}","href":"/api-reference/widget/getofframptransaction"}]},{"group":"Webhooks","pages":[{"title":"Overview","href":"/api-reference/widget/webhooks/overview"},{"title":"Request signing","href":"/api-reference/widget/webhooks/signature"},{"group":"Buy","pages":[{"title":"transaction_created","openapi":"api-reference/widget/webhooks.openapi.json webhook transaction_created","href":"/api-reference/widget/webhooks/transaction-created"},{"title":"transaction_updated","openapi":"api-reference/widget/webhooks.openapi.json webhook transaction_updated","href":"/api-reference/widget/webhooks/transaction-updated"},{"title":"transaction_failed","openapi":"api-reference/widget/webhooks.openapi.json webhook transaction_failed","href":"/api-reference/widget/webhooks/transaction-failed"}]},{"group":"Sell","pages":[{"title":"sell_transaction_created","openapi":"api-reference/widget/webhooks.openapi.json webhook sell_transaction_created","href":"/api-reference/widget/webhooks/sell-transaction-created"},{"title":"sell_transaction_updated","openapi":"api-reference/widget/webhooks.openapi.json webhook sell_transaction_updated","href":"/api-reference/widget/webhooks/sell-transaction-updated"},{"title":"sell_transaction_failed","openapi":"api-reference/widget/webhooks.openapi.json webhook sell_transaction_failed","href":"/api-reference/widget/webhooks/sell-transaction-failed"},{"title":"sell_transaction_requote_required","openapi":"api-reference/widget/webhooks.openapi.json webhook sell_transaction_requote_required","href":"/api-reference/widget/webhooks/sell-transaction-requote-required"}]},{"group":"Identity","pages":[{"title":"identity_check_updated","openapi":"api-reference/widget/webhooks.openapi.json webhook identity_check_updated","href":"/api-reference/widget/webhooks/identity-check-updated"}]},{"group":"Virtual accounts","pages":[{"title":"virtual_account_status_updated","openapi":"api-reference/widget/webhooks.openapi.json webhook virtual_account_status_updated","href":"/api-reference/widget/webhooks/virtual-account-status-updated"},{"title":"virtual_account_transaction_status_updated","openapi":"api-reference/widget/webhooks.openapi.json webhook virtual_account_transaction_status_updated","href":"/api-reference/widget/webhooks/virtual-account-transaction-status-updated"}]}]}]}]}]},"basePath":"","title":"Using the API - MoonPay Developer Docs","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":[],"chunks":[]}