API reference
Base URLs, conventions and endpoints of the Altruon API, and the webhooks Altruon sends to your server.
Your server uses the Altruon API to create sessions and to read the result of a payment. Altruon reports changes back to your server with webhooks. Every call is authenticated with your secret key, so none of it runs in the browser.
Base URLs
Each environment has its own host. Replace {your-domain} with your Altruon domain, for example mycompany.
| Environment | API base URL | Hosted checkout |
|---|---|---|
| Sandbox | https://{your-domain}.api.sandbox.altruon.io | https://{your-domain}.sandbox.altruon.io |
| Production | https://{your-domain}.api.altruon.io | https://{your-domain}.altruon.io |
Hosted checkout pages live under the hosted checkout host: /checkout/p/{id} for hosted pages and /checkout/s/{sessionId} for dynamic hosted checkout.
Sandbox and production are separate environments. See Sandbox and environments.
Endpoints
| Method | Path | Reference |
|---|---|---|
POST | /api/session/v1/create | Create a session |
GET | /api/v1/transaction/{transactionId}/details | Get transaction details |
Create a session
Start a checkout for Altruon.js or dynamic hosted checkout.
Get transaction details
The transaction with its customer, invoice and subscription.
Conventions
| Topic | Convention |
|---|---|
| Transport | HTTPS. Request bodies are JSON, sent with Content-Type: application/json. |
| Authentication | Your secret key in the x-secret-key header, from your server only. See Authentication. |
| Success | A JSON body. Create a session returns 200 OK. |
| Errors | A 4xx or 5xx status with an error object that has a code, a message and details. See Errors. |
| Field names | Request bodies use camelCase (paymentData, billingPlatformId). The create session response uses snake_case (session_id, checkout_url). The transaction details response uses camelCase (idAtGateway). |
| Currencies | Three-letter ISO 4217 codes, for example USD, EUR, BRL. |
| Countries | ISO 3166-1 alpha-2 codes, for example BR, US. |
| Timestamps | ISO 8601 strings, for example 2026-06-21T12:15:00Z. |
| Amounts | Transaction details returns amounts as strings in minor units ("12300"), with the display value in amountInMajorUnit ("123.00"). |
| Session lifetime | A session is single use and expires 15 minutes after it is created. |
Webhooks
The API is for the calls you make. Webhooks are the calls Altruon makes to you: a signed HTTPS POST to your endpoint when a subscription, invoice, payment, refund, customer or session changes. Payloads are thin, so treat an event as a trigger and fetch the current state through the API.
Webhooks
Set up an endpoint, the event payload, delivery and retries.
Event types
Every event and when it fires.
Verify signatures
Check the Altruon-Signature header.
Your billing platform and your acquirers also send webhooks to Altruon. That is a separate setup: see The two webhook directions.