Use your live key only when it’s production environment, as this might involve live onchain transactions and actual money movement.
If your key may is exposed or compromised, quickly rotate it from the dashboard or contact support at contact@onswitch.xyz for assistance.
Need Help?
Email
Send us a message
Call
Book a call with us
⌘I
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Switch","description":"Stablecoin collection and settlement layer.","colors":{"primary":"#66bf7a","light":"#66bf7a","dark":"#66bf7a"},"logo":{"light":"https://mintcdn.com/switch-5f170989/jpy1RN3Z-Ng3OPF8/logo/light.svg?fit=max\u0026auto=format\u0026n=jpy1RN3Z-Ng3OPF8\u0026q=85\u0026s=b78b7223aca5d6541dbdf50cd011f6fb","dark":"https://mintcdn.com/switch-5f170989/jpy1RN3Z-Ng3OPF8/logo/dark.svg?fit=max\u0026auto=format\u0026n=jpy1RN3Z-Ng3OPF8\u0026q=85\u0026s=909ea85137921abd2070e8677c6d6fa3","href":"https://docs.onswitch.xyz"},"favicon":"https://mintcdn.com/switch-5f170989/jpy1RN3Z-Ng3OPF8/logo/favicon.png?fit=max\u0026auto=format\u0026n=jpy1RN3Z-Ng3OPF8\u0026q=85\u0026s=31250d37473b8ab4bee17340cff8f617","api":{"params":{"expanded":"all"},"playground":{"display":"interactive"}},"appearance":{"default":"dark","strict":true},"background":{"color":{"dark":"#0B0B0B"}},"navbar":{"links":[{"href":"https://onswitch.xyz","label":"Website"},{"href":"https://app.onswitch.xyz","label":"Dashboard"},{"href":"https://switch.openstatus.dev/","label":"Status"}],"primary":{"type":"button","label":"Book a demo","href":"https://onswitch.xyz/"}},"seo":{"metatags":{"og:type":"website","twitter:card":"summary_large_image"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"dark","latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"switch-5f170989","hasAudioNarration":false,"actualSubdomain":"switch-5f170989","customDomains":["docs.onswitch.xyz"],"gitSource":{"type":"github","owner":"switchhq","repo":"documentation","deployBranch":"development","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae9498dfc206e01340c57c5:success","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"API Reference","count":35},{"language":"default","tag":"Wallet","count":11},{"language":"default","tag":"Documentation","count":10},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Payment","count":4},{"language":"default","tag":"Beneficiary","count":3},{"language":"default","tag":"Coverage","count":3},{"language":"default","tag":"Offramp","count":3},{"language":"default","tag":"Onramp","count":3},{"language":"default","tag":"Compliance","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#topbar-cta-button{color:#000000!important}#topbar-cta-button:hover,#topbar-cta-button:focus-visible{color:#000000!important}#topbar-cta-button>a>div>span{color:#123f2f;font-weight:500}"}],"page":{"pagePath":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":"Authenticate the Switch REST API with your service key (x-service-key) for sandbox and production crypto payment and settlement requests.","keywords":["crypto payment API","API authentication","Switch API"],"icon":"key","href":"/authentication"},"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: \"Authenticate the Switch REST API with your service key (x-service-key) for sandbox and production crypto payment and settlement requests.\"\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`,em:`em`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Heading,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`You can view both keys anytime in the Switch dashboard. Both keys works with the same base URL `,_jsx(_components.code,{children:`https://api.onswitch.xyz`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example request`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`curl`,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` https://api.onswitch.xyz/asset \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"x-service-key: $YOUR_SERVICE_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Accept: application/json\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` res = `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'https://api.onswitch.xyz/asset'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'x-service-key'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: process.env.YOUR_SERVICE_KEY,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'Accept'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` os, urllib.request`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`req = urllib.request.Request(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.onswitch.xyz/asset\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` headers={`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"x-service-key\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_SERVICE_KEY\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Accept\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`urllib.request.urlopen(req, timeout=30)`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`Use your `,_jsx(_components.em,{children:`live key`}),` only when it’s production environment, as this might involve live onchain transactions and actual money movement.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If your key may is exposed or compromised, quickly rotate it from the dashboard or contact support at `,_jsx(_components.a,{href:`mailto:contact@onswitch.xyz`,children:`contact@onswitch.xyz`}),` for assistance.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`need-help`,children:`Need Help?`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Email`,icon:`mail`,href:`mailto:contact@onswitch.xyz`,children:_jsx(_components.p,{children:`Send us a message`})}),_jsx(Card,{title:`Call`,icon:`calendar`,href:`https://calendly.com/contact-onswitch/30min`,children:_jsx(_components.p,{children:`Book a call with us`})})]})]})}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":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Authentication","description":"Authenticate the Switch REST API with your service key (x-service-key) for sandbox and production crypto payment and settlement requests.","keywords":["crypto payment API","API authentication","Switch API"],"icon":"key","href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Example request","slug":"example-request","depth":2,"children":[]},{"title":"Need Help?","slug":"need-help","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"switch-5f170989","siteName":"Switch","title":"Authentication - Switch","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-08T19:06:55.965Z","originalFileLocation":"authentication.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";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=\"Authenticate the Switch REST API with your service key (x-service-key) for sandbox and production crypto payment and settlement requests.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Switch\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/switch-5f170989/mYb0D2zStfliEs54/_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/switch-5f170989/mYb0D2zStfliEs54/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/switch-5f170989/mYb0D2zStfliEs54/_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/switch-5f170989/mYb0D2zStfliEs54/_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/switch-5f170989/mYb0D2zStfliEs54/_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/switch-5f170989/mYb0D2zStfliEs54/_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/switch-5f170989/mYb0D2zStfliEs54/_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/switch-5f170989/mYb0D2zStfliEs54/_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/switch-5f170989/mYb0D2zStfliEs54/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Switch\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate the Switch REST API with your service key (x-service-key) for sandbox and production crypto payment and settlement requests.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Switch\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.onswitch.xyz/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://switch-5f170989.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Authentication\u0026amp;description=Authenticate+the+Switch+REST+API+with+your+service+key+%28x-service-key%29+for+sandbox+and+production+crypto+payment+and+settlement+requests.\u0026amp;theme=b056b4ce2e9b47c192425118\u0026amp;signature=9c39a0d9e7a29f1c70a44ef1590c369eab0fab58db80d7d30886ab5bd75cfcdd\">\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=\"Authentication - Switch\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate the Switch REST API with your service key (x-service-key) for sandbox and production crypto payment and settlement requests.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://switch-5f170989.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Authentication\u0026amp;description=Authenticate+the+Switch+REST+API+with+your+service+key+%28x-service-key%29+for+sandbox+and+production+crypto+payment+and+settlement+requests.\u0026amp;theme=b056b4ce2e9b47c192425118\u0026amp;signature=9c39a0d9e7a29f1c70a44ef1590c369eab0fab58db80d7d30886ab5bd75cfcdd\">\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/switch-5f170989/mYb0D2zStfliEs54/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Switch\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#66bf7a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.onswitch.xyz/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.onswitch.xyz/#organization\",\"name\":\"Switch\",\"url\":\"https://docs.onswitch.xyz\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/switch-5f170989/jpy1RN3Z-Ng3OPF8/logo/light.svg?fit=max\u0026auto=format\u0026n=jpy1RN3Z-Ng3OPF8\u0026q=85\u0026s=b78b7223aca5d6541dbdf50cd011f6fb\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.onswitch.xyz#website\",\"name\":\"Switch\",\"url\":\"https://docs.onswitch.xyz\",\"publisher\":{\"@id\":\"https://docs.onswitch.xyz/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.onswitch.xyz/authentication#webpage\",\"url\":\"https://docs.onswitch.xyz/authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate the Switch REST API with your service key (x-service-key) for sandbox and production crypto payment and settlement requests.\",\"dateModified\":\"2026-04-08T19:06:55.965Z\",\"isPartOf\":{\"@id\":\"https://docs.onswitch.xyz#website\"}},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.onswitch.xyz/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate the Switch REST API with your service key (x-service-key) for sandbox and production crypto payment and settlement requests.\",\"url\":\"https://docs.onswitch.xyz/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.onswitch.xyz/authentication#webpage\"},\"dateModified\":\"2026-04-08T19:06:55.965Z\",\"keywords\":\"crypto payment API, API authentication, Switch API\",\"publisher\":{\"@id\":\"https://docs.onswitch.xyz/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.onswitch.xyz#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Switch\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Switch\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/authentication.md","siteName":"Switch","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book","pages":[{"title":"Introduction","icon":"book-open","href":"/introduction"},{"title":"Quickstart","description":"Authenticate with your service key, configure payout beneficiary, and complete your first stablecoin to local currency payout in minutes.","icon":"rocket","href":"/quickstart"},{"title":"Authentication","icon":"key","href":"/authentication"},{"title":"Sandbox","description":"Use the sandbox environment to integrate Switch APIs safely. Transactions are simulated and carry no real-world value.","icon":"flask-conical","href":"/sandbox"},{"title":"Webhooks","icon":"plug","href":"/webhook"},{"title":"Supported stablecoins","icon":"coins","href":"/stablecoins"},{"title":"Stablecoin wallet","icon":"wallet","href":"/wallet"},{"title":"Developer fee","icon":"percent","href":"/developer_fee"},{"title":"Supported countries","icon":"globe","href":"/countries"},{"title":"Payment reasons","icon":"clipboard-list","href":"/reasons"}]},{"tab":"Guides","icon":"map","pages":[{"title":"Guides","href":"/guides/get-rate"}]},{"tab":"Changelog","icon":"history","pages":[{"title":"Changelog","href":"/changelog"}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference/institution/get-institution"}]}]},"basePath":"","title":"Authentication - Switch","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":[],"chunks":[]}