# Partners: onboarding businesses

Software platforms and resellers onboard the businesses they serve through PayLynks with a white-label signup, then act for each one through the API.

## Partner keys

A PayLynks admin sets you up as a partner. In the dashboard, switch to your partner and open **Partner** to create a partner test key (`sk_test_…`). It can:

- create and list merchants (`/api/v1/merchants`)
- act for any of your merchants on every other endpoint by adding `PayLynks-Merchant: mer_…`

## Onboard a business

```bash
curl -X POST https://paylynks.io/api/v1/merchants -H "Authorization: Bearer $PARTNER_SECRET_KEY" \
  -H "Content-Type: application/json" -d '{
    "legal_name": "Lakeside Dental LLC",
    "owner_email": "owner@lakesidedental.example",
    "state": "MO",
    "return_url": "https://yourapp.example/payments/connected"
  }'
```

The response includes `onboarding_url` (valid 7 days). Send it to the owner, or redirect them. Your logo and brand color are shown. The owner enters:

1. Business details: legal name, DBA, type, industry, address, phone, expected volume
2. Owner details
3. Processing: **PayLynks processing**, or **their own Stripe account** (keys are checked with Stripe and stored encrypted)

When they finish, the merchant is active in test mode, the owner is invited to the dashboard, and they're sent back to your `return_url` with `?merchant=mer_…`. You get a `merchant.onboarding_completed` event. Live activation follows underwriting by our processing partner; payout bank accounts are collected there, never by PayLynks.

Other calls:

- `GET /api/v1/merchants` and `GET /api/v1/merchants/:id`: `onboarding_status` is `pending` until the owner finishes, then `active`.
- `POST /api/v1/merchants/:id/onboarding_links`: a fresh link if the old one expired.

## Partner dashboard

**Dashboard → Partner** lists your merchants with onboarding status and 30-day volume, an estimate of your revenue share, a form to create onboarding links, and partner keys.
