# Bachs > 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. ## Conventions - 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. ## Get started ### Overview - [Documentation](https://docs.bachs.io/index): Your customer pays in naira or shillings. You settle in dollars or naira. Guides, references and working code for Bachs payments, billing, payouts and sub accounts. - [Get started](https://docs.bachs.io/get-started): Create an account and learn how to build on Bachs. - [How Bachs works](https://docs.bachs.io/concepts/overview): The mental model behind every Bachs integration: who is involved, how a payment moves from checkout to payout, which currencies sit where, and how the sandbox relates to live. - [Glossary](https://docs.bachs.io/get-started/glossary): Plain definitions of the terms used across the Bachs docs, each with a link to the page that covers it in full. ### Start building - [Set up your development environment](https://docs.bachs.io/get-started/development-environment): Get a sandbox key, the Bachs CLI and a server SDK ready, and send your first request to the sandbox. - [API keys and authentication](https://docs.bachs.io/authentication): Create a sandbox key in the Developer Portal, send your first authenticated request, and keep keys out of the places they do not belong. - [Quickstarts](https://docs.bachs.io/get-started/quickstarts): Every step-by-step guide that takes you from an empty sandbox to a working integration. - [Build with AI using the Bachs skill](https://docs.bachs.io/build/ai/skills): Install the Bachs skill once, and your AI coding assistant follows the Bachs rules on every task: payments, subscriptions, marketplaces and pre-launch reviews. - [Connect Bachs to an AI app](https://docs.bachs.io/build/ai/mcp): Connect your Bachs account to Claude, ChatGPT, Cursor or another AI app, and ask about your payments, payouts, disputes, compliance and API calls in plain words. Read-only, and you can disconnect it at any time. - [Use tested AI prompts](https://docs.bachs.io/build/ai/prompts): Three tested prompts that get a coding assistant to build Bachs one-time payments or subscriptions in your app, or review your integration before go-live. Nothing to install. - [Go-live checklist](https://docs.bachs.io/get-started/go-live-checklist): The technical checks to run before you swap your sandbox keys for live keys. #### Create an account - [Create and verify your account](https://docs.bachs.io/go-live): Verify your account once to accept payments and withdraw funds. Build in the sandbox now; going live is a key swap. - [Check if your business is supported](https://docs.bachs.io/for-you/supported-businesses): Business types accepted on Bachs and those that are not permitted on the platform. - [Age requirements](https://docs.bachs.io/for-you/age-requirements): Who can open a Bachs account, and how registration works for anyone below the age of majority in their country. ### Common use cases - [Common use cases](https://docs.bachs.io/build/overview): End-to-end walkthroughs for the most common ways to build on Bachs, each tested in the sandbox. - [Sell SaaS subscriptions](https://docs.bachs.io/build/use-cases/saas-subscriptions): Sell monthly and yearly plans, give access from webhooks, and let customers manage billing themselves. The full flow, end to end, in the sandbox. - [Sell digital products](https://docs.bachs.io/build/use-cases/digital-products): Sell ebooks, templates, courses or software at a fixed price or pay what you want, and release the download only when Bachs confirms the payment. - [Build a marketplace](https://docs.bachs.io/build/use-cases/marketplace): Run a full marketplace sale in the sandbox, from creating a seller to watching its share land. - [Build a SaaS platform](https://docs.bachs.io/build/use-cases/saas-platform): Run a full SaaS sale in the sandbox, where your account is the one selling and your cut comes back to you. ### More resources - [Test your integration in the sandbox](https://docs.bachs.io/integrate/sandbox): A separate Bachs environment where every flow runs on simulated money, so you can test the whole integration before you go live. - [Try SnapKit, the live demo](https://docs.bachs.io/demo): A fully working storefront on the Bachs sandbox: one-time payments, subscriptions, free trials, pay-what-you-want, and the overlay checkout, all clickable. - [Starter templates](https://docs.bachs.io/build/starters/overview): Choose working starter code by framework and use case, run it in the Bachs sandbox, and adapt it to your product. - [Community projects](https://docs.bachs.io/community/overview): SDKs, plugins, and boilerplates built by the Bachs community. - [Project directory](https://docs.bachs.io/community/projects): Community-built SDKs, plugins, and boilerplates for Bachs. - [Submit your project](https://docs.bachs.io/community/submit): How to add your open-source project to the Bachs community directory. ## Payments ### Overview - [Payments](https://docs.bachs.io/guides/payments/overview): Accept payments online in your customer's currency, with the methods they already use, and settle in yours. - [How payments work](https://docs.bachs.io/for-you/payins-payouts): How customers pay you, and how you receive your funds. ### Checkout - [Accept a payment with Checkout](https://docs.bachs.io/guides/checkout/checkout-sessions): Create a hosted checkout, send your customer to it, and confirm the payment with a webhook. - [Charge in any currency](https://docs.bachs.io/guides/checkout/any-currency-checkout): Price a product in your customer's currency, collect on a local payment method, and settle to the balance you hold. - [Set a one-off price for a checkout](https://docs.bachs.io/guides/checkout/adhoc-pricing): Charge a catalog product at a one-off price for a single checkout, without changing your catalog. - [Add an overlay checkout](https://docs.bachs.io/guides/checkout/overlay-checkout): Open the Bachs hosted checkout in a modal on your own site with bachs.js, so customers pay without leaving your page. ### Payment methods - [Supported payment methods](https://docs.bachs.io/guides/payments/payment-method-support): Every payment method Bachs supports, the currencies each one accepts, and which products they work with. - [Request a capability](https://docs.bachs.io/guides/payments/request-a-capability): See what your account can do, and ask for what is missing. - [Accept bank transfers with a virtual account](https://docs.bachs.io/guides/virtual-accounts/overview): Get a permanent NGN bank account number, receive bank transfers into it, and match each deposit to the customer who sent it. - [Charge a saved card](https://docs.bachs.io/guides/payments/charge-a-saved-card): Save a customer's card at checkout, then charge it off-session later with no customer present. ### Customers - [Manage customers](https://docs.bachs.io/guides/customers): Create, find, and update the customers you bill through the Bachs API. ### After a payment - [Payment statuses](https://docs.bachs.io/guides/payments/statuses): Understand payment charge statuses, what each one means, and how substatuses add detail. - [Issue a refund](https://docs.bachs.io/guides/refunds): Refund a payment in full or in part, see which payments can be refunded, and know when the money reaches the customer. - [Handle disputes](https://docs.bachs.io/guides/disputes/overview): When a customer files a chargeback or payment dispute through their card network or payment provider, we create a dispute record in your account and email the account owner. You have a limited window to submit evidence countering the claim before the deadline passes. ### Dashboard - [View transactions](https://docs.bachs.io/guides/transactions): The complete record of every charge attempt on your account: successful, failed, pending, and everything in between. - [Dashboard home and analytics](https://docs.bachs.io/guides/dashboard-analytics): Your real-time view of revenue, payment activity, and customer growth, filterable by date range and fully customizable. ### Fees, currencies and limits - [Fees](https://docs.bachs.io/for-you/fees): A complete breakdown of every fee on Bachs processing, withdrawals, conversions, and more. - [Supported currencies](https://docs.bachs.io/for-you/supported-currencies): Currencies accepted for payment collection and available for withdrawals. - [Deposit limits](https://docs.bachs.io/guides/payments/deposit-limits): Per-payment-method caps on the maximum amount a customer can pay in a single charge. ## Billing ### Overview - [Billing](https://docs.bachs.io/guides/billing/overview): Sell plans that renew every month or year, recover failed renewals, and let customers manage their own billing. ### Products and pricing - [Create and manage products](https://docs.bachs.io/guides/products/overview): Define your billing catalog with fixed, free, or custom pricing, multi-currency. - [Sell in local currencies](https://docs.bachs.io/guides/products/local-pricing): Set prices in your customers' local currencies to build trust and improve payment acceptance. ### Subscriptions - [How subscriptions work](https://docs.bachs.io/guides/subscriptions/overview): Recurring billing on top of your products. A subscription is one customer's ongoing relationship with a recurring product. - [Subscription lifecycle and events](https://docs.bachs.io/guides/subscriptions/lifecycle): Every stage of a subscription from checkout to cancellation, the status it moves to, and the webhook that tells you. - [Offer a free trial](https://docs.bachs.io/guides/subscriptions/trials): Give customers a free period before their first charge. The card is saved at checkout and charged when the trial ends. - [Change or cancel a subscription](https://docs.bachs.io/guides/subscriptions/manage): Change the plan or the seat count, move a trial, or cancel, using the API or your dashboard. - [How proration works](https://docs.bachs.io/guides/subscriptions/proration): How Bachs settles the price difference when a subscription changes mid-cycle. - [Recover failed payments](https://docs.bachs.io/guides/subscriptions/failed-payments): How Bachs retries failed renewal charges, emails the customer a link to update their card, and what happens when retries run out. ### Customer portal - [Set up the customer portal](https://docs.bachs.io/guides/customer-portal/overview): A hosted page where your customers manage their own subscriptions, invoices, cards, and contact details, without you building any of it. - [Create a portal session](https://docs.bachs.io/guides/customer-portal/create-portal-session): Mint an authenticated customer portal session and get the URL to redirect your customer to. ## Payouts ### Overview - [Payouts](https://docs.bachs.io/guides/payouts/overview): Move money from your Bachs balance to your own bank account, mobile money wallet or crypto wallet. - [How payouts work](https://docs.bachs.io/guides/payouts/how-payouts-work): What a payout needs, how one moves from your balance to your destination, and how to tell when it has arrived. - [Understand your balance](https://docs.bachs.io/guides/payouts/balances): What is in your Bachs balance, when collected money becomes available to pay out, and how to read it from the API. ### Send payouts - [Create a payout](https://docs.bachs.io/guides/payouts/payout-using-api): Create and track a payout from the dashboard or through the API. - [Set up automatic payouts](https://docs.bachs.io/guides/payouts/payout-schedules): Pay out settled customer collections on a schedule, set from the dashboard or the API. - [Save and manage payout destinations](https://docs.bachs.io/guides/payouts/destinations): Save the bank accounts and wallets you pay out to, get them approved, choose a default, and change or remove them safely. ### Track and reconcile - [Reconcile payouts](https://docs.bachs.io/guides/payouts/reconcile): Match every payout to your own records, check what left your balance against what arrived, and trace a transfer with the receiving bank. ### Currencies and methods - [Payout currencies and methods](https://docs.bachs.io/guides/payouts/global-payouts): Where you can pay out, by currency, method and mobile money network, and the details each destination needs. ## Connect (Sub accounts) ### Get started - [Connect (Sub accounts)](https://docs.bachs.io/connect/overview): Give each business or person who sells through you or gets paid by you a financial identity of their own, and move money between them. - [Choose your integration](https://docs.bachs.io/connect/choose-your-integration): Decide whether the customer pays you or pays the account, before you build. - [Become a platform](https://docs.bachs.io/connect/become-a-platform): Get the connect capability, which your account needs before it can create accounts. - [Connect quickstart](https://docs.bachs.io/connect/quickstart): Create an account, onboard it, and run a split payment end to end in the sandbox. - [Acting as an account](https://docs.bachs.io/connect/acting-as-an-account): How you authenticate a request to act on an account's behalf, and what that authority does and does not cover. - [How money moves](https://docs.bachs.io/connect/money-movement): The paths money takes through a Connect integration, and whose balance holds it at each step. ### Core concepts - [Accounts](https://docs.bachs.io/connect/accounts): Create a financial identity for a seller or contractor, act on its behalf, and read its state. - [Capabilities](https://docs.bachs.io/connect/capabilities): What an account is permitted to do with money, and what each permission asks it to provide. - [Requirements](https://docs.bachs.io/connect/requirements): The information an account provides before its capabilities go live, and why each piece is asked. - [Onboarding](https://docs.bachs.io/connect/onboarding): Complete an account's requirements from the dashboard, with a hosted link, or through the API. - [Give an account a dashboard](https://docs.bachs.io/connect/seller-dashboard): Let the person behind an account see their money on connect.bachs.io, and choose what they may change. - [Balances](https://docs.bachs.io/connect/balances): Read available and pending balances for your platform and any account. - [Direct charges](https://docs.bachs.io/connect/split-payments/direct): How a direct charge lands in an account's own balance, and how a platform fee is taken from it. - [Destination charges](https://docs.bachs.io/connect/split-payments/destination): How a destination charge lands in your platform's balance, and how the seller's share moves down to an account. - [Paying an account without a charge](https://docs.bachs.io/connect/split-payments/separate-transfers): How to move funds to an account as a standalone transfer, on your own schedule, with or without a charge behind it. - [Platform fees](https://docs.bachs.io/connect/platform-fees): How a platform fee is set, the bounds it must fall within, and when the platform's cut becomes available. - [Processing fees](https://docs.bachs.io/connect/processing-fees): Who bears the processing fee on a charge, who collects it, and how to tell which happened after the fact. - [Transfers](https://docs.bachs.io/connect/transfers): Move funds between your platform balance and an account you own. - [Payouts](https://docs.bachs.io/connect/payouts): Move an account's balance out to a bank account, mobile money wallet, or crypto wallet. ### Reversals and risk - [Refunds on Connect charges](https://docs.bachs.io/connect/refunds): Which balance a refund debits on a direct, destination, or transferred charge, and what happens to the platform fee. - [Disputes on Connect charges](https://docs.bachs.io/connect/disputes): Who is liable when an account's charge is disputed, and how the dispute affects each party's balance. ### Onboard an account - [Create an account](https://docs.bachs.io/connect/guides/create-an-account): Create an account for a seller or contractor, choose what it can do, and read back what it owes. - [Onboard with a hosted link](https://docs.bachs.io/connect/guides/hosted-onboarding): Send an account to a hosted flow that collects its requirements for you. - [Onboard through the API](https://docs.bachs.io/connect/guides/api-onboarding): Build your own onboarding interface by reading, filling, and submitting an account's requirements. - [Verify an account's identity](https://docs.bachs.io/connect/guides/identity-verification): Submit an account's people, get them through the selfie video check where it is needed, and read the result. - [Monitor onboarding](https://docs.bachs.io/connect/guides/monitor-onboarding): React to an account becoming able to transact, without polling. ### Build with Connect - [Split payments](https://docs.bachs.io/connect/split-payments): How a platform takes a cut of an account's sale, in the two shapes Bachs supports. - [Marketplaces and SaaS platforms](https://docs.bachs.io/connect/marketplaces/overview): Collect the sale as your platform, and pay each seller its share. - [Accept a payment for a seller](https://docs.bachs.io/connect/marketplaces/accept-a-payment): Collect a sale as your platform and pay the seller its share. - [Refunds and disputes](https://docs.bachs.io/connect/marketplaces/refunds-and-disputes): Who absorbs a reversal when your platform collected the charge, and what happens when your balance cannot cover it. - [Creator and contractor payouts](https://docs.bachs.io/connect/payout-networks): Pay a network of creators, affiliates, or contractors from money you collected centrally. ### Go live - [Take Connect live](https://docs.bachs.io/connect/go-live): What changes between sandbox and production for a platform, and what to check first. - [Testing Connect](https://docs.bachs.io/connect/testing): How account creation, capabilities, and settlement behave in sandbox, and where that diverges from live. ## Developers ### Overview - [Developers](https://docs.bachs.io/developers/overview): The tools for building on Bachs from code: the CLI, the SDKs, webhooks and the Developer portal. ### Developer portal - [Developer portal](https://docs.bachs.io/developer-portal/overview): Where you manage API keys and webhook endpoints, and inspect every request and delivery. - [Manage API keys](https://docs.bachs.io/developer-portal/api-keys): Secret keys that authenticate your backend requests to Bachs. Scoped, rotatable, and revocable on demand. - [Monitor webhook deliveries](https://docs.bachs.io/developer-portal/events): Monitor webhook delivery health per endpoint. Inspect every attempt, see the exact payload delivered, and retry anything that didn't land. - [Inspect request logs](https://docs.bachs.io/developer-portal/logs): A full record of every API request your keys have made. Method, path, status code, duration, and the exact request and response bodies. ### Webhooks - [Set up webhooks](https://docs.bachs.io/guides/webhooks/overview): Receive real-time notifications when payment or withdrawal state changes. No polling required. - [Test webhooks locally](https://docs.bachs.io/developer-portal/local-testing): Receive live webhook events on your own machine and verify a real signature, before you have anything deployed. - [Replay webhook events](https://docs.bachs.io/guides/webhooks/replay-events): Create a new outbound delivery attempt for a previously generated webhook event. #### Events ##### Checkout - [checkout.completed](https://docs.bachs.io/guides/webhooks/events/checkout-completed): Occurs when a customer finishes a checkout session, whether or not a payment was collected. - [checkout.expired](https://docs.bachs.io/guides/webhooks/events/checkout-expired): Occurs when an open checkout session lapses past its expiry without the customer completing it. ##### Payments - [collection.succeeded](https://docs.bachs.io/guides/webhooks/events/collection-succeeded): Occurs when a payment is successfully collected, including a virtual account deposit. - [collection.failed](https://docs.bachs.io/guides/webhooks/events/collection-failed): Occurs when a payment attempt fails. The checkout stays open, so the customer can try again. - [collection.underpaid](https://docs.bachs.io/guides/webhooks/events/collection-underpaid): Occurs when a crypto payment arrives for less than the amount due. ##### Subscriptions - [customer.subscription.created](https://docs.bachs.io/guides/webhooks/events/customer-subscription-created): Occurs when a subscription is created after a customer completes a recurring checkout. - [customer.subscription.updated](https://docs.bachs.io/guides/webhooks/events/customer-subscription-updated): Occurs when a subscription changes: a plan change, trial move, payment-method swap, or status transition. - [customer.subscription.deleted](https://docs.bachs.io/guides/webhooks/events/customer-subscription-deleted): Occurs when a subscription is canceled and will no longer renew. ##### Invoices - [invoice.created](https://docs.bachs.io/guides/webhooks/events/invoice-created): Occurs when an invoice is created for a subscription cycle or a one-off charge. - [invoice.paid](https://docs.bachs.io/guides/webhooks/events/invoice-paid): Occurs when an invoice is paid in full. - [invoice.payment_failed](https://docs.bachs.io/guides/webhooks/events/invoice-payment-failed): Occurs when an attempt to collect an invoice fails. ##### Payouts - [payout.created](https://docs.bachs.io/guides/webhooks/events/payout-created): Occurs when a payout is created and begins processing. - [payout.paid](https://docs.bachs.io/guides/webhooks/events/payout-paid): Occurs when a payout is delivered to its destination. - [payout.failed](https://docs.bachs.io/guides/webhooks/events/payout-failed): Occurs when a payout fails to be delivered. ##### Refunds - [refund.created](https://docs.bachs.io/guides/webhooks/events/refund-created): Occurs when a refund is created and begins processing. - [refund.paid](https://docs.bachs.io/guides/webhooks/events/refund-paid): Occurs when a refund is successfully delivered to the customer. - [refund.failed](https://docs.bachs.io/guides/webhooks/events/refund-failed): Occurs when a refund fails to be delivered. ##### Disputes - [dispute.created](https://docs.bachs.io/guides/webhooks/events/dispute-created): Occurs when a customer's bank raises a dispute (chargeback) against a charge. - [dispute.updated](https://docs.bachs.io/guides/webhooks/events/dispute-updated): Occurs when a dispute's status changes on the network side. Saving or submitting evidence does not send this event. ##### Conversions - [conversion.completed](https://docs.bachs.io/guides/webhooks/events/conversion-completed): Occurs when a currency conversion completes successfully. - [conversion.failed](https://docs.bachs.io/guides/webhooks/events/conversion-failed): Occurs when a currency conversion fails. ##### Customers - [customer.created](https://docs.bachs.io/guides/webhooks/events/customer-created): Occurs when a new customer is created. - [customer.updated](https://docs.bachs.io/guides/webhooks/events/customer-updated): Occurs when a customer's details change. ##### Connect (Sub accounts) - [account.updated](https://docs.bachs.io/guides/webhooks/events/account-updated): Occurs when an account's onboarding state or its access mode changes. - [account.tasks_requested](https://docs.bachs.io/guides/webhooks/events/account-tasks-requested): Occurs when an account gets new things to do, for example after you ask for a capability. - [capability.updated](https://docs.bachs.io/guides/webhooks/events/capability-updated): Occurs when a capability on an account changes status. - [transfer.created](https://docs.bachs.io/guides/webhooks/events/transfer-created): Occurs when a transfer is created between a platform and an account it owns. #### Endpoint API - [The webhook endpoint object](https://docs.bachs.io/api-reference/webhooks/object): A webhook endpoint is a URL Bachs delivers events to, together with the set of events it is subscribed to. Manage endpoints with an API key that has the webhooks scopes, or from your dashboard. - [POST /v1/webhooks/endpoints](https://docs.bachs.io/api-reference/webhooks/create-a-webhook-endpoint): Create a webhook endpoint - [GET /v1/webhooks/endpoints](https://docs.bachs.io/api-reference/webhooks/list-webhook-endpoints): List webhook endpoints - [GET /v1/webhooks/endpoints/{endpoint_id}](https://docs.bachs.io/api-reference/webhooks/retrieve-a-webhook-endpoint): Retrieve a webhook endpoint - [PATCH /v1/webhooks/endpoints/{endpoint_id}](https://docs.bachs.io/api-reference/webhooks/update-a-webhook-endpoint): Update a webhook endpoint - [DELETE /v1/webhooks/endpoints/{endpoint_id}](https://docs.bachs.io/api-reference/webhooks/delete-a-webhook-endpoint): Delete a webhook endpoint - [POST /v1/webhooks/endpoints/{endpoint_id}/rotate-secret](https://docs.bachs.io/api-reference/webhooks/rotate-an-endpoints-signing-secret): Rotate an endpoint's signing secret - [GET /v1/webhooks/endpoints/{endpoint_id}/metrics](https://docs.bachs.io/api-reference/webhooks/retrieve-endpoint-delivery-metrics): Retrieve endpoint delivery metrics - [GET /v1/webhooks/endpoints/{endpoint_id}/events](https://docs.bachs.io/api-reference/webhooks/list-events-for-an-endpoint): List events for an endpoint - [GET /v1/webhooks/endpoints/{endpoint_id}/events/{event_id}](https://docs.bachs.io/api-reference/webhooks/retrieve-an-endpoint-event): Retrieve an endpoint event - [POST /v1/webhooks/endpoints/{endpoint_id}/events/{event_id}/resend](https://docs.bachs.io/api-reference/webhooks/resend-an-event-to-an-endpoint): Resend an event to an endpoint - [GET /v1/webhooks/events](https://docs.bachs.io/api-reference/webhooks/list-webhook-events): List webhook events - [GET /v1/webhooks/events/{event_id}](https://docs.bachs.io/api-reference/webhooks/retrieve-a-webhook-event): Retrieve a webhook event - [POST /v1/webhooks/replay](https://docs.bachs.io/api-reference/webhooks/replay-webhook-event): Replay a webhook event ### SDKs - [Bachs SDKs](https://docs.bachs.io/sdks/overview): Official libraries and tools for building with Bachs: the Node.js and TypeScript and Python server SDKs, the browser checkout overlay, the CLI, and community SDKs for other languages. - [Node.js and TypeScript SDK](https://docs.bachs.io/sdks/node): Install @bachs/sdk, create a client, send requests, walk lists, handle errors and uncertain writes, and verify webhook signatures from a Node.js server. - [Python SDK](https://docs.bachs.io/sdks/python): Install bachs, create a sync or async client, send requests, walk lists, handle errors and uncertain writes, and verify webhook signatures from a Python server. - [SDK versioning and support](https://docs.bachs.io/sdks/versioning): How official Bachs SDKs are versioned, how SDK versions relate to the API version, and which runtimes are supported. ### CLI - [Install the Bachs CLI](https://docs.bachs.io/cli/overview): Drive your Bachs integration from the terminal. Pair your machine through the browser, forward live events to localhost, and call every API operation as a command. - [CLI command reference](https://docs.bachs.io/cli/commands): Every Bachs CLI command, flag, and argument. - [CLI roadmap](https://docs.bachs.io/cli/roadmap): What we are building next for the Bachs CLI, and what we are deliberately not building. ### Changelog - [Product updates](https://docs.bachs.io/changelog/product): New features and improvements to Bachs. - [API changelog](https://docs.bachs.io/changelog/api): Changes to the Bachs API: breaking changes, additions, and fixes. ## API reference ### General - [Introduction](https://docs.bachs.io/api-reference/overview): The Bachs API: your first request and where to go next. - [API Standards](https://docs.bachs.io/api-reference/api-standards): The conventions every Bachs API endpoint follows: authentication, request and response format, HTTP status codes, and query parameters. - [Permissions](https://docs.bachs.io/api-reference/permissions): Limit an API key's access to specific resources and actions in Bachs. - [Success responses](https://docs.bachs.io/api-reference/success-responses): The shape and status code of a successful Bachs API response, for single objects and lists. - [Error Reference](https://docs.bachs.io/api-reference/error-reference): Every error code the Bachs API returns, grouped by category, with the cause and how to resolve it. - [Errors](https://docs.bachs.io/errors): How the Bachs API reports errors: the error object, HTTP status codes, and how to handle them. - [Pagination](https://docs.bachs.io/guides/pagination): List endpoints return results in pages. Use the cursor to walk from one page to the next. - [Idempotency](https://docs.bachs.io/guides/idempotency): Use Idempotency-Key on public POST and PATCH requests, and recover uncertain writes without creating a new operation. ### Checkout Sessions - [The checkout session object](https://docs.bachs.io/api-reference/checkout-sessions/object): A checkout session ties one or more products to a customer, provided at creation or collected on the hosted page, and produces a hosted checkout URL. It tracks the customer through payment and, once paid, links to the payment it created. - [POST /v1/checkout-sessions](https://docs.bachs.io/api-reference/payments/create-checkout-session): Create a checkout session - [GET /v1/checkout-sessions/{checkout_id}](https://docs.bachs.io/api-reference/checkout-sessions/get-checkout-session): Retrieve a checkout session ### Connected Accounts - [POST /v1/accounts](https://docs.bachs.io/api-reference/accounts/create-an-account): Create an account - [GET /v1/accounts](https://docs.bachs.io/api-reference/organizations/list-connected-accounts): List accounts - [GET /v1/accounts/{account_id}](https://docs.bachs.io/api-reference/accounts/get-an-account): Get an account - [POST /v1/accounts/{account_id}](https://docs.bachs.io/api-reference/accounts/update-an-account): Update an account - [POST /v1/accounts/{account_id}/account-links](https://docs.bachs.io/api-reference/accounts/create-an-account-link): Create an account link - [POST /v1/accounts/{account_id}/login_links](https://docs.bachs.io/api-reference/accounts/create-a-login-link): Create a login link - [POST /v1/accounts/{account_id}/documents](https://docs.bachs.io/api-reference/connected-accounts/attach-a-company-document): Attach a company document - [GET /v1/accounts/{account_id}/capabilities](https://docs.bachs.io/api-reference/accounts/list-capabilities): List capabilities ### Products - [The product object](https://docs.bachs.io/api-reference/products/object): A product is an item you sell, with its pricing. Products are sold through checkout sessions and subscriptions. - [POST /v1/products](https://docs.bachs.io/api-reference/products/create-a-product): Create a product - [GET /v1/products/{product_id}](https://docs.bachs.io/api-reference/products/retrieve-a-product): Retrieve a product - [PATCH /v1/products/{product_id}](https://docs.bachs.io/api-reference/products/update-a-product): Update a product - [GET /v1/products](https://docs.bachs.io/api-reference/products/list-products): List products - [POST /v1/products/{product_id}/archive](https://docs.bachs.io/api-reference/products/archive-a-product): Archive a product - [POST /v1/products/{product_id}/unarchive](https://docs.bachs.io/api-reference/products/unarchive-a-product): Unarchive a product ### Subscriptions - [The subscription object](https://docs.bachs.io/api-reference/subscriptions/object): A subscription bills a customer for a recurring product on a fixed cadence. It is created when a customer completes a checkout for a recurring product, and it renews automatically until canceled. - [GET /v1/subscriptions](https://docs.bachs.io/api-reference/subscriptions/list-subscriptions): List subscriptions - [GET /v1/subscriptions/{subscription_id}](https://docs.bachs.io/api-reference/subscriptions/get-subscription): Retrieve a subscription - [PATCH /v1/subscriptions/{subscription_id}](https://docs.bachs.io/api-reference/subscriptions/update-subscription): Update a subscription - [DELETE /v1/subscriptions/{subscription_id}](https://docs.bachs.io/api-reference/subscriptions/cancel-subscription): Cancel a subscription ### Customers - [The customer object](https://docs.bachs.io/api-reference/customers/object): A customer groups a buyer's payments, subscriptions, and saved payment methods under one record. - [POST /v1/customers](https://docs.bachs.io/api-reference/customers/create-a-customer): Create a customer - [GET /v1/customers/{customer_id}](https://docs.bachs.io/api-reference/customers/retrieve-a-customer): Retrieve a customer - [PATCH /v1/customers/{customer_id}](https://docs.bachs.io/api-reference/customers/update-a-customer): Update a customer - [GET /v1/customers](https://docs.bachs.io/api-reference/customers/list-customers): List customers ### Customer sessions - [The customer session object](https://docs.bachs.io/api-reference/customer-sessions/object): A short-lived, pre-authenticated session that opens the customer portal as one specific customer. - [POST /v1/customers/{customer_id}/portal-sessions](https://docs.bachs.io/api-reference/customer-sessions/create-a-customer-portal-session): Create a customer portal session ### Payments - [The payment object](https://docs.bachs.io/api-reference/payments/object): A payment tracks a charge and its outcome, whether started by checkout, an off-session API call, or a virtual-account deposit. It carries the amount, status, fees, and refunds when supported. - [GET /v1/payments](https://docs.bachs.io/api-reference/payments/list-payments): List payments - [GET /v1/payments/{payment_id}](https://docs.bachs.io/api-reference/payments/get-payment): Retrieve a payment - [POST /v1/charges](https://docs.bachs.io/api-reference/payments/create-a-charge): Create a charge ### Refunds - [The refund object](https://docs.bachs.io/api-reference/refunds/object): A refund returns money to a customer for a payment you already collected. Refunds settle asynchronously and are reported through the refund.* webhook events. - [POST /v1/refunds](https://docs.bachs.io/api-reference/refunds/create-refund): Create a refund - [GET /v1/refunds](https://docs.bachs.io/api-reference/refunds/list-refunds): List refunds - [GET /v1/refunds/{refund_id}](https://docs.bachs.io/api-reference/refunds/get-refund): Retrieve a refund - [GET /v1/refunds/by-charge/{payment_id}](https://docs.bachs.io/api-reference/refunds/get-refund-by-charge): Retrieve a refund by charge ### Disputes - [GET /v1/disputes/{dispute_id}](https://docs.bachs.io/api-reference/disputes/get-dispute): Get Dispute - [GET /v1/disputes](https://docs.bachs.io/api-reference/disputes/list-disputes): List Disputes - [POST /v1/disputes/{dispute_id}/submit](https://docs.bachs.io/api-reference/disputes/submit-dispute): Submit Dispute - [PATCH /v1/disputes/{dispute_id}/evidence](https://docs.bachs.io/api-reference/disputes/update-dispute-evidence): Update Dispute Evidence - [POST /v1/disputes/uploads](https://docs.bachs.io/api-reference/disputes/upload-dispute-document): Upload Dispute Document ### Payouts - [The payout object](https://docs.bachs.io/api-reference/payouts/object): A payout moves money out of a balance to a bank account, mobile money wallet, or crypto wallet. Payouts settle asynchronously and are reported through the payout.paid and payout.failed webhook events. - [POST /v1/payouts](https://docs.bachs.io/api-reference/payouts/create-payout): Create Payout - [POST /v1/payouts/quotes](https://docs.bachs.io/api-reference/payouts/create-payout-quote): Create Payout Quote - [GET /v1/payouts/{withdrawal_id}](https://docs.bachs.io/api-reference/payouts/get-payout): Get Payout - [GET /v1/payouts](https://docs.bachs.io/api-reference/payouts/list-payouts): List Payouts ### Payout Destinations - [The payout destination object](https://docs.bachs.io/api-reference/payout-destinations/object): A saved bank account, mobile money wallet or crypto wallet belonging to the account holder. Payouts reference its ID; check is_usable before sending. Most destinations are approved at once; changing routing details checks it again. - [POST /v1/payouts/destinations](https://docs.bachs.io/api-reference/payouts/create-payout-destination): Create Payout Destination - [GET /v1/payouts/destinations](https://docs.bachs.io/api-reference/payouts/list-payout-destinations): List Payout Destinations - [GET /v1/payouts/destinations/{destination_id}](https://docs.bachs.io/api-reference/payouts/get-payout-destination): Get Payout Destination - [PATCH /v1/payouts/destinations/{destination_id}](https://docs.bachs.io/api-reference/payouts/update-payout-destination): Update Payout Destination - [DELETE /v1/payouts/destinations/{destination_id}](https://docs.bachs.io/api-reference/payouts/delete-payout-destination): Delete Payout Destination ### Balance - [The balance object](https://docs.bachs.io/api-reference/balance/object): A balance snapshot across every currency an account holds, separating what is spendable now from what is still settling. - [GET /v1/balances](https://docs.bachs.io/api-reference/accounts/get-balances): Retrieve balances - [GET /v1/balance_settings](https://docs.bachs.io/api-reference/payouts/get-payout-schedule): Get payout schedule - [POST /v1/balance_settings](https://docs.bachs.io/api-reference/payouts/update-payout-schedule): Update payout schedule ### Virtual accounts - [The virtual account object](https://docs.bachs.io/api-reference/virtual-accounts/object): A fixed bank account number belonging to your platform or a connected account. It does not expire, and each deposit becomes a payment on that account. - [POST /v1/virtual-accounts](https://docs.bachs.io/api-reference/virtual-accounts/create-a-virtual-account): Create a virtual account - [GET /v1/virtual-accounts](https://docs.bachs.io/api-reference/virtual-accounts/get-a-virtual-account): Get a virtual account ### Your account - [GET /v1/accounts/me](https://docs.bachs.io/api-reference/organizations/get-my-organization): Get your own account - [GET /v1/accounts/checkout/settings](https://docs.bachs.io/api-reference/organizations/get-checkout-settings): Get checkout settings - [PUT /v1/accounts/checkout/settings](https://docs.bachs.io/api-reference/organizations/update-checkout-settings): Update checkout settings ### Files - [POST /v1/files](https://docs.bachs.io/api-reference/files/upload-a-compliance-file): Upload a compliance file ### Media - [POST /v1/utilities/uploads](https://docs.bachs.io/api-reference/media/upload-a-file): Upload a file - [GET /v1/utilities/uploads/{upload_id}](https://docs.bachs.io/api-reference/media/retrieve-an-upload): Retrieve an upload - [DELETE /v1/utilities/uploads/{upload_id}](https://docs.bachs.io/api-reference/media/delete-an-upload): Delete an upload ### Misc - [GET /v1/payment-methods](https://docs.bachs.io/api-reference/payments/list-payment-methods): List payment methods - [GET /v1/payment-methods/rails](https://docs.bachs.io/api-reference/payments/list-payment-rails): List payment rails - [GET /v1/currencies/payout-supported](https://docs.bachs.io/api-reference/payments/list-payout-supported-currencies): List payout supported currencies - [GET /v1/currencies/supported](https://docs.bachs.io/api-reference/payments/list-supported-currencies): List supported currencies ### Transfers - [POST /v1/transfers](https://docs.bachs.io/api-reference/transfers/create-a-transfer): Create a transfer - [GET /v1/transfers](https://docs.bachs.io/api-reference/transfers/list-transfers): List transfers - [GET /v1/transfers/{transfer_id}](https://docs.bachs.io/api-reference/transfers/get-a-transfer): Get a transfer ### Persons - [GET /v1/accounts/{account_id}/persons](https://docs.bachs.io/api-reference/persons/list-persons): List persons - [POST /v1/accounts/{account_id}/persons](https://docs.bachs.io/api-reference/persons/add-a-person): Add a person - [GET /v1/accounts/{account_id}/persons/{person_id}](https://docs.bachs.io/api-reference/persons/read-a-person): Read a person - [POST /v1/accounts/{account_id}/persons/{person_id}](https://docs.bachs.io/api-reference/persons/update-a-person): Update a person - [POST /v1/accounts/{account_id}/persons/{person_id}/documents](https://docs.bachs.io/api-reference/persons/attach-a-document-to-a-person): Attach a document to a person - [DELETE /v1/accounts/{account_id}/persons/{person_id}](https://docs.bachs.io/api-reference/persons/remove-a-person): Remove a person ### Platform Fees - [GET /v1/platform_fees](https://docs.bachs.io/api-reference/platform-fees/list-platform-fees): List platform fees - [GET /v1/platform_fees/{fee_id}](https://docs.bachs.io/api-reference/platform-fees/get-a-platform-fee): Get a platform fee ### Reference - [GET /v1/reference/banks](https://docs.bachs.io/api-reference/reference/list-banks): List banks - [GET /v1/reference/momo](https://docs.bachs.io/api-reference/reference/list-mobile-money-providers): List mobile money providers - [GET /v1/reference/business-structures](https://docs.bachs.io/api-reference/reference/list-business-structures): List business structures - [GET /v1/reference/product-categories](https://docs.bachs.io/api-reference/reference/list-product-categories): List product categories - [POST /v1/misc/bank-accounts/resolve](https://docs.bachs.io/api-reference/misc/resolve-a-bank-account): Resolve a bank account