Authentication
Send your API key as a Bearer token in the Authorization header.
API Keys
Keys use the pk_ prefix, and a key acts only for the account that created it.
Create a key in the Dashboard under Integration > API keys. When you create it, you can limit it to IP addresses or CIDR ranges and give it an expiry.
Authorization: Bearer pk_your_api_keyKeep your keys secret
API keys are for server-to-server integration. Never expose them in client-side code, mobile apps, or public repositories.
A 401 means the key is missing, revoked or expired, or the request came from an address that is not in the key's
Allowed IPs.
Example Request
curl https://api.pymstr.com/v1/payments/01234567-89ab-cdef-0123-456789abcdef \
-H "Authorization: Bearer pk_your_api_key"Rate Limits
A request made with a valid API key that is within the limit carries three headers on its response, whatever that response is:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the window |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Seconds until the current window resets |
A request over the limit gets 429 with { "status": 429, "code": "too_many_requests" } and a Retry-After header,
the seconds until you can send again, and none of the three headers above.