Account links

Create account link

Changed on

Generates a URL that sends a sub-merchant to a hosted Whop page, such as the payouts dashboard or the KYC onboarding flow. Requires an API key.

post/account_links

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Request body

object required

Parameters for CreateAccountLink

account_id, string 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_url, string 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_url, string 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 purpose of the account link, such as hosted payouts portal or hosted KYC onboarding.

Example request

{
  "account_id": "biz_xxxxxxxxxxxxxx"
}

Response

A successful response

AccountLink required

A temporary, time-limited URL that grants a user access to an external account management page.

expires_at, string date-time required

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

url, string 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/verify-identity/biz_xxxxxxxxx/"
}

Changes