API reference
Base URL https://api.apxrails.com. Authenticate with Authorization: Bearer apx_sk_…. All amounts are strings of integer base units. Errors arrive as { error: { type, code, message, param, doc_url, request_log_url, request_id } }. Generated from the committed OpenAPI spec.
Checkout
/v1/checkout/sessionsCreate a checkout session
Headers Idempotency-Key
Body
| amount * | string | Amount in base units of currency, as a string. |
| currency * | string | |
| country | string | Buyer country, ISO 3166-1 alpha-2. Drives compliance rules. |
| locale | string | Checkout display locale (BCP-47, e.g. "no", "sv-SE"). Falls back to Accept-Language, then English. |
| line_items | object[] | |
| success_url | string | |
| cancel_url | string | |
| metadata | object |
/v1/checkout/sessions/{id}Retrieve a checkout session
/v1/checkout/sessions/{id}/summaryPublic session summary (hosted checkout)
/v1/checkout/sessions/{id}/confirmConfirm a checkout session (test flows)
Body
| token | string | Session token — required for unauthenticated (embed) confirms. |
| payment_method * | PaymentMethodDto | |
| customer | Buyer contact, required by some redirect acquirers (e.g. Touras). |
/v1/payment-optionsDiscover eligible payment methods
Body
| amount * | string | |
| currency * | string | |
| country | string | |
| method_hints | string[] | |
| forced_provider | string | Pin a provider. Cannot defeat the compliance layer. |
Embed
/v1/allowed-originsList embed origins
/v1/allowed-originsRegister an embed origin
Body
| origin * | string |
/v1/allowed-origins/{id}Remove an embed origin
/v1/checkout/sessions/{id}/embed-policyEmbed CSP policy for a session
/v1/checkout/sessions/{id}/bind-originBind the embedding parent origin
Webhooks
/v1/webhook-endpointsList webhook endpoints
/v1/webhook-endpointsCreate a webhook endpoint
Body
| url * | string | |
| events | string[] |
/v1/webhook-endpoints/{id}/rotate_secretRotate the signing secret (30-day dual-signing grace)
/v1/webhook-endpoints/{id}/deliveriesDelivery log for an endpoint
Query parameters
| starting_after | string | |
| limit | number |
/v1/webhook-deliveries/{id}/retryRetry a failed webhook delivery
Auth
/v1/auth/signupCreate an account + merchant
Body
| email * | string | |
| password * | string | |
| merchant_name * | string | |
| country | string |
/v1/auth/loginSign in
Body
| email * | string | |
| password * | string |
/v1/auth/logoutSign out
/v1/auth/meCurrent user + membership
API Keys
/v1/api-keysList API keys (masked)
/v1/api-keysCreate an API key (secret shown once)
Body
| name | string | |
| livemode * | boolean | false = test key (apx_sk_test_...), true = live key. |
| scopes | string[] |
/v1/api-keys/{id}/rollRoll an API key (secret shown once)
/v1/api-keys/{id}Revoke an API key
Request Logs
/v1/request-logsList API request logs
Query parameters
| starting_after | string | |
| limit | number | |
| livemode | boolean |
/v1/request-logs/{requestId}Retrieve a request log by request id
KYB
/v1/kybCurrent KYB submission + activation state
/v1/kybSave the activation form (draft)
Body
| data * | object |
/v1/kyb/submitSubmit the activation form for review
Merchant
/v1/merchantMerchant settings
/v1/merchantUpdate merchant settings
Body
| terms_url | string | Checkout trust-row Terms link. Empty string clears. |
| privacy_url | string | Checkout trust-row Privacy link. Empty string clears. |
Payments
/v1/paymentsList payment intents
Query parameters
| search | string | Exact intent id or exact base-unit amount. |
| status | string | |
| starting_after | string | |
| limit | number | |
| livemode | boolean | Cookie-auth only; keys carry their own mode. |
/v1/payments/{id}Retrieve a payment intent
/v1/payments/{id}/relatedRelated resources for a payment intent (detail page)
Refunds
/v1/payments/{id}/refundsCreate a refund
Headers Idempotency-Key
Body
| amount | string | Amount to refund in base units, as a string. Omitted = the full remaining refundable amount. |
| reason | string | |
| metadata | object |
/v1/refundsList refunds
Query parameters
| starting_after | string | |
| limit | number | |
| payment_intent | string |
/v1/refunds/{id}Retrieve a refund
Disputes
/v1/disputesList disputes
Query parameters
| starting_after | string | |
| limit | number | |
| payment_intent | string | |
| status | string |
/v1/disputes/{id}Retrieve a dispute
Dashboard
/v1/dashboard/homeHome screen aggregate (hero metric + checklist)
Query parameters
| livemode | boolean |
/v1/dashboard/balancesPer-asset ledger balances with custodian labels + open reserve holds
Query parameters
| livemode | boolean |
/v1/dashboard/eventsList events (webhook debugger)
Query parameters
| starting_after | string | |
| limit | number | |
| type | string | |
| livemode | boolean |
/v1/dashboard/events/{id}Event inspector: full payload, related objects, deliveries with bodies
Query parameters
| livemode | boolean |
/v1/dashboard/events/testWrite a sample event through the real outbox (end-to-end delivery test)
Query parameters
| livemode | boolean |
Body
| type * | "payment_intent.succeeded" | "payment_intent.failed" | "checkout.session.completed" | "refund.succeeded" | "refund.failed" | "dispute.created" | "dispute.closed" |
Payment Links
/v1/payment-linksList payment links (with conversion counts)
Query parameters
| starting_after | string | |
| limit | number |
/v1/payment-linksCreate a payment link
Headers Idempotency-Key
Body
| amount * | string | Amount in base units of currency (per unit). |
| currency * | string | |
| line_items | object[] | |
| allow_quantity | boolean | Let the buyer pick a quantity (1–99). |
| custom_fields | CustomFieldDto[] | Up to 3 fields. |
| success_url | string | |
| metadata | object |
/v1/payment-links/{id}Retrieve a payment link
/v1/payment-links/{id}Update a payment link (deactivate/reactivate, success URL, metadata)
Body
| active | boolean | Deactivate/reactivate the link. |
| success_url | string | |
| metadata | object |
/v1/payment-links/{id}/publicPublic link info for the hosted link page
/v1/payment-links/{id}/embed-policyEmbed CSP policy for a payment link
/v1/payment-links/{id}/sessionsMint a fresh checkout session from a link (one per visit)
Body
| quantity | number | |
| custom_fields | object | Values for the link’s custom fields, keyed by field key. |
| locale | string | Checkout display locale (BCP-47). |