Create payee session token (deprecated)
Deprecated. Use POST /api/session-tokens/party instead.
Kept for backward compatibility with payee-only integrations that rely on
granular scopes. Authenticate with an API key (x-api-key). The returned JWT
is used on payee payment-method endpoints as Authorization: Bearer <token>.
The process:
- API token authenticates the request
- Payee ID is provided in the request
- System validates the payee ID belongs to the API token’s root entity
- A session token is created containing the payee’s ID, root entity ID, and manage payment methods scopes
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.
payee_id
UUID of the payee to create a token for. This will be used as the user identifier in the token. Prefer party_id on POST /api/session-tokens/party.
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