accounts

Create a sign-in window session

Changed on

Issue a short-lived URL for the HEVN sign-in window. Open it in a popup from your page: link lets the account holder connect their account and returns a code for POST /clients/link, sign lets the holder of a connected account approve one payout that waits for their signature. The result comes back on redirectUri with state.

post/connect/sessions

Request

Headers

X-Hevn-Accountstring nullable

The client account to act for, as a cl_… id. Omit it to act as yourself.

Example:cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41

Request body

action'link' | 'sign' | 'verify' required
payoutIdstring nullable

The payout the account holder approves. Required for sign, not accepted for link.

clientIdstring nullable

The connected individual client whose holder verifies their identity. Required for verify, not accepted otherwise. The holder must sign in to this account in the window.

redirectUristring required

Page the sign-in window returns to with the result and state. Its origin must be one of the allowed origins in the sign-in window settings.

Example request

{
  "payoutId": "po_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
  "clientId": "cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
}

Response

Successful Response

urlstring required

Open this URL in the sign-in window. It works once per result and expires.

statestring required

Comes back as state on the redirect URI; match it before trusting the result.

expiresAtstring date-time required

When the session URL stops working.

Changes

    • warning

      added the new verification_not_applicable enum value to the / response property for the response status

    • info

      added the new optional request property

    • info

      added the new verify enum value to the request property

    • info

      removed the phone_required enum value from the / response property for the response status

    • info

      removed the rail_requirements_unmet enum value from the / response property for the response status

    • info

      endpoint added