Skip to Content
API reference

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.

EnvironmentAPI base URLHosted checkout
Sandboxhttps://{your-domain}.api.sandbox.altruon.iohttps://{your-domain}.sandbox.altruon.io
Productionhttps://{your-domain}.api.altruon.iohttps://{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

MethodPathReference
POST/api/session/v1/createCreate a session
GET/api/v1/transaction/{transactionId}/detailsGet transaction details

Conventions

TopicConvention
TransportHTTPS. Request bodies are JSON, sent with Content-Type: application/json.
AuthenticationYour secret key in the x-secret-key header, from your server only. See Authentication.
SuccessA JSON body. Create a session returns 200 OK.
ErrorsA 4xx or 5xx status with an error object that has a code, a message and details. See Errors.
Field namesRequest bodies use camelCase (paymentData, billingPlatformId). The create session response uses snake_case (session_id, checkout_url). The transaction details response uses camelCase (idAtGateway).
CurrenciesThree-letter ISO 4217 codes, for example USD, EUR, BRL.
CountriesISO 3166-1 alpha-2 codes, for example BR, US.
TimestampsISO 8601 strings, for example 2026-06-21T12:15:00Z.
AmountsTransaction details returns amounts as strings in minor units ("12300"), with the display value in amountInMajorUnit ("123.00").
Session lifetimeA 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.

Your billing platform and your acquirers also send webhooks to Altruon. That is a separate setup: see The two webhook directions.

Start here