## Start payment-provider onboarding

`client.paymentProviders.connect(stringprovider, PaymentProviderConnectParamsbody, RequestOptionsoptions?): PaymentProviderConnectResponse`

**post** `/v3/payments/providers/{provider}/connect`

Begins connecting your organization to a payment provider (e.g.
`agentcard`). Returns a hosted URL where an admin authorizes the
connection; on completion the provider redirects back and Linq stores
your connected credentials.

### Parameters

- `provider: string`

- `body: PaymentProviderConnectParams`

  - `return_url: string`

    Where to send the admin after they authorize the connection.

### Returns

- `PaymentProviderConnectResponse`

  - `hosted_url?: string`

    Send the admin here to authorize the connection.

  - `session_id?: string`

  - `status?: string`

### Example

```typescript
import LinqAPIV3 from '@linqapp/sdk';

const client = new LinqAPIV3({
  apiKey: process.env['LINQ_API_V3_API_KEY'], // This is the default and can be omitted
});

const response = await client.paymentProviders.connect('provider', {
  return_url: 'https://partner.example/settings/payments',
});

console.log(response.session_id);
```

#### Response

```json
{
  "hosted_url": "https://app.agentcard.sh/connect-platform/tok_abc",
  "session_id": "pcs_9f2a",
  "status": "pending"
}
```
