v8

latestOpenAPI 3.1.02026-08-033623795.0 MB
Account links

Create account link

Generate a URL that directs a sub-merchant to their account portal, such as the hosted payouts dashboard or the KYC onboarding flow.

post/account_links

Request body

company_idstring required

The unique identifier of the company to generate the link for, starting with 'biz_'. Must be a sub-merchant of the API key's company.

refresh_urlstring required

The URL to redirect the user to if the session expires and needs to be re-authenticated, such as 'https://example.com/refresh'.

return_urlstring required

The URL to redirect the user to when they want to return to your site, such as 'https://example.com/return'.

use_case'account_onboarding' | 'payouts_portal' required

The different use cases for generating an account link.

Example request

{
  "company_id": "biz_xxxxxxxxxxxxxx"
}

Response

A successful response

expires_atstring date-time required

The timestamp after which this account link URL is no longer valid.

urlstring required

The temporary URL to redirect the user to for account access. Expires at the time specified by expires_at.

Example response

{
  "expires_at": "2023-12-01T05:00:00.401Z",
  "url": "https://whop.com/payouts/biz_xxxxxxxxx/verify"
}