APXRAILSdocs

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

post/v1/checkout/sessions

Create a checkout session

Headers Idempotency-Key

Body

amount *stringAmount in base units of currency, as a string.
currency *string
countrystringBuyer country, ISO 3166-1 alpha-2. Drives compliance rules.
localestringCheckout display locale (BCP-47, e.g. "no", "sv-SE"). Falls back to Accept-Language, then English.
line_itemsobject[]
success_urlstring
cancel_urlstring
metadataobject
get/v1/checkout/sessions/{id}

Retrieve a checkout session

get/v1/checkout/sessions/{id}/summary

Public session summary (hosted checkout)

post/v1/checkout/sessions/{id}/confirm

Confirm a checkout session (test flows)

Body

tokenstringSession token — required for unauthenticated (embed) confirms.
payment_method *PaymentMethodDto
customerBuyer contact, required by some redirect acquirers (e.g. Touras).
post/v1/payment-options

Discover eligible payment methods

Body

amount *string
currency *string
countrystring
method_hintsstring[]
forced_providerstringPin a provider. Cannot defeat the compliance layer.

Embed

get/v1/allowed-origins

List embed origins

post/v1/allowed-origins

Register an embed origin

Body

origin *string
delete/v1/allowed-origins/{id}

Remove an embed origin

get/v1/checkout/sessions/{id}/embed-policy

Embed CSP policy for a session

post/v1/checkout/sessions/{id}/bind-origin

Bind the embedding parent origin

Webhooks

get/v1/webhook-endpoints

List webhook endpoints

post/v1/webhook-endpoints

Create a webhook endpoint

Body

url *string
eventsstring[]
post/v1/webhook-endpoints/{id}/rotate_secret

Rotate the signing secret (30-day dual-signing grace)

get/v1/webhook-endpoints/{id}/deliveries

Delivery log for an endpoint

Query parameters

starting_afterstring
limitnumber
post/v1/webhook-deliveries/{id}/retry

Retry a failed webhook delivery

Auth

post/v1/auth/signup

Create an account + merchant

Body

email *string
password *string
merchant_name *string
countrystring
post/v1/auth/login

Sign in

Body

email *string
password *string
post/v1/auth/logout

Sign out

get/v1/auth/me

Current user + membership

API Keys

get/v1/api-keys

List API keys (masked)

post/v1/api-keys

Create an API key (secret shown once)

Body

namestring
livemode *booleanfalse = test key (apx_sk_test_...), true = live key.
scopesstring[]
post/v1/api-keys/{id}/roll

Roll an API key (secret shown once)

delete/v1/api-keys/{id}

Revoke an API key

Request Logs

get/v1/request-logs

List API request logs

Query parameters

starting_afterstring
limitnumber
livemodeboolean
get/v1/request-logs/{requestId}

Retrieve a request log by request id

KYB

get/v1/kyb

Current KYB submission + activation state

put/v1/kyb

Save the activation form (draft)

Body

data *object
post/v1/kyb/submit

Submit the activation form for review

Merchant

get/v1/merchant

Merchant settings

patch/v1/merchant

Update merchant settings

Body

terms_urlstringCheckout trust-row Terms link. Empty string clears.
privacy_urlstringCheckout trust-row Privacy link. Empty string clears.

Payments

get/v1/payments

List payment intents

Query parameters

searchstringExact intent id or exact base-unit amount.
statusstring
starting_afterstring
limitnumber
livemodebooleanCookie-auth only; keys carry their own mode.
get/v1/payments/{id}

Retrieve a payment intent

get/v1/payments/{id}/related

Related resources for a payment intent (detail page)

Refunds

post/v1/payments/{id}/refunds

Create a refund

Headers Idempotency-Key

Body

amountstringAmount to refund in base units, as a string. Omitted = the full remaining refundable amount.
reasonstring
metadataobject
get/v1/refunds

List refunds

Query parameters

starting_afterstring
limitnumber
payment_intentstring
get/v1/refunds/{id}

Retrieve a refund

Disputes

get/v1/disputes

List disputes

Query parameters

starting_afterstring
limitnumber
payment_intentstring
statusstring
get/v1/disputes/{id}

Retrieve a dispute

Dashboard

get/v1/dashboard/home

Home screen aggregate (hero metric + checklist)

Query parameters

livemodeboolean
get/v1/dashboard/balances

Per-asset ledger balances with custodian labels + open reserve holds

Query parameters

livemodeboolean
get/v1/dashboard/events

List events (webhook debugger)

Query parameters

starting_afterstring
limitnumber
typestring
livemodeboolean
get/v1/dashboard/events/{id}

Event inspector: full payload, related objects, deliveries with bodies

Query parameters

livemodeboolean
post/v1/dashboard/events/test

Write a sample event through the real outbox (end-to-end delivery test)

Query parameters

livemodeboolean

Body

type *"payment_intent.succeeded" | "payment_intent.failed" | "checkout.session.completed" | "refund.succeeded" | "refund.failed" | "dispute.created" | "dispute.closed"

Payment Links

get/v1/payment-links

List payment links (with conversion counts)

Query parameters

starting_afterstring
limitnumber
post/v1/payment-links

Create a payment link

Headers Idempotency-Key

Body

amount *stringAmount in base units of currency (per unit).
currency *string
line_itemsobject[]
allow_quantitybooleanLet the buyer pick a quantity (1–99).
custom_fieldsCustomFieldDto[]Up to 3 fields.
success_urlstring
metadataobject
get/v1/payment-links/{id}

Retrieve a payment link

post/v1/payment-links/{id}

Update a payment link (deactivate/reactivate, success URL, metadata)

Body

activebooleanDeactivate/reactivate the link.
success_urlstring
metadataobject
get/v1/payment-links/{id}/public

Public link info for the hosted link page

get/v1/payment-links/{id}/embed-policy

Embed CSP policy for a payment link

post/v1/payment-links/{id}/sessions

Mint a fresh checkout session from a link (one per visit)

Body

quantitynumber
custom_fieldsobjectValues for the link’s custom fields, keyed by field key.
localestringCheckout display locale (BCP-47).