API reference
Every endpoint of the Paytrim API, with its fields, examples and responses.
The Paytrim API is a REST API with JSON requests and responses. The documentation explains how to combine the endpoints into a working integration; this reference describes each endpoint in detail.
Base URLs
| URL | Use it for |
|---|
The API is only available over HTTPS with TLS 1.2 or newer.
Authentication
Authenticate every request with HTTP Basic authentication. Your project's API key is the username, and the password is empty:
curl https://api.pay.paytrim.com/v1/orders/$ORDER_ID/ \
--user "$API_KEY:"Keep your API key secret
The API key gives full access to your project. Only use it from your server. Never put it in a browser, mobile app or public repository.
Responses and errors
A 2xx response means Paytrim accepted your request, not that the payment succeeded: check the status of the order. Rejected requests return an error object with the HTTP status, a type and a short explanation in value.
See API basics for all status codes and error types.