API Reference

Endpoints

Merchant-facing API operation catalog, grouped by resource.

This catalog lists the merchant-facing API operations grouped by resource. Each operation is described by its kind (command or query), its result class, and its canonical inputs and fields — using the exact field names the API accepts and returns.

Operations are described semantically. The envelope, status mapping, error codes, authentication, idempotency, and pagination contracts are fixed once and apply to every operation below:

Reading rules for every row:

  • Result class is one of singleton, collection, or ack (Conventions). A command that creates a new resource returns 201; every other success returns 200.
  • Selectors and filters use the exact canonical field names. Unknown parameters are rejected as VALIDATION_ERROR.
  • A singleton selector that resolves to nothing returns NOT_FOUND. A collection that matches nothing returns an empty data: [], not an error.
  • Collection reads page through results with limit and cursor where the surface supports pagination.

Payment intents

A payment intent is the entry point of a payment, anchored by payment_intent_id.

OperationKindResult classInputs
Create payment intentCommandsingleton (201)body fields below
Get payment intentQuerysingletonselector payment_intent_id
List payment intentsQuerycollectionfilter merchant_id
Cancel payment intentCommandackselector payment_intent_id
List intent status historyQuerycollectionfilter payment_intent_id

Create — request body

FieldRequiredNotes
merchant_idrequiredMerchant reference.
order_referencerequiredMerchant order reference.
base_amountrequiredPayer-facing base amount.
base_currencyrequiredPayer-facing base currency.
expires_atrequiredIntent expiry.
snapshot_idoptionalImmutable merchant configuration reference.
metadataoptionalCaller metadata; nullable/empty allowed.
idempotency_keyoptionalDeduplication key, scoped to merchant_id. See Idempotency.

Re-using an idempotency_key with different semantic input returns IDEMPOTENCY_CONFLICT.

Payment intent — result fields

FieldNotes
payment_intent_idIdentity.
merchant_id
order_reference
base_amount
base_currency
metadatanullable
expires_at
created_at
updated_at
idempotency_keyoptional
final_attempt_idoptional reference
paid_atoptional; projection marker, not settlement truth

Any status label on a payment intent is a projection label, not write-model truth. Cancellation is recorded as intent status history; it does not mean payment failure.

Intent status history — result fields

FieldNotes
history_id
payment_intent_id
statusterminal label, e.g. cancelled / expired
reasonnullable
changed_at
changed_by

History is append-only audit truth; it is not payment finality truth.


Payment attempts

A payment attempt is an expected on-chain execution under a payment intent, anchored by attempt_id.

OperationKindResult classInputs
Get payment attemptQuerysingletonselector attempt_id
List payment attemptsQuerycollectionfilter payment_intent_id and/or merchant_id (at least one)
List attempt status historyQuerycollectionfilter attempt_id

Payment attempt — result fields

FieldNotes
attempt_idIdentity.
payment_intent_idParent intent.
merchant_id
chain_id
token_id
amount_in_token
deposit_addressOn-chain matching anchor for the attempt.
payer_addressnullable
attempt_expires_at
statusAttempt lifecycle label.
fail_reasonnullable
created_at

Attempt records are expected-execution truth, not settlement truth. Additional persisted fields may be present.


Checkout sessions

A checkout session is the checkout context for one payment intent, anchored by session_id.

OperationKindResult classInputs
Get checkout sessionQuerysingletonselector session_id

Checkout session — result fields

FieldNotes
session_idIdentity.
payment_intent_idParent intent.
statusSession lifecycle label (checkout context only, not finality).
ui_chain_idUI-selected chain.
ui_token_idUI-selected token.

Payment status summary

A composite, read-only status view rooted at one payment_intent_id, for status rendering.

OperationKindResult classInputs
Get payment status summaryQuerysingletonselector payment_intent_id; optional scope session_id, attempt_id

The summary combines the intent expectation, the relevant session and attempt projection fields, and any materialized outcome projection. Settlement-style labels in this view — PAID, FAILED, DUPLICATE_PAYMENT — are projections derived from the canonical finality outcome and MUST NOT be treated as authoritative settlement truth. The canonical record is the Proof of Payment. When no session or attempt context exists yet, only the intent-root summary is returned.


KYT decisions

The merchant's own KYT decisions, read back. get resolves one decision; list returns the full decision history for an attempt.

OperationKindResult classInputs
Get KYT decisionQuerysingletonselector kyt_decision_id
List KYT decisionsQuerycollectionfilter attempt_id

list is ordered by received_at ascending. Decisions are append-only per attempt; the effective decision is the record with the latest received_at. Position alone does not imply applicability.

KYT decision — result fields

FieldNotes
kyt_decision_idIdentity.
attempt_idParent attempt.
kyt_invocation_refInvocation correlation reference.
decisionapprove | reject | hold
sweep_tonullable; present iff decision = approve
refund_tonullable; present iff decision = reject
reasonnullable
retry_afternullable; seconds; present iff decision = hold
received_at

Proof of Payment

The canonical, blockchain-derived record of a payment event, anchored by pop_id. For record contents and verification, see Proof of Payment and Verifying a PoP.

OperationKindResult classInputs
Get Proof of PaymentQuerysingletonselector pop_id
Get Proof of Payment by attemptQuerysingletonselector attempt_id
List by payment intentQuerycollectionfilter payment_intent_id
List by merchantQuerycollectionfilter merchant_id; optional confirmed_at range

A single payment_intent_id may correlate to more than one record (duplicate analysis across attempts). The confirmed_at range is interpreted against the record's confirmation timestamp.


Webhook endpoints

A webhook endpoint is a registered notification destination, anchored by endpoint_id. Its signing secret is anchored by signing_secret_id. For delivery and verification semantics, see Notifications.

OperationKindResult classInputs
Register endpointCommandsingleton (201)body url, enabled, merchant_id
Get endpointQuerysingletonselector endpoint_id
List endpointsQuerycollectionfilter merchant_id and/or enabled
Enable endpointCommandackselector endpoint_id
Disable endpointCommandackselector endpoint_id
Generate signing secretCommandsingleton (201)selector endpoint_id
Rotate signing secretCommandsingleton (201)selector endpoint_id
Revoke signing secretCommandackselector signing_secret_id
Get signing secret metadataQuerysingletonselector signing_secret_id

Endpoint — result fields

FieldNotes
endpoint_idIdentity.
merchant_id
urlImmutable after registration.
enabledGating state.
created_at
disabled_atnullable

The url is immutable. To change a destination, register a new endpoint and disable the old one. A disabled endpoint receives no deliveries.

Signing secret — result fields (metadata only)

FieldNotes
signing_secret_idIdentity.
endpoint_idOwning endpoint.
created_at
revoked_atnullable

At most one active signing secret exists per endpoint: generating or rotating invalidates the prior secret. Read surfaces never return secret material.


API keys

A merchant API key authenticates calls, anchored by api_key_id.

OperationKindResult classInputs
Generate API keyCommandsingleton (201)body merchant_id
List API keysQuerycollectionfilter merchant_id; optional active/revoked filter via revoked_at
Get API key metadataQuerysingletonselector api_key_id
Revoke API keyCommandackselector api_key_id

API key — result fields (metadata only)

FieldNotes
api_key_idIdentity.
merchant_id
created_at
revoked_atnullable

At most one active key exists per merchant: generating a new key invalidates the prior one. A key is active while revoked_at is null. Read surfaces never return key material.

On this page