Take payments from your own site.
Create a checkout session from your server, send the customer to it, and receive a signed webhook when they have paid. Plain HTTPS and JSON, no SDK required.
POST /api/v1/checkout_sessions
curl https://axivopayments.com/api/v1/checkout_sessions \
-H "Authorization: Bearer $AXIVO_SECRET_KEY" \
-H "Idempotency-Key: order_8841" \
-H "Content-Type: application/json" \
-d '{"amount": 2500, "currency": "eur", "description": "Theme pack",
"success_url": "https://shop.example/thanks?session={CHECKOUT_SESSION_ID}"}'200 OK
{
"id": "chk_4f7q…",
"object": "checkout_session",
"livemode": true,
"status": "open",
"url": "https://axivopayments.com/pay/lnk_…",
"amount": 2500,
"currency": "eur",
"description": "Theme pack",
"payment": null,
"expires_at": 1792368000
}Each webhook carries an Axivo-Signature header: a timestamp and an HMAC-SHA256 of the timestamp and raw body, made with your endpoint’s secret. Full API reference
One secret key
Kept on your server, revoked in one click. Every use is in your audit log.
Safe to retry
An Idempotency-Key on each write means a dropped connection never creates a second checkout.
Signed webhooks
Every event is signed, retried with backoff and listed in your dashboard, with a test event button.
Let your AI assistant build it
Copy a prompt into Claude, ChatGPT or the assistant you use. It explains Axivo precisely, and never asks for your keys in the chat.
You are helping me accept payments on my website with Axivo Payments (https://axivopayments.com). Customers pay on a hosted checkout page and I get a signed webhook when they have paid. Integrate it into this codebase.
Rules you must follow:
- Never ask me to paste an API key, password or two-factor code into this chat, and never write one into source code, a repository or a browser bundle. Read keys from environment variables on the server.
- Do not guess. If something here does not match what you see, stop and tell me.
- Do not make payments yourself. Axivo has no test mode: I will try the finished integration with a small real payment and refund it from my dashboard.
How the Axivo API works:
- Base URL: https://axivopayments.com/api/v1. JSON over HTTPS. Authenticate with the header "Authorization: Bearer <secret key>". Keys start with axv_live_ and take real payments. Store the key in an environment variable named AXIVO_SECRET_KEY.
- Create a checkout: POST https://axivopayments.com/api/v1/checkout_sessions with body {"amount": <integer in the smallest currency unit, e.g. 2500 for 25.00>, "currency": one of cad, usd, eur, gbp, chf, pln, sek, dkk, nok, "description": <2-120 characters>, "success_url": <https URL; may contain {CHECKOUT_SESSION_ID}>, optional "cancel_url", "customer_email", "client_reference_id" (your order ID, up to 200 characters), "metadata" (up to 20 string keys), "expires_in" (seconds until an unpaid checkout ends, 1800 to 86400)}. Send an "Idempotency-Key" header set to my order ID so a retry never creates a second checkout. The response (HTTP 200) is a checkout_session object: {"id": "chk_...", "status": "open" | "complete" | "expired", "url": <send the customer here>, "amount", "currency", "payment": null until paid, "expires_at": unix seconds, ...}. API checkouts expire after 24 hours unless expires_in is shorter; when one ends unpaid, a checkout.expired event is sent so I can remind the customer myself (Axivo never emails my customers).
- Look up a checkout: GET https://axivopayments.com/api/v1/checkout_sessions/{id}. List payments: GET https://axivopayments.com/api/v1/payments?limit=20&starting_after={id} returns {"object": "list", "data": [...], "has_more": bool}. One payment: GET https://axivopayments.com/api/v1/payments/{id}. Refund: POST https://axivopayments.com/api/v1/refunds with {"payment": "<payment id>", "amount": <optional, smallest unit>} (live payments only).
- Errors are {"error": {"code", "message", "requestId", "fields"?}} with a 4xx or 5xx status. Rate limit: 600 requests per minute per key (HTTP 429 when exceeded).
- Webhooks: I add an endpoint URL in the Axivo dashboard (Integrations → Your website → Webhooks) and copy its signing secret into an environment variable named AXIVO_WEBHOOK_SECRET. Events: checkout.completed, checkout.expired, payment.succeeded, payment.failed, payment.refunded, payment.disputed. Each POST has a JSON body {"id": "evt_...", "type", "created", "livemode", "data": {"object": {...}}} and a header "Axivo-Signature: t=<unix seconds>,v1=<hex>". Verify it before trusting the event: compute HMAC-SHA256 of the string "<t>.<raw request body>" with the secret, compare it to v1 in constant time, and reject events where t is more than 300 seconds from now. Use the raw body bytes, not re-serialised JSON. Answer 2xx quickly; Axivo retries failed deliveries with increasing waits, so handle the same event id more than once safely.
What to build:
1. A server-side route that creates a checkout session for an order and redirects the customer to its url. Never call the API from the browser.
2. A webhook route that verifies the signature, and on checkout.completed marks the order paid and delivers it (use client_reference_id or metadata to find the order), exactly once per event id.
3. A success page that shows "payment received, processing" until the webhook has marked the order paid: returning to success_url alone is not proof of payment.
4. Read AXIVO_SECRET_KEY and AXIVO_WEBHOOK_SECRET from the environment, and tell me where to set them.
When you are done, list the files you changed, how I can try it with one small real payment that I refund afterwards, and what I need to configure in the Axivo dashboard.