Create party session token
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:
- API token authenticates the request
- Party ID and party type are provided in the request
- System validates the party exists and belongs to the API token’s root entity
- 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_id
UUID of the party (payee or payer) to create a token for. This will be used as the user identifier in the token.
party_type
Type of party - either ‘payee’ or ‘payer’
Allowed values:
Response
Successful Response
token
JWT to send as Authorization: Bearer <token> on payment-method requests for this party. Do not use as an API key.
expires_in_seconds
Number of seconds until this token expires
scopes
Permission scopes granted to this token