# Submerchant widget

Submerchants don't log in to the SimPay Partner Panel. If you want to give a submerchant access to features you don't build in your application, you can generate a link to the **widget** - a lightweight SimPay panel for that submerchant.

## Generating a link


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


```json
{
  "success": true,
  "data": {
    "url": "https://panel.simpay.pl/widget/flow/init/flow_aaaabbbb/flsm_aaaabbbb?token=..."
  }
}
```

Specification: [`POST .../submerchants/{submerchantId}/widgets`](/apis/flow/flowsubmerchantwidget).

The link is valid for 5 minutes
The link expires after **5 minutes**. Generate it when the submerchant wants to open the widget - e.g. after clicking a button in your application - and redirect them immediately.

The endpoint is limited to **5 requests per minute**.