FOR DEVELOPERS

BUILT FOR ENGINEERS.

One integration. Clear primitives. Complete visibility. A developer experience designed around the actual lifecycle of a payment.

HOW IT WORKS

PREDICTABLE BY DESIGN.

01 / API

Resource-oriented, versioned, JSON.

Payments, refunds, routes and events are resources with stable identifiers. Amounts are integers in minor units; currencies are ISO 4217.

REQUESTILLUSTRATIVE
curl https://api.aegisrails.com/v1/payments \
  -H "Authorization: Bearer sk_test_…" \
  -H "Idempotency-Key: ord_10482" \
  -d amount=12500 -d currency=USD
02 / IDEMPOTENCY

Retry safely.

Send an Idempotency-Key on every write. A repeated request with the same key returns the original result instead of creating a second payment — essential when a network call times out.

REPEATED REQUESTILLUSTRATIVE
req 1Idempotency-Key: ord_10482 → 201 createdOK
req 2Idempotency-Key: ord_10482 → 200 replayedOK
resultone payment: pay_ag_8J29L
03 / WEBHOOKS & EVENTS

State changes arrive as signed events.

Events are delivered to your endpoint with a signature header and retried with backoff until acknowledged. Verify the signature before acting on the payload.

EVENT TYPESILLUSTRATIVE
EVENTWHEN
payment.succeededauthorised and captured
payment.failedfinal decline returned
payment.requires_action3DS challenge needed
refund.succeededrefund confirmed
route.degradedroute health changed
04 / ERRORS

Errors you can branch on.

Every error carries a stable type and code, a human message, and a request ID for support. Declines are not HTTP errors — they are payment outcomes.

402 / ERRORILLUSTRATIVE
{
  "error": {
    "type": "payment_error",
    "code": "insufficient_funds",
    "decline": { "issuer_code": "51" },
    "request_id": "req_ag_91kd2"
  }
}
05 / SANDBOX

Test before you touch a live rail.

A sandbox environment with test keys and simulated issuer responses is planned. Test card numbers will trigger specific outcomes — approvals, declines, 3DS challenges, timeouts.

SANDBOX — COMING SOON
SANDBOX / PLANNEDCOMING SOON
TEST CARDSIMULATES
4000 …0002issuer decline 05
4000 …32203DS challenge
4000 …0119processor timeout
NEXT STEP

BUILD THE RIGHT
PAYMENT PATH.

Let's discuss the infrastructure your business needs.

Talk to Aegis Rails