Overview
Parchment uses a multi-layered authentication approach for partners:- Partner Registration - Partners are registered in our system with a unique Partner ID.
- Organization Registration - Each partner can have multiple organizations, each with their own credentials.
- Token Generation - Partners can generate JWT tokens for authenticated API requests.
- Request Authentication - All API requests must include appropriate authentication headers.
Partner Registration
Partners must be registered in the Parchment system before they can access the API. This is typically done by the Parchment team. Once registered, partners receive:- A unique
x-partner-id - A
x-partner-secretfor authentication
Organization Registration
Once a new organization is created, the partner will receive ax-organization-id and x-organization-secret for authentication. This secret is used to generate a JWT token for authenticated API requests.
Token Generation
Partners must generate a JWT token for authenticated API requests. Tokens have the following characteristics:- Valid for 6 hours — read
expires_inin the token response for the exact lifetime - Include specific scopes that determine permissions
- Are signed using RS256 algorithm
- Used as Bearer token in the Authorization header
- eg.
Authorization: Bearer <token>
- eg.
Cache your access token. Tokens are valid for 6 hours. Request one, hold it in memory, and reuse it for every call until it expires. Request a new token only on expiry or on a
401.Do not request a token per API call. That doubles your request volume, adds a round trip to every call, and is the most common integration mistake we see.Security Considerations
- Tokens have a limited lifetime of 6 hours
- Use HTTPS for all API requests
- Implement proper error handling for authentication failures

