# Onboarding via SimPay Panel

This onboarding method applies to Flow services with the `role_non_financial_provider` role - marketplace platforms and products that do not intermediate in the transfer of funds.

The submerchant goes through full onboarding in the SimPay Panel:

- verification of billing data (company or unregistered business data),
- ultimate beneficial owner (UBO) data,
- identity verification - document scan or mObywatel authorization,
- verification transfer.


You don't process any of this data - the entire process takes place at SimPay.

## How does it work?

1. You register the submerchant ([`POST /flow/{flowServiceId}/submerchants`](/apis/flow/flowcreatesubmerchant)) and receive `onboarding.action` = `redirect_user` and `onboarding.redirectUrl`.
2. You redirect the submerchant to `redirectUrl`.
3. The submerchant fills in the data and goes through verification in the SimPay Panel.
4. Once the data is submitted, the submerchant status changes to `flow_submerchant_in_verification`, and after SimPay approval - to `flow_submerchant_active`. We notify you about each change with the `flow_submerchant:status_changed` [webhook](/en/simpay-flow/webhooks).


## Link validity

The link is valid for 15 minutes
`redirectUrl` is valid for **15 minutes** after it is generated. Don't send it by email or store it - generate it at the moment you redirect the user.

If the link has expired or the submerchant interrupted onboarding, generate a new one with the [`POST /flow/{flowServiceId}/submerchants/{submerchantId}/onboardings`](/apis/flow/flowsubmerchantonboarding) request:


```bash
curl -X POST "https://api.simpay.pl/flow/{flowServiceId}/submerchants/user-123/onboardings" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
```


```json
{
  "success": true,
  "data": {
    "action": "redirect_user",
    "redirectUrl": "https://panel.simpay.pl/..."
  }
}
```

Submerchant onboarding is valid for **60 days** after registration.

For a submerchant that is already active, the endpoint returns the `SUBMERCHANT_ALREADY_ACTIVE` error.

## Recommended flow in your application

1. The user in your application clicks e.g. "Enable online payments".
2. If they are not a submerchant yet - you register them and immediately redirect them to `redirectUrl`.
3. If they are already registered but not active - you generate a new link (`POST .../onboardings`) and redirect them.
4. Until you receive a webhook with the `flow_submerchant_active` status, you show the user that verification is in progress.