# Connect

How a platform creates accounts for its consumers, collects their consent on a hosted page, and splits each confirmed payment between the parties.

<ShortProductTruth>**Embed agent payments, split every payment.** Connect lets a marketplace open accounts for its consumers, get their signed consent without touching their keys, and pay each party its share after confirmation.</ShortProductTruth>


## The problem it removes [#the-problem-it-removes]

A platform that wants its users' agents to buy, or wants to share revenue with merchants, would otherwise have to hold users' money or keys and run its own payout books. Abazi Connect keeps the money with each consumer and the rules in each consumer's own signed mandate, and turns a revenue share into payouts that follow the payment automatically.

## Who uses it [#who-uses-it]

| Who | How |
| --- | --- |
| Platform operators | Create consumer accounts, send them to the hosted consent page, define split rules and read payouts. |
| Consumers | Create a passkey, sign a mandate pre-filled from the platform's template and grant a capped Solana spending permission. Then read their own spending. |
| Merchants | Receive their share of each split payment, recorded as a payout. |

## How it works [#how-it-works]

**Accounts and consent.**

1. The platform creates an account for a consumer and a consent session, which returns a link to a hosted consent page.
2. On that page the consumer creates a passkey, signs a mandate pre-filled from the platform's template, and approves a capped spending permission from their own Solana wallet.
3. The page redirects back to the platform with the new mandate's id. The platform never sees a key.

**Splits.**

1. The platform sets a split rule: recipients with shares that must add up to exactly 100 percent.
2. When a payment on a split service is confirmed, Abazi pays each share, records one payout per recipient and posts balanced ledger entries. Shares are computed in the smallest unit of the asset; the last recipient takes any rounding remainder.
3. One payout receipt covers the payouts of a split.

## Screens [#screens]

<Screenshot id="platform-accounts" />

<Screenshot id="platform-splits" />

<Screenshot id="merchant-payouts" />

## Boundaries [#boundaries]

| Case | What happens |
| --- | --- |
| Shares do not add up to 100 percent | The rule is refused. |
| The payment is not confirmed | No payout runs. Payouts run once per payment, after confirmation. |
| A card payment on a split service | It is not split. |
| A consumer pays on Solana before signing consent | Checkout asks for consent and returns a fresh consent link. |
| The consent link has expired | The page shows it as expired; the platform starts a new session. |
| The consumer's wallet is still empty | The purchase is denied with <ReasonCode code="NO_FUNDED_CHAIN" /> until it is funded. |

Custody follows the same model as everywhere else: on Solana the consumer's USDC stays in the consumer's own account. See [Custody and keys](/docs/concepts/custody-and-keys).

## API [#api]

The Connect operations in the API reference, each with its parameters, responses and code samples:

<ApiOperationList ids={['listConnectAccounts', 'createConnectAccount', 'setPlatformPayoutAddress', 'getConnectAccount', 'listConnectAccountPayments', 'createConsentSession', 'getConsumerSpending', 'listSplitRules']} />

## Next steps [#next-steps]

<Cards>
  <Card title="Split a payment" href="/docs/guides/split-a-payment" description="Set a split rule and follow one payment to its payouts." />
  <Card title="Ledger" href="/docs/products/ledger" description="See the balanced entries each payout posts." />
  <Card title="Commerce" href="/docs/products/commerce" description="Add hosted checkout and orders on top of a platform." />
</Cards>

