Skip to navigation

Create party session token

View as Markdown

Generate a session token for either payee or payer (party-based approach).

Recommended for new integrations. Supports both payees and payers with a simplified scope (payee_manage or payer_manage).

Authenticate this endpoint with an API key (x-api-key). Use the returned JWT on that party’s payment-method endpoints as Authorization: Bearer <token>.

The process:

  1. API token authenticates the request
  2. Party ID and party type are provided in the request
  3. System validates the party exists and belongs to the API token’s root entity
  4. A session token is created with appropriate scopes based on party type

Authentication

x-api-keystring

RootPay API key sent in the x-api-key header. Keys are environment-scoped: live_* for production, test_* for sandbox.

Request

This endpoint expects an object.
party_idstringRequiredformat: "uuid"

UUID of the party (payee or payer) to create a token for. This will be used as the user identifier in the token.

party_typeenumRequired

Type of party - either ‘payee’ or ‘payer’

Allowed values:

Response

Successful Response
tokenstring

JWT to send as Authorization: Bearer <token> on payment-method requests for this party. Do not use as an API key.

expires_in_secondsinteger
Number of seconds until this token expires
scopeslist of strings
Permission scopes granted to this token