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

# Create Onboarding

> Start or refresh provider onboarding for a payout account.

Creates an onboarding session with the payout provider — for Stripe Connect, the returned `data` contains the hosted onboarding link.

## Path parameters

<ParamField path="id" type="string" required>
  The payout account's ID.
</ParamField>

## Body parameters

<ParamField body="data" type="object">
  Provider-specific data forwarded when creating the onboarding.
</ParamField>

<ParamField body="context" type="object">
  Provider-specific context (e.g. `refresh_url` and `return_url` for Stripe Connect).
</ParamField>

## Response

<ResponseField name="onboarding" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">The onboarding's ID.</ResponseField>
    <ResponseField name="data" type="object">Provider-specific onboarding data, such as the hosted onboarding URL.</ResponseField>
    <ResponseField name="context" type="object">The context used to create the onboarding.</ResponseField>
    <ResponseField name="created_at" type="string">Creation timestamp.</ResponseField>
    <ResponseField name="updated_at" type="string">Update timestamp.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'http://localhost:9000/vendor/payout-accounts/pacc_01HXYZ/onboarding' \
    -H 'Authorization: Bearer <token>' \
    -H 'x-seller-id: <seller_id>' \
    -H 'Content-Type: application/json' \
    -d '{"context": {"refresh_url": "https://vendor.example.com/payouts", "return_url": "https://vendor.example.com/payouts"}}'
  ```

  ```ts JS Client theme={null}
  const { onboarding } = await client.vendor.payoutAccounts.$id.onboarding.mutate({
    $id: "pacc_01HXYZ",
    context: {
      refresh_url: "https://vendor.example.com/payouts",
      return_url: "https://vendor.example.com/payouts",
    },
  })
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "onboarding": {
      "id": "onb_01HXYZ",
      "data": { "url": "https://connect.stripe.com/setup/s/..." },
      "context": { "return_url": "https://vendor.example.com/payouts" },
      "created_at": "2026-01-15T10:00:00.000Z"
    }
  }
  ```
</ResponseExample>
