How it fits together
The sale belongs to the business, so the money lands in its balance. Your fee comes out of its proceeds and settles to you as its own record.What you’ll use
Before you start
- A sandbox API key (
sk_sandbox_...). See Authentication. - The
connectcapabilityactiveon your account. See Become a platform.
https://sandbox-api.bachs.io. Going live is the same calls against https://api.bachs.io with an sk_live_ key. See Take Connect live.
Steps
1
Create the account, as a merchant
This account takes its own payments and gets paid out, so it needs both personas. Name Copy the
merchant and recipient as keys in configuration, and name each capability it needs under the persona it belongs to.id. Every step below uses it as the account id.The response lists exactly the five capabilities named above, one status per capability. In sandbox they are granted immediately; in live they start pending_review until a reviewer enables them. See Capabilities and Testing Connect.2
Let it hold the currency it sells in
Holding a currency decides what the account settles in. A new account holds only USD. This walkthrough sells a subscription in NGN, so give the account NGN: its takings then stay in NGN instead of converting to USD on the way to the balance. Today holding the price currency is also required to create a recurring checkout at all (an unheld one is refused with USD is always held, cannot be turned off, and does not appear in the list. See Accounts for the field, and Balance currencies for what you can ask for.
BASE_CURRENCY_NOT_HELD_BY_ORG until renewals settle to USD like one-time charges do), so an account selling an NGN plan has to hold NGN first either way. Not every currency Bachs collects in can be held as a balance, so check Balance currencies before you build against one.3
Create the product as the account
The account is selling, so the product is the account’s. Copy the product
X-Account-Id is what makes a call act as the account rather than as you.id. Note organization_id: the product belongs to the account.4
Create the checkout as the account
X-Account-Id, on its own, is what makes this a direct charge: the account becomes the merchant of record and the sale lands in its balance. platform_fee is your cut, taken out of its proceeds.checkout_id and checkout_url.5
Send the customer to pay
In your integration the account’s customer pays on the page we host at
checkout_url. To finish this guide, open the link and complete the payment there.This account is in sandbox, so the payment is simulated, no funds move. See Test payment outcomes.6
Confirm the payment landed
Read the checkout back until In your integration you would not poll for this. Subscribe to checkout.completed instead. A direct charge’s event originates with the account, so your webhook endpoint needs
status is completed. Note the X-Account-Id: this is the account’s checkout.event_source set to connect or all to receive it. See Connect events.7
Read your cut back
Your fee is not a transfer: it settles as its own record once the charge settles, never sooner. Read it from
GET /v1/platform_fees:collected_from is the account and earned_by is you, because the sale was theirs and the fee is yours. charge ties it back to the sale.8
Read the account's balance
The account bears our processing fee because it is the merchant of record. That is the default, and Processing fees covers moving it. Your
10000.00 arrives whole.How this differs from a marketplace
The same two calls, with the parties swapped.
If you are still choosing, see Choose your integration.
What happens next
The account can withdraw its balance once it has given you a payout destination, which is one of the requirements it still owes. Read what is outstanding fromrequirements.currently_due on the account.
A refund or a lost dispute debits the account here, not you. That is the point of this shape, and the reason its onboarding is longer than a marketplace seller’s. See Refunds and Disputes.
Webhooks to handle
Create your endpoint withevent_source set to connect or all, or it receives nothing from your accounts. An event from an account carries a top-level account field naming it.
Your platform fee has no event of its own. Read it from
/v1/platform_fees after the charge settles.
Edge cases
The business cannot take payments yet
The business cannot take payments yet
A checkout as the account needs its payment capabilities
active. In production, capabilities start restricted until a reviewer enables them, and a business that accepts payments owes more requirements than a marketplace seller. Wait for capability.updated. See Requirements.A customer asks the business for a refund
A customer asks the business for a refund
The sale is the business’s, so a refund debits the account’s balance, not yours. See Refunds on Connect.
A customer disputes a payment
A customer disputes a payment
The account is liable. If it loses and its balance cannot cover the dispute, its balance goes negative and recovers from its future sales. See Disputes on Connect.
Who pays the processing fee
Who pays the processing fee
By default the account bears Bachs’s processing fee, because the sale is its own, and your platform fee arrives whole. See Processing fees to change this.
The business sells a subscription in a currency it does not hold
The business sells a subscription in a currency it does not hold
A recurring checkout needs the account to hold the price currency, as in the second step above. See Balance currencies.
Go-live checklist
- Your platform has completed registered-business compliance and
connectisactivein production. See Take Connect live. - Your production keys have only the scopes you use, such as
connected_accounts:writeandpayouts:write. - Your production webhook endpoint has
event_sourceset toconnectorall, and its signing secret is checked against a live delivery. - Businesses can sell only after their payment capabilities are
activein production. - Every request that acts for a business sends its
X-Account-Id, and every write sends anIdempotency-Key. - Businesses know that refunds and lost disputes debit their own balance.
Build it with an AI assistant
The Bachs skill covers Connect. Ask your assistant to build “a platform where each business sells as its own Bachs account, with a platform fee”, and point it at this page:https://docs.bachs.io/build/use-cases/saas-platform.md.

