AventopayAventopay

REST API Reference

Exhaustive documentation of Aventopay REST endpoints: session creation, status, transactions, webhooks.

Production base URL: https://avento-pay.com/api. All requests use HTTPS and JSON.

Authentication

Three elements make up the authentication of an outgoing request to the Aventopay API:

  1. Header Authorization: Bearer <api_key> — identifies your account
  2. Header X-Aventopay-Signature — HMAC-SHA256 of the raw body, signed with api_secret
  3. Field merchant_id in the body — cross-checked with api_key

Endpoints

POST/payment/sessionCreate a payment session
GET/payment/session/:tokenRetrieve a session status
POST/payment/confirmConfirm a session (called by the payment page)

POST /payment/session

Creates a session and returns the payment URL + iframe.

FieldTypeRequiredDescription
merchant_idstringYour merchant identifier
user_idstringYour internal customer ID
amountintegerAmount in cents
currencystringoptionalISO 4217 currency, default EUR
transaction_idstringoptionalYour transaction ID (idempotency)
customerobjectoptional{email, name} — pre-fills the form
return_urlstringoptionalRedirect after payment
callback_urlstringoptionalWebhook endpoint for this session
metadataobjectoptionalFree fields returned in the webhook

Response 200

{
  "session_token": "sess_...",
  "payment_url": "https://avento-pay.com/pay/sess_...",
  "iframe_url": "https://avento-pay.com/iframe-host/index.html?session=sess_...",
  "expires_at": "2026-07-22T14:53:11Z",
  "signature": "<hmac of response body, signed with webhook_secret>"
}

GET /payment/session/:token

Returns the current status of a session.

{
  "session_token": "sess_...",
  "status": "success" | "pending" | "cancelled",
  "amount": 5000,
  "currency": "EUR",
  "provider_reference": "apy_ref_a1b2c3d4e5f6"
}

Rate limits

ResourceLimit
Session creation60 requests / minute / merchant
Session consultation600 requests / minute / merchant
IP anti-fraudDynamic limit — 429 return with retry_after_minutes

Error codes

All errors follow the {error, message} structure. Full details: error catalog.

Resources