How you authenticate a request to act on an account’s behalf, and what that authority does and does not cover.
The header
Your platform authenticates with its own API key. On its own, a request made with that key acts as your platform: any charge, transfer, or balance read is yours.Send X-Account-Id with an account’s id and the request acts as that account instead.
The header works on any API-key endpoint, not only the Connect ones. There is no separate key per account: one platform key, with X-Account-Id deciding whose behalf a given call is on.
An unread or misspelled header name is not rejected. If the API does not recognize the header, the request runs as your platform and returns success. A caller who omits X-Account-Id, or sends a stale header name, gets a successful call against the wrong party rather than an error. On a checkout this means the charge and the money land in your platform’s balance instead of the account’s.
What it changes
The header changes who a call is made on behalf of, which changes who owns the result.
A checkout created with X-Account-Id is a direct charge: the account is the merchant of record, and the sale lands in its balance. See Direct charges.
A transfer sent with X-Account-Id moves funds from that account’s balance. See Transfers.
Everything else about creating a checkout or a transfer is unchanged. The header only decides whose balance the call reads from and writes to.
What it does not do
It cannot reach an account that is not yours. Naming an id that is not one of your accounts returns 403, naming the header and the id you sent, rather than acting on it. The check is a direct parentage test: the named account’s parent must be the account your key belongs to, or the request is rejected outright. There is no broader reach through a shared platform, an intermediate account, or any other relationship.An id that does not exist and an id belonging to another platform return the same 403, so the header cannot be used to find out which account ids are real. Your key itself is unaffected: the same request without the header succeeds.It does not grant the account anything it has not been set up for. The header changes who a call runs as; it does not change what that party is allowed to do. An account still needs the capability for a payment method before a checkout run as that account can accept it, and still needs payouts before a withdrawal run as that account will succeed. See Capabilities.It does not change which scope your key needs. The scope check is against your platform key’s own scopes, the same ones it would need calling on its own behalf. Acting as an account does not require a different scope and does not grant one your key does not already have.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Bachs","description":"Payments and billing infrastructure for internet businesses. Accept payments globally through hosted or overlay checkout, run subscriptions and free trials, and settle in your currency. REST API with a full sandbox.","colors":{"primary":"#5266eb","light":"#8fb6fb","dark":"#5266eb"},"logo":{"light":"https://mintcdn.com/bachs/8QOZkInmSDP5Ad7N/logo.png?fit=max\u0026auto=format\u0026n=8QOZkInmSDP5Ad7N\u0026q=85\u0026s=9d4369b7a7ceeb9d196f647822f4ea01","dark":"https://mintcdn.com/bachs/8QOZkInmSDP5Ad7N/logo-dark.png?fit=max\u0026auto=format\u0026n=8QOZkInmSDP5Ad7N\u0026q=85\u0026s=a6ad42659c02e7126806019cafab7bae"},"favicon":"https://mintcdn.com/bachs/OmvT4wSHNg_ay0Sy/favicon.png?fit=max\u0026auto=format\u0026n=OmvT4wSHNg_ay0Sy\u0026q=85\u0026s=fa1681d092d772a654316ae4012045fb","api":{"openapi":"docs/openapi/openapi.json","playground":{"display":"interactive"},"examples":{"defaults":"all","languages":["bash","javascript","python","go"],"prefill":true,"autogenerate":true}},"appearance":{"default":"dark","strict":false},"background":{"color":{"light":"#fbfcfd","dark":"#1e1e2a"}},"navbar":{"links":[{"href":"https://cal.com/bolu-dada/bachs","label":"Book a Demo"}],"primary":{"type":"button","label":"Get Started","href":"https://app.bachs.io/signup"}},"footer":{"socials":{"x":"https://x.com/bachs_hq","website":"https://bachs.io"},"links":[{"header":"Bachs","items":[{"label":"Dashboard","href":"https://app.bachs.io"},{"label":"llms.txt","href":"https://docs.bachs.io/llms.txt"},{"label":"Support","href":"mailto:support@bachs.io"}]}]},"seo":{"metatags":{"google-site-verification":"xCFt-c27YambrzzvRTU4CiqeElNFKGVJZw_8o9IgpdA"}},"fonts":{"heading":{"family":"Geist","weight":600},"body":{"family":"Geist"}},"styling":{"codeblocks":"dark","latex":true},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"variables":{"api-url":"https://api.bachs.io"},"markdown":{"instructions":["Money is always a decimal string at the currency's precision (for example \"29.00\"), paired with an ISO 4217 currency field. Never use minor units.","Build against the sandbox first: base URL https://sandbox-api.bachs.io with sk_sandbox_ keys. Production is https://api.bachs.io with sk_live_ keys; going live is a key swap.","Treat webhooks (for example collection.succeeded) as the source of truth for fulfilment, never client-side events or redirects.","Subscriptions are created by completing a checkout for a recurring product. There is no direct create-subscription endpoint.","IDs carry resource prefixes (cust_, prod_, sub_, chk_, inv_, ref_) and timestamps are ISO 8601 UTC."]},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bachs","hasAudioNarration":false,"actualSubdomain":"bachs","customDomains":["docs.bachs.io"],"gitSource":{"type":"github","owner":"bachsdev","repo":"bachs-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af7a15776407ecc270c8b4c","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API reference","count":98},{"language":"default","tag":"Developers","count":60},{"language":"default","tag":"Webhooks","count":46},{"language":"default","tag":"Connect (Sub accounts)","count":37},{"language":"default","tag":"Get started","count":31},{"language":"default","tag":"Events","count":29},{"language":"default","tag":"Payments","count":26},{"language":"default","tag":"Payouts","count":16},{"language":"default","tag":"Subscriptions","count":14},{"language":"default","tag":"Endpoint API","count":14}]},"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"@import url(\"https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600\u0026display=swap\");@font-face{font-family:\"Geist Pixel\";src:url(\"/fonts/GeistPixel-Square.woff2\") format(\"woff2\");font-weight:400;font-display:swap}code,pre,kbd,samp,.font-mono{font-family:\"Geist Mono\", ui-monospace, Consolas, monospace}.pixel{font-family:\"Geist Pixel\", \"Geist Mono\", monospace;font-weight:400;letter-spacing:0.01em}#navbar img{height:24px;width:auto}.section-cover{border-radius:1rem;width:100%;max-width:600px;height:auto;display:block}.home-hero{background:#5266eb url(\"/images/home/pixels.svg\") center / cover no-repeat;color:#fff;border-radius:1.5rem}.home-hero h1,.home-hero p{color:#fff}.home-btn{display:inline-block;background:#1e1e2a;color:#fff!important;font-weight:600;border-radius:0.6rem;padding:0.8rem 1.3rem;text-decoration:none!important}.home-btn:hover{background:#0b1a6e}.home-btn-ghost{background:rgba(255, 255, 255, 0.14);border:1px solid rgba(255, 255, 255, 0.4)}.home-btn-ghost:hover{background:rgba(255, 255, 255, 0.24)}body:has(.home) #header{display:none}.home{max-width:1160px;margin:0 auto;padding:1.5rem 1.5rem 5rem}.home>h2{margin:3.5rem 0 1.25rem;font-size:1.75rem;font-weight:600;letter-spacing:-0.01em;color:#1e1e2a}.dark .home>h2{color:#f4f5f9}.home{overflow-x:clip}.home-hero{display:grid;grid-template-columns:1fr 1fr;gap:2rem;align-items:center;padding:3.5rem 3rem;overflow:hidden}.home-eyebrow{font-family:\"Geist Mono\", monospace;font-size:0.8rem;letter-spacing:0.12em;text-transform:uppercase;opacity:0.8;margin:0 0 1rem}.home-hero h1{font-size:3rem;line-height:1.08;font-weight:600;letter-spacing:-0.02em;margin:0 0 1.25rem}.home-hero h1 .pixel{font-size:0.92em}.home-copy>p:not(.home-eyebrow){font-size:1.125rem;line-height:1.6;opacity:0.92;margin:0 0 1.75rem;max-width:34rem}.home-actions{display:flex;gap:0.75rem;flex-wrap:wrap}.home-collage{position:relative;height:400px}.shot{position:absolute;border-radius:12px;box-shadow:0 24px 60px rgba(11, 26, 110, 0.45);background:#fff center / cover no-repeat}.shot-checkout{right:0;bottom:0;width:80%;aspect-ratio:1200 / 788;background-image:url(\"/images/home/hero-checkout.webp\")}.shot-event{right:-3%;top:0;width:34%;aspect-ratio:620 / 941;opacity:0.78;background-image:url(\"/images/home/hero-event.webp\")}.shot-balance{left:0;top:5%;width:44%;aspect-ratio:900 / 725;opacity:0.78;background-image:url(\"/images/home/hero-balance.webp\")}@media (min-width: 1280px){body:not(:has(.home)) #content-container{max-width:1080px}}.shot-row{display:grid;grid-template-columns:1fr 1.5fr;gap:2.5rem;align-items:center}.shot-row>div>:first-child{margin-top:0}.mdx-content img[src*=\"images/product/\"]{max-width:820px;margin-left:auto;margin-right:auto}.shot-row img{margin:0;width:100%;height:auto!important;aspect-ratio:auto!important}.shot-row [data-as=\"p\"],.build [data-as=\"p\"]{display:block;margin:0 0 1rem}.card.rounded-2xl{border-radius:0.6rem}.card .px-6.py-5{padding:1rem 1.25rem}.card h2.not-prose{color:#5266eb;font-weight:500;font-size:0.95rem}.dark .card h2.not-prose{color:#8f9cf7}.card .prose{font-size:0.875rem;line-height:1.45}@media (max-width: 760px){.shot-row{grid-template-columns:minmax(0, 1fr)}}.home-tasks,.home-products{display:grid;grid-template-columns:repeat(4, 1fr);gap:2rem}.home-tasks{margin-top:3rem}.home-tasks h3,.home-products h3{font-size:0.95rem;font-weight:600;margin:0 0 0.75rem;color:#1e1e2a}.dark .home-tasks h3,.dark .home-products h3{color:#f4f5f9}.home-tasks a{display:block;margin:0 0 0.55rem;color:#5266eb;font-weight:500;text-decoration:none}.dark .home-tasks a{color:#8f9cf7}.home-products a{display:block;margin:0 0 1rem;text-decoration:none}.home-products strong{display:block;font-weight:600;color:#5266eb}.dark .home-products strong{color:#8f9cf7}.home-products span{display:block;font-size:0.9rem;line-height:1.45;color:#62647b}.dark .home-products span{color:#b4b8cc}.home-tasks a:hover,.home-products a:hover strong{text-decoration:underline}.build{display:grid;grid-template-columns:1fr 1.5fr;gap:2rem;align-items:start;border:1px solid rgba(112, 115, 147, 0.2);border-radius:1.25rem;padding:1.75rem;background:#f4f5f9}.dark .build{background:rgba(255, 255, 255, 0.03);border-color:rgba(255, 255, 255, 0.1)}.build h3{margin:0 0 0.75rem;font-size:1.25rem}.build>div:first-child p{color:#62647b}.dark .build>div:first-child p{color:#b4b8cc}.build>div:first-child p a{color:#5266eb;font-weight:600}.build .code-group,.build .code-block{margin:0!important}@media (max-width: 760px){.home-hero,.build{grid-template-columns:1fr}.home-tasks,.home-products{grid-template-columns:1fr 1fr}.home-hero{padding:2rem 1.5rem}.home-hero h1{font-size:2.1rem}.home{padding:0.5rem 1rem 4rem}.home-collage{height:auto}.shot-balance,.shot-event{display:none}.shot-checkout{position:relative;width:100%}}.project-modal-overlay{display:none}.project-modal-overlay:target{display:flex;position:fixed;top:var(--scroll-mt, 6rem);right:0;bottom:0;left:0;align-items:center;justify-content:center;z-index:999;padding:24px;pointer-events:none}.project-modal-box{width:100%;max-width:560px;max-height:100%;overflow-y:auto;border-radius:1rem;padding:2rem 1.5rem 1.5rem;position:relative;box-shadow:0 20px 50px rgba(0, 0, 0, 0.25);pointer-events:auto;scrollbar-width:thin;scrollbar-color:rgba(0, 0, 0, 0.25) transparent}.dark .project-modal-box{box-shadow:0 20px 50px rgba(0, 0, 0, 0.5);scrollbar-color:rgba(255, 255, 255, 0.25) transparent}.project-modal-box::-webkit-scrollbar{width:8px}.project-modal-box::-webkit-scrollbar-track{background:transparent}.project-modal-box::-webkit-scrollbar-thumb{background:rgba(0, 0, 0, 0.2);border-radius:9999px}.dark .project-modal-box::-webkit-scrollbar-thumb{background:rgba(255, 255, 255, 0.2)}.project-modal-close{position:absolute;top:0.75rem;right:0.75rem;width:1.75rem;height:1.75rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;font-size:1.25rem;line-height:1;text-decoration:none}.project-modal-close:hover{background:rgba(128, 128, 128, 0.15)}.project-modal-box .prose{--tw-prose-body: inherit}.project-modal-box .prose>*:first-child{margin-top:0}.project-modal-box .prose>*:last-child{margin-bottom:0}"},{"filePath":"figures.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7SUc.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7SUc.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek-ext */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7SUc.woff2) format('woff2');\n unicode-range: U+1F00-1FFF;\n}\n/* greek */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7SUc.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7SUc.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7SUc.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7SUc.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek-ext */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7SUc.woff2) format('woff2');\n unicode-range: U+1F00-1FFF;\n}\n/* greek */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7SUc.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7SUc.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7SUc.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7SUc.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek-ext */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7SUc.woff2) format('woff2');\n unicode-range: U+1F00-1FFF;\n}\n/* greek */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7SUc.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7SUc.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Inter';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n.pshot{--ink: #1a1a27;--body: #2f2f42;--cap: #72728c;--line: rgba(167, 167, 184, .32);--fill: #f0f0f3;--tint: #f3f3fb;--accent: #4c5fd5;--green: #188554;position:relative;padding:4px 0 28px;font:400 13.5px/1.45 Inter, system-ui, sans-serif;color:var(--body)}.pshot *{box-sizing:border-box;margin:0}.pshot b{font-weight:600;color:var(--ink)}.pshot .card{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}.pshot .float{position:absolute;z-index:1;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 22px 44px -16px rgba(15, 18, 40, .38), 0 2px 6px rgba(15, 18, 40, .08)}.pshot .pad{padding:18px 20px}.pshot .h{font-size:17px;font-weight:600;color:var(--ink);letter-spacing:-.01em}.pshot .cap{color:var(--cap);font-size:12.5px}.pshot .row{display:flex;align-items:center;justify-content:space-between;gap:12px}.pshot .btn{display:inline-block;padding:8px 18px;border-radius:999px;background:var(--accent);color:#fff;font-weight:500}.pshot .btn.off{background:#b9c1f6}.pshot .chip{display:inline-block;padding:2px 9px;border-radius:999px;background:var(--fill);font-size:12px;font-weight:500}.pshot .tag{display:inline-block;padding:1px 7px;border-radius:5px;background:var(--accent);color:#fff;font-size:10.5px;font-weight:600;letter-spacing:.05em}.pshot .win-bar{display:flex;align-items:center;gap:6px;padding:9px 12px;border-bottom:1px solid var(--line);background:#fafafc}.pshot .win-bar i{width:8px;height:8px;border-radius:50%;background:#dcdde6}.pshot .win-url{margin:0 auto;padding:2px 40px;border-radius:6px;background:var(--fill);font-size:11px;color:var(--cap)}.pshot .split2{display:grid;grid-template-columns:1fr 1.15fr}.pshot .summary{background:var(--tint);padding:22px 20px 26px}.pshot .price{font-size:26px;font-weight:600;color:var(--ink);letter-spacing:-.02em;margin-top:2px}.pshot .picker{display:inline-flex;align-items:center;gap:6px;margin-top:14px;padding:6px 10px;border:1px solid var(--line);border-radius:9px;background:#fff;font-weight:500;color:var(--ink)}.pshot .totals{margin-top:18px;border-top:1px solid var(--line)}.pshot .totals .row{padding:9px 0;border-bottom:1px solid var(--line)}.pshot .methods{padding:18px 18px 20px}.pshot .expires{display:table;margin:0 0 12px auto;padding:3px 10px;border-radius:999px;background:#fff4e5;color:#a8640b;font-size:12px;font-weight:500}.pshot .mlist{border:1px solid var(--line);border-radius:12px;overflow:hidden}.pshot .m{display:flex;align-items:center;gap:10px;padding:11px 12px;border-top:1px solid var(--line);color:var(--ink)}.pshot .m:first-child{border-top:0}.pshot .m.on{flex-wrap:wrap;box-shadow:inset 0 0 0 1.5px var(--accent);border-radius:12px}.pshot .radio{flex:none;width:15px;height:15px;border-radius:50%;border:1.5px solid #b9b9c8}.pshot .on .radio{border:5px solid var(--accent)}.pshot .m .note{flex-basis:100%;padding:9px 11px;border:1px solid var(--line);border-radius:9px;color:var(--cap);font-size:12.5px}.pshot .m .btn{flex-basis:100%;text-align:center}.pshot .secure{margin-top:12px;text-align:center;color:var(--cap);font-size:12px}.pshot .menu{padding:5px}.pshot .menu div{display:flex;align-items:center;gap:9px;padding:6px 10px;border-radius:7px;color:var(--ink);font-weight:500}.pshot .menu .sel{background:var(--fill)}.pshot .flag{width:18px;height:12px;border-radius:2px;flex:none}.pshot .tabs{display:flex;gap:20px;margin-top:14px;border-bottom:1px solid var(--line);font-weight:500;color:#3d3f52}.pshot .tabs span{padding-bottom:9px}.pshot .tabs .sel{color:var(--accent);box-shadow:inset 0 -2px 0 var(--accent)}.pshot .list{margin-top:14px;border:1px solid var(--line);border-radius:10px;overflow:hidden}.pshot .item{display:flex;align-items:center;gap:12px;padding:10px 14px;border-top:1px solid var(--line)}.pshot .item:first-child{border-top:0}.pshot .item.done{background:#f7f7fb}.pshot .num{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:12px;border:1px solid #dcdde8;color:var(--cap);background:#fff}.pshot .done .num{border-color:#8f9cf7;background:#eef0fe;color:var(--accent)}.pshot .item .grow{flex:1}.pshot .item small{display:block;color:var(--cap);font-size:12px}.pshot .ok{color:var(--green);font-weight:500;font-size:12.5px}.pshot .bar{height:4px;border-radius:4px;background:#e6e7ef;margin-top:8px}.pshot .bar i{display:block;height:100%;border-radius:4px;background:var(--accent)}.pshot .field{margin-top:12px}.pshot .input{margin-top:5px;padding:8px 11px;border:1px solid var(--line);border-radius:8px;color:var(--ink)}.pshot .group{margin-top:10px;font-size:12px;font-weight:600;color:var(--ink)}.pshot .check{display:flex;align-items:center;gap:8px;margin-top:6px}.pshot .box{flex:none;width:15px;height:15px;border-radius:4px;border:1.5px solid #c3c6dd}.pshot .box.on{border:0;background:var(--accent) url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\") center / 13px no-repeat}.pshot .kv .row{padding:9px 0;border-top:1px solid var(--line)}.pshot .pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.pshot code{font:12px \"Geist Mono\", ui-monospace, monospace;color:var(--ink)}@media (max-width: 760px){.pshot{padding-bottom:8px!important}.pshot .card,.pshot .term,.pshot .float{width:100%!important}.pshot .float{position:static;margin-top:12px;box-shadow:none}.pshot .spacer{display:none}}[role=\"tabpanel\"]:has(.pshot){overflow:visible}.pshot .opts{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.pshot .opt{padding:6px 12px;border:1px solid var(--line);border-radius:9px}.pshot .opt.sel{border-color:transparent;box-shadow:inset 0 0 0 1.5px var(--accent);color:var(--accent);font-weight:500}.pshot .select{display:flex;justify-content:space-between;margin-top:5px;padding:8px 11px;border:1px solid var(--line);border-radius:6px;color:var(--ink)}.pshot .select::after{content:\"\\2304\";color:var(--cap)}.pshot .toggle{flex:none;width:30px;height:17px;border-radius:999px;background:#d9d9e2;position:relative}.pshot .toggle::after{content:\"\";position:absolute;left:2px;top:2px;width:13px;height:13px;border-radius:50%;background:#fff}.pshot .choice{display:flex;align-items:center;gap:10px;margin-top:8px;padding:10px 12px;border:1px solid var(--line);border-radius:10px}.pshot .choice.on{border-color:transparent;box-shadow:inset 0 0 0 1.5px var(--accent)}.pshot .choice small{display:block;color:var(--cap);font-size:12px}.pshot .center{text-align:center;margin-top:14px}.pshot .item .grow.cap{white-space:nowrap}.pshot .toggle.on{background:var(--accent)}.pshot .toggle.on::after{left:15px}.pshot .toggle.dim{opacity:.45}.pshot table{width:100%;border-collapse:collapse}.pshot th{text-align:left;font-weight:400;color:var(--cap);font-size:12px;padding:7px 10px;border-bottom:1px solid var(--line)}.pshot td{padding:8px 10px;border-bottom:1px solid var(--line);white-space:nowrap}.pshot tr:last-child td{border-bottom:0}.pshot .badge{padding:2px 7px;border-radius:6px;font-size:11.5px;font-weight:500;background:#e8f6ee;color:var(--green)}.pshot .badge.red{background:#fdecec;color:#c8323c}.pshot .filters{display:flex;gap:6px;margin-top:12px}.pshot .filters span{padding:6px 10px;border:1px solid var(--line);border-radius:8px;color:var(--cap);font-size:12.5px}.pshot .grid3{display:grid;grid-template-columns:repeat(3, 1fr);gap:10px;margin-top:12px}.pshot .grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pshot .mini{border:1px solid var(--line);border-radius:10px;padding:11px 12px}.pshot .mini .t{font-size:12px;font-weight:500;color:var(--ink);text-decoration:underline dotted #b9b9c8;text-underline-offset:3px}.pshot .bars{display:flex;align-items:flex-end;gap:6px;height:74px;margin-top:10px}.pshot .bars i{flex:1;border-radius:4px 4px 0 0;background:#c9cef8}.pshot .bars i:last-child{background:var(--accent)}.pshot .dot{display:inline-block;width:9px;height:6px;border-radius:3px;margin-right:6px}.pshot .dim-page{background:#e9eaf0}.pshot .sandbox{padding:7px 14px;background:#fff7e0;color:#8a5a00;font-size:11.5px;text-align:center}.pshot .drag{color:#b4b6c6;letter-spacing:-2px;margin-right:4px}.pshot .x{margin-left:auto;color:var(--cap)}.pshot .plus{margin-left:auto;color:var(--accent);font-size:16px}.pshot .badge,.pshot code{white-space:nowrap}.pshot .badge.blue{background:#eef0fe;color:var(--accent)}.pshot .btn.red{background:#b42318}.pshot .label{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--cap)}.pshot .btn,.pshot .nowrap{white-space:nowrap}.pshot .code{margin-top:6px;padding:10px 12px;border-radius:8px;background:var(--fill);font:11.5px/1.55 \"Geist Mono\", ui-monospace, monospace;color:#8a2a2a;white-space:pre;overflow:hidden}.pshot .side{padding:7px 10px;border-radius:7px;color:var(--body)}.pshot .side.on{background:var(--fill);color:var(--ink);font-weight:500}.pshot.narrow{max-width:620px}.pshot .badge.grey{background:var(--fill);color:var(--cap)}.pshot .notice{margin-top:10px;padding:10px 12px;border-radius:9px;background:#fff4e5;color:#8a5a00;font-size:12.5px}.pshot.diag{max-width:820px;margin:0 auto;padding-bottom:8px}.pshot .term{border-radius:12px;background:#16172a;color:#e9eaf5;overflow:hidden}.pshot .tbar{padding:8px 14px;font-size:12px;color:#a9acc6;background:rgba(255, 255, 255, .04)}.pshot .term pre{margin:0;padding:12px 14px;font:11.5px/1.6 \"Geist Mono\", ui-monospace, monospace;white-space:pre;color:#e9eaf5;overflow:hidden}.pshot .badge.amber{background:#fff4e5;color:#a8640b}.pshot .steps4{display:flex;gap:6px;margin-top:12px}.pshot .steps4 i{flex:1;height:3px;border-radius:2px;background:#e6e7ef}.pshot .steps4 i.on{background:var(--accent)}.pshot .fbox{margin-top:12px;padding:9px 12px;border:1px solid var(--line);border-radius:10px}.pshot .tick{width:44px;height:44px;margin:16px auto 8px;border-radius:50%;border:2px solid var(--accent);color:var(--accent);display:grid;place-items:center;font-size:20px}.pshot .tl{margin-top:12px;padding:8px 12px;border-radius:10px;background:var(--fill)}.pshot .tl div{display:flex;align-items:center;gap:10px;padding:5px 0}.pshot .tl .grow{flex:1}.pshot .tl i{width:8px;height:8px;border-radius:50%;background:#cfd0dc}.pshot .tl .d i{background:#376c47}.pshot .tl .c i{background:#fff;box-shadow:0 0 0 2px #376c47}"}],"page":{"pagePath":"connect/acting-as-an-account","slug":"/connect/acting-as-an-account","pageMetadata":{"title":"Acting as an account","mode":"wide","description":"How you authenticate a request to act on an account's behalf, and what that authority does and does not cover.","href":"/connect/acting-as-an-account"},"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: \"How you authenticate a request to act on an account’s behalf, and what that authority does and does not cover.\"\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,Heading,OptimizedImage,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`the-header`,children:`The header`}),`\n`,_jsx(_components.p,{children:`Your platform authenticates with its own API key. On its own, a request made with that key acts as your platform: any charge, transfer, or balance read is yours.`}),`\n`,_jsxs(_components.p,{children:[`Send `,_jsx(_components.code,{children:`X-Account-Id`}),` with an account’s id and the request acts as that account instead.`]}),`\n`,_jsx(CodeBlock,{filename:``,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:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` https://sandbox-api.bachs.io/v1/balances`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk_sandbox_abc123xyz...\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"X-Account-Id: acct_3Wq8ZfT1yHnJ5sVe\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The header works on any API-key endpoint, not only the Connect ones. There is no separate key per account: one platform key, with `,_jsx(_components.code,{children:`X-Account-Id`}),` deciding whose behalf a given call is on.`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-light.svg?fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=4573af74d006194eb42aeb31cbcd39e5`,alt:`A platform key reaches its own account by default, reaches a child account with X-Account-Id, and is rejected for an account that is not its child.`,className:`mint-block dark:mint-hidden`,\"data-og-width\":`1208`,width:`1208`,\"data-og-height\":`280`,height:`280`,\"data-path\":`images/connect/credentials-light.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-light.svg?w=280\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=24ff5c00d27ff983f3f715105a672cc1 280w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-light.svg?w=560\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=512391c41b7fa7fad7afa6f1b29c06a8 560w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-light.svg?w=840\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=872d6daf3a9c86ff150c3910a484f5e2 840w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-light.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=2486d8fecfe9b623a3d41255262d71b3 1100w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-light.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=20e36c555a006bf2552421bc76ff2571 1650w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-light.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=1e428b11b24127987306816fdeb11946 2500w`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-dark.svg?fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=b8ce77455ede39e4c5d66564b9972f49`,alt:`A platform key reaches its own account by default, reaches a child account with X-Account-Id, and is rejected for an account that is not its child.`,className:`mint-hidden dark:mint-block`,\"data-og-width\":`1208`,width:`1208`,\"data-og-height\":`280`,height:`280`,\"data-path\":`images/connect/credentials-dark.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-dark.svg?w=280\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=7e207934c87b57c98644b7ae1aab322b 280w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-dark.svg?w=560\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=4014a3932d67e11cdc12085f401425a8 560w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-dark.svg?w=840\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=c48d930d4e0e796fd94f71a7c8b63d10 840w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-dark.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=5e4d48c66f3faeb2d0926ecc260b9468 1100w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-dark.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=f35b90b647c8a54c755f9114d1307fb6 1650w, https://mintcdn.com/bachs/WCaTEPG5SFcrO3yT/images/connect/credentials-dark.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=WCaTEPG5SFcrO3yT\u0026q=85\u0026s=052215e2aab919ac37f971c9eeda201a 2500w`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`An unread or misspelled header name is not rejected. If the API does not recognize the header, the request runs as your platform and returns success. A caller who omits `,_jsx(_components.code,{children:`X-Account-Id`}),`, or sends a stale header name, gets a successful call against the wrong party rather than an error. On a checkout this means the charge and the money land in your platform’s balance instead of the account’s.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what-it-changes`,children:`What it changes`}),`\n`,_jsx(_components.p,{children:`The header changes who a call is made on behalf of, which changes who owns the result.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A checkout created with `,_jsx(_components.code,{children:`X-Account-Id`}),` is a direct charge: the account is the merchant of record, and the sale lands in its balance. See `,_jsx(_components.a,{href:`/connect/split-payments/direct`,children:`Direct charges`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`A transfer sent with `,_jsx(_components.code,{children:`X-Account-Id`}),` moves funds from that account’s balance. See `,_jsx(_components.a,{href:`/connect/transfers`,children:`Transfers`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Everything else about creating a checkout or a transfer is unchanged. The header only decides whose balance the call reads from and writes to.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-it-does-not-do`,children:`What it does not do`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`It cannot reach an account that is not yours.`}),` Naming an id that is not one of your accounts returns `,_jsx(_components.code,{children:`403`}),`, naming the header and the id you sent, rather than acting on it. The check is a direct parentage test: the named account’s parent must be the account your key belongs to, or the request is rejected outright. There is no broader reach through a shared platform, an intermediate account, or any other relationship.`]}),`\n`,_jsxs(_components.p,{children:[`An id that does not exist and an id belonging to another platform return the same `,_jsx(_components.code,{children:`403`}),`, so the header cannot be used to find out which account ids are real. Your key itself is unaffected: the same request without the header succeeds.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`It does not grant the account anything it has not been set up for.`}),` The header changes who a call runs as; it does not change what that party is allowed to do. An account still needs the capability for a payment method before a checkout run as that account can accept it, and still needs `,_jsx(_components.code,{children:`payouts`}),` before a withdrawal run as that account will succeed. See `,_jsx(_components.a,{href:`/connect/capabilities`,children:`Capabilities`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`It does not change which scope your key needs.`}),` The scope check is against your platform key’s own scopes, the same ones it would need calling on its own behalf. Acting as an account does not require a different scope and does not grant one your key does not already have.`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/connect/accounts`,children:`Accounts`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/connect/split-payments/direct`,children:`Direct charges`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/connect/transfers`,children:`Transfers`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/connect/capabilities`,children:`Capabilities`})}),`\n`]})]})}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":"Acting as an account","mode":"wide","description":"How you authenticate a request to act on an account's behalf, and what that authority does and does not cover.","href":"/connect/acting-as-an-account"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The header","slug":"the-header","depth":2,"children":[]},{"title":"What it changes","slug":"what-it-changes","depth":2,"children":[]},{"title":"What it does not do","slug":"what-it-does-not-do","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"dynamicCss":".mint-block {\n display: block\n}\n.mint-hidden {\n display: none\n}\n.dark\\:mint-block:is(.dark *) {\n display: block\n}\n.dark\\:mint-hidden:is(.dark *) {\n display: none\n}","subdomain":"bachs","siteName":"Bachs","title":"Acting as an account - Bachs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-23T05:30:55.939Z","originalFileLocation":"connect/acting-as-an-account.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=\"How you authenticate a request to act on an account\u0026#x27;s behalf, and what that authority does and does not cover.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Bachs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bachs/G65YpENXbxC-6e23/_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/bachs/G65YpENXbxC-6e23/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bachs/G65YpENXbxC-6e23/_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/bachs/G65YpENXbxC-6e23/_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/bachs/G65YpENXbxC-6e23/_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/bachs/G65YpENXbxC-6e23/_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/bachs/G65YpENXbxC-6e23/_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/bachs/G65YpENXbxC-6e23/_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/bachs/G65YpENXbxC-6e23/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Acting as an account - Bachs\">\u003cmeta data-mint-head property=\"og:description\" content=\"How you authenticate a request to act on an account\u0026#x27;s behalf, and what that authority does and does not cover.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Bachs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.bachs.io/connect/acting-as-an-account\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bachs.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Acting+as+an+account\u0026amp;description=How+you+authenticate+a+request+to+act+on+an+account%27s+behalf%2C+and+what+that+authority+does+and+does+not+cover.\u0026amp;theme=6365cd32178e755cedc188f0\u0026amp;signature=57968070f9693e490b3bc9cfe7d377164aeb5a5fececf25669e4fd33fabddbe0\">\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=\"Acting as an account - Bachs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How you authenticate a request to act on an account\u0026#x27;s behalf, and what that authority does and does not cover.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bachs.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Acting+as+an+account\u0026amp;description=How+you+authenticate+a+request+to+act+on+an+account%27s+behalf%2C+and+what+that+authority+does+and+does+not+cover.\u0026amp;theme=6365cd32178e755cedc188f0\u0026amp;signature=57968070f9693e490b3bc9cfe7d377164aeb5a5fececf25669e4fd33fabddbe0\">\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/bachs/G65YpENXbxC-6e23/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Bachs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5266eb\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"xCFt-c27YambrzzvRTU4CiqeElNFKGVJZw_8o9IgpdA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.bachs.io/connect/acting-as-an-account\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/connect/acting-as-an-account.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.bachs.io/#organization\",\"name\":\"Bachs\",\"url\":\"https://docs.bachs.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/bachs/8QOZkInmSDP5Ad7N/logo.png?fit=max\u0026auto=format\u0026n=8QOZkInmSDP5Ad7N\u0026q=85\u0026s=9d4369b7a7ceeb9d196f647822f4ea01\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.bachs.io#website\",\"name\":\"Bachs\",\"url\":\"https://docs.bachs.io\",\"publisher\":{\"@id\":\"https://docs.bachs.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.bachs.io/connect/acting-as-an-account#webpage\",\"url\":\"https://docs.bachs.io/connect/acting-as-an-account\",\"name\":\"Acting as an account\",\"description\":\"How you authenticate a request to act on an account's behalf, and what that authority does and does not cover.\",\"dateModified\":\"2026-08-23T05:30:55.939Z\",\"isPartOf\":{\"@id\":\"https://docs.bachs.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.bachs.io/connect/acting-as-an-account#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.bachs.io/connect/acting-as-an-account#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://docs.bachs.io/connect/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Acting as an account\",\"item\":\"https://docs.bachs.io/connect/acting-as-an-account\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.bachs.io/connect/acting-as-an-account#article\",\"headline\":\"Acting as an account\",\"name\":\"Acting as an account\",\"description\":\"How you authenticate a request to act on an account's behalf, and what that authority does and does not cover.\",\"url\":\"https://docs.bachs.io/connect/acting-as-an-account\",\"mainEntityOfPage\":{\"@id\":\"https://docs.bachs.io/connect/acting-as-an-account#webpage\"},\"dateModified\":\"2026-08-23T05:30:55.939Z\",\"publisher\":{\"@id\":\"https://docs.bachs.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.bachs.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Bachs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Bachs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/connect/acting-as-an-account.md","siteName":"Bachs","nav":{"global":null,"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":"/get-started"}]},{"tab":"Payments","pages":[{"title":"Payments","href":"/guides/payments/overview"}]},{"tab":"Billing","pages":[{"title":"Billing","href":"/guides/billing/overview"}]},{"tab":"Payouts","pages":[{"title":"Payouts","href":"/guides/payouts/overview"}]},{"tab":"Connect (Sub accounts)","groups":[{"group":"Get started","pages":[{"title":"Connect (Sub accounts)","mode":"wide","href":"/connect/overview"},{"title":"Choose your integration","mode":"wide","href":"/connect/choose-your-integration"},{"title":"Become a platform","mode":"wide","href":"/connect/become-a-platform"},{"title":"Connect quickstart","mode":"wide","description":"Create an account, onboard it, and run a split payment end to end in the sandbox.","href":"/connect/quickstart"},{"title":"Acting as an account","mode":"wide","href":"/connect/acting-as-an-account"},{"title":"How money moves","mode":"wide","description":"The paths money takes through a Connect integration, and whose balance holds it at each step.","href":"/connect/money-movement"}]},{"group":"Core concepts","pages":[{"title":"Accounts","mode":"wide","href":"/connect/accounts"},{"title":"Capabilities","mode":"wide","href":"/connect/capabilities"},{"title":"Requirements","mode":"wide","href":"/connect/requirements"},{"title":"Onboarding","mode":"wide","href":"/connect/onboarding"},{"title":"Give an account a dashboard","mode":"wide","href":"/connect/seller-dashboard"},{"title":"Balances","mode":"wide","href":"/connect/balances"},{"title":"Direct charges","mode":"wide","href":"/connect/split-payments/direct"},{"title":"Destination charges","mode":"wide","href":"/connect/split-payments/destination"},{"title":"Paying an account without a charge","mode":"wide","href":"/connect/split-payments/separate-transfers"},{"title":"Platform fees","mode":"wide","href":"/connect/platform-fees"},{"title":"Processing fees","mode":"wide","href":"/connect/processing-fees"},{"title":"Transfers","mode":"wide","href":"/connect/transfers"},{"title":"Payouts","mode":"wide","href":"/connect/payouts"}]},{"group":"Reversals and risk","pages":[{"title":"Refunds on Connect charges","mode":"wide","href":"/connect/refunds"},{"title":"Disputes on Connect charges","mode":"wide","href":"/connect/disputes"}]},{"group":"Onboard an account","pages":[{"title":"Create an account","mode":"wide","href":"/connect/guides/create-an-account"},{"title":"Onboard with a hosted link","mode":"wide","href":"/connect/guides/hosted-onboarding"},{"title":"Onboard through the API","mode":"wide","href":"/connect/guides/api-onboarding"},{"title":"Verify an account's identity","mode":"wide","href":"/connect/guides/identity-verification"},{"title":"Monitor onboarding","mode":"wide","href":"/connect/guides/monitor-onboarding"}]},{"group":"Build with Connect","pages":[{"title":"Split payments","mode":"wide","href":"/connect/split-payments"},{"title":"Marketplaces and SaaS platforms","mode":"wide","href":"/connect/marketplaces/overview"},{"title":"Accept a payment for a seller","mode":"wide","href":"/connect/marketplaces/accept-a-payment"},{"title":"Refunds and disputes","mode":"wide","href":"/connect/marketplaces/refunds-and-disputes"},{"title":"Creator and contractor payouts","mode":"wide","href":"/connect/payout-networks"}]},{"group":"Go live","pages":[{"title":"Take Connect live","mode":"wide","href":"/connect/go-live"},{"title":"Testing Connect","mode":"wide","href":"/connect/testing"}]}]},{"tab":"Developers","pages":[{"title":"Developers","href":"/developers/overview"}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/overview"}]}]},"basePath":"","title":"Acting as an account - Bachs","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-BbK2OBGL.js","lightbox-handle-r17bVUz3.js"]}