> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sweepr.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Partner Onboarding

> How Sweepr approves partners, creates API keys, configures payout wallets, and prepares production access.

# Partner Onboarding

Sweepr partner access is API-key based. In the first release, Sweepr creates and issues API keys directly; partners do not self-generate keys.

## Onboarding Flow

1. Sweepr creates a partner profile.
2. Sweepr configures the partner payout wallet and fee share.
3. Sweepr issues one or more API keys.
4. Partner installs the SDK or calls the REST API directly.
5. Partner builds sweeps using their API key.
6. Partner submits the V5 transaction hash back to Sweepr after the user sends the transaction.
7. Sweepr resolves partner identity from the API key, never from client-submitted partner fields.
8. Sweepr confirms the actual on-chain split from the V5 event before marking the sweep complete.

## Required Partner Information

Partners should provide:

* Partner name
* Contact email
* Production website or app origin
* EVM payout wallet
* Solana payout wallet, if using V1 Solana
* Expected launch chains
* Expected request volume

## API Key Types

Use `pk_live` keys for browser or public app integrations where the key may be visible to users. Public keys should have allowed origins configured.

Use `sk_live` keys for server-side integrations. Secret keys should never be shipped to browsers, mobile bundles, or public repositories.

## Fee Share

The partner fee share is configured by Sweepr. In V2, the backend signs the configured share into a short-lived on-chain fee authorization.

Partner share is a percentage of the Sweepr platform fee, not a percentage of the full sweep output.

Example:

```txt theme={"dark"}
grossOutput = 1000 USDC
platformFeeBps = 75           // 0.75%
partnerShareBps = 5000        // 50% of platform fee

totalFee = 7.5 USDC
partnerFee = 3.75 USDC
protocolFee = 3.75 USDC
userAmount = 992.5 USDC
```

The first V2 launch configuration uses:

```txt theme={"dark"}
totalFeeBps = 75              // 0.75% platform fee
MAX_FEE_BPS = 500             // 5% hard contract cap
```

The fee share can be different per partner because it is resolved from the partner profile at build time and signed by Sweepr. Partners cannot override their payout wallet or fee share in the request body.

## Access Rules

Partner API keys are scoped to the partner profile that owns them.

* Build requests resolve partner identity from `x-api-key`.
* Status and confirm requests can only access sweeps owned by the same partner.
* Public browser keys should use allowed origins.
* Server-side keys should stay on partner backend infrastructure.
* Lost keys cannot be recovered because Sweepr stores only hashed keys.

## Environments

Recommended environments:

* Sandbox: test keys, test deploys, relaxed quotas.
* Production: live keys, production domains, production payout wallets.

Partners should use different API keys per environment.

## Production Readiness

Before a partner goes live on V2, Sweepr should confirm:

* Partner payout wallet is correct.
* Partner fee share is approved.
* API key type and allowed origins are correct.
* Partner app verifies fee authorization before requesting a Permit2 signature.
* Partner app calls confirm with the submitted transaction hash.
* Partner app handles `pending`, `completed`, and `failed` status responses.
