Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.algovoi.co.uk/llms.txt

Use this file to discover all available pages before exploring further.

The AlgoVoi Payment Gateway is the canonical public API entry point for all payment protocol traffic on the platform. Every payment verification request, checkout link creation, protocol handshake, and discovery query passes through this service. It is the outward-facing surface of a production multi-chain stablecoin payment infrastructure that settles directly wallet-to-wallet — AlgoVoi never holds, custodies, or pools merchant funds. The gateway runs at api.algovoi.co.uk and exposes 123 or more routes across seven distinct protocol namespaces. Compliance enforcement — sanctions screening, audit chain insertion, Object Lock archival, signed webhook delivery — is applied synchronously on every payment, without exception.

Overview

PropertyValue
Base URLhttps://api.algovoi.co.uk
Route count123+
Settlement modelDirect wallet-to-wallet; no custody
Supported chainsAlgorand, VOI, Hedera, Stellar, Base, Solana, Tempo
Protocol surfacex402, MPP, AP2, A2A, Solana Actions, hosted checkout, xChain
Compliance postureSAMLA 2018 s.20, OFSI/OFAC/EU screening, B2 Object Lock 7-year retention
AuthenticationBearer API key, algv_ prefix, tenant ID header
Rate limit300 req/min, burst 60
The gateway is deployed on a hardened compute node behind TLS termination, WAF, DDoS mitigation, and authenticated origin pull. The gateway and control plane operate on distinct router trees with separate authentication pipelines.

Payment verification flow

The core payment primitive is a verification request that confirms whether a given on-chain transaction constitutes valid settlement of a checkout. The flow proceeds in six steps. Step 1 — Customer pays on-chain. The customer sends a stablecoin (or accepted native asset) transfer from their wallet to the merchant’s receiving wallet on the relevant chain. The transaction produces a chain-native transaction identifier. Step 2 — Client submits to /v1/verify. The merchant’s integration layer (browser SDK, server webhook, or MCP tool) submits a POST /v1/verify request carrying the transaction ID, checkout token, chain identifier, and optionally the declared sender address. Step 3 — Gateway dispatches to facilitator cluster. The gateway forwards a verification sub-request to the stateless facilitator cluster. The sub-request carries: tx_id, chain, asset_id, expected_amount_microunits, expected_receiver, and network_id. The gateway holds no chain RPC keys itself — all on-chain queries are delegated to the facilitator. Step 4 — Facilitator returns a verdict. The facilitator queries the appropriate RPC endpoint or indexer for the given chain, extracts the transaction’s actual settled amount, asset, sender, and receiver, compares them against expected values, and returns a structured verdict containing: settled (boolean), amount_microunits, asset_id, sender_address, block_height, and finality_status. Step 5 — Gateway executes the compliance and audit pipeline. On a positive verdict (settled: true), the gateway runs four synchronous operations before responding to the caller:
  • Payer wallet screened against OFSI, OFAC SDN, and EU Consolidated lists (daily refresh cadence). If a hit is recorded, the payment is blocked, the hit is appended to the screening_hits hash chain, and the tenant receives a compliance notification.
  • Payment row inserted into the payment_ledger hash chain. Each row carries chain_position, content_hash, and prev_hash to form a tamper-evident append-only ledger.
  • Audit row shipped to Backblaze B2 Object Lock bucket in COMPLIANCE mode, 7-year retention horizon.
  • Signed webhook dispatched to the tenant’s registered endpoint. Signature uses HMAC-SHA256 with the tenant’s webhook secret; the X-AlgoVoi-Signature header carries the algvw_ prefixed value.
Step 6 — Verification response returned. The gateway returns a verification response to the original caller. The response mirrors the facilitator verdict and includes additional gateway-level metadata: compliance_cleared, audit_chain_position, webhook_dispatched, and verified_at.

Verification request schema

POST /v1/verify
FieldTypeRequiredDescription
tx_idstringYesChain-native transaction identifier
tokenstringYesCheckout token from payment link creation
chainenumYesOne of: algorand, voi, hedera, stellar, base, solana, tempo
sender_addressstringNoDeclared payer wallet; used as a hint for faster indexer lookup
network_idenumNomainnet (default) or testnet

Verification response schema

FieldTypeDescription
verifiedbooleanTrue if transaction settled and passed compliance
settledbooleanFacilitator verdict: transaction confirmed on-chain
amount_microunitsbigintActual settled amount in millionths of the asset unit
asset_idstringCAIP-19 asset identifier
sender_addressstringConfirmed payer wallet address
receiver_addressstringConfirmed receiver wallet address
block_heightintegerBlock height at which transaction was finalised
finality_statusenumconfirmed or pending_finality
compliance_clearedbooleanTrue if payer wallet passed sanctions screening
audit_chain_positionintegerPosition of this payment in the payment_ledger hash chain
webhook_dispatchedbooleanTrue if tenant webhook was successfully enqueued
verified_atstringISO-8601 timestamp of gateway-side verification
checkout_tokenstringEcho of the input token

Hosted checkout

The hosted checkout system allows merchants to create multi-chain payment links without building any frontend. A link is created via a single API call; the resulting token resolves to a hosted page at dash.algovoi.co.uk/pay/{token} where the customer selects a chain, sees the correct wallet address, and submits their transaction ID for verification. POST /v1/payment-links
FieldTypeRequiredDescription
amount_usdintegerYesPayment amount in USD cents (e.g. 1000 = $10.00)
chainenumNoLock to a specific chain; omit to allow all 7 chains
asset_idstringNoLock to a specific asset; omit to accept any supported stablecoin
redirect_urlstringNoURL to redirect customer to after successful payment
webhook_urlstringNoPer-link webhook override; uses tenant default if omitted
memostringNoOn-chain memo / reference string to include in payment instructions
metadataobjectNoArbitrary key-value pairs attached to the checkout object
expires_atstringNoISO-8601 expiry; defaults to 24 hours if omitted
idempotency_keystringNoClient-supplied deduplication key; honoured for 24 hours

Checkout response

FieldTypeDescription
iduuidInternal checkout identifier
tokenstringURL-safe token; used in hosted page URL and verify calls
hosted_urlstringFull URL to the hosted checkout page
statusenumopen, paid, expired, cancelled
amount_usdintegerAmount in USD cents as submitted
chains_acceptedarray of enumChains available on this link
expires_atstringISO-8601 expiry timestamp
created_atstringISO-8601 creation timestamp

Status lifecycle

StatusDescription
openCheckout created; awaiting customer payment
paidOn-chain payment verified and compliance cleared
expiredReached expires_at without a verified payment
cancelledExplicitly cancelled by tenant via DELETE /v1/payment-links/{token}
Once a checkout reaches paid status it is immutable. Subsequent verify calls against a paid token return the original verification response with a duplicate: true flag.

Checkout retrieval

GET /v1/payment-links/{token} returns the full checkout object in its current state. GET /v1/payment-links returns a paginated list of all checkouts for the authenticated tenant, sortable by created_at or status.

Protocol handlers

The gateway handles seven distinct payment and discovery protocols from a single base URL. Each protocol occupies its own endpoint namespace.
ProtocolEndpoint prefixStandardDescription
x402/x402/*x402 v1 (Coinbase)HTTP 402 payment-required flow; proof-of-payment header verification; supports USDC on all seven chains
MPP/mpp/*paymentauth.org/mppWWW-Authenticate: Payment mandate challenge and response; receipt verification; subscription mandate management
AP2/ap2/*Google AP2 v0.1PaymentMandate object generation, mandate verification, open_mandate_hash anchor
A2A/.well-known/agent.json, /message:sendGoogle A2A v1.0Agent card publication; skill invocation; 402 pay-and-retry loop for autonomous agent payments
Solana Actions/actions/*Solana Actions / BlinksGET action metadata (label, icon, links); POST serialised transaction for wallet signing
Hosted checkout/v1/payment-links/*AlgoVoi nativeMulti-chain hosted checkout link creation, retrieval, and status polling
xChain/xchain/*Allbridge / CCTP V2Cross-chain source-to-destination routing; EVM-to-Solana via Allbridge; CCTP V2 for Circle-native USDC bridging

x402 handler

The x402 handler implements the HTTP 402 facilitator role as specified in the x402 v1 standard. When an x402-protected resource is accessed without payment proof, the gateway issues a 402 Payment Required response with a structured X-Payment-Required header. Upon receiving payment proof in X-Payment headers, the gateway verifies the proof, runs the compliance pipeline, and returns a 200 OK with an X-Payment-Receipt header containing a signed compliance receipt under the urn:x402:canonicalisation:jcs-rfc8785-v1 canonicalisation pin.

MPP handler

The MPP handler implements the Merchant Payment Protocol as defined at paymentauth.org/mpp. It issues WWW-Authenticate: Payment challenges, verifies mandate signatures, and emits MPP subscription receipts. Subscription mandates are stored in the control plane and evaluated at each pull cycle by the Recurr service. The gateway exposes a subscription demo fixture at /mpp/sub/demo/mpp-sub-test-daily-base for integration testing without tenant credentials.

AP2 handler

The AP2 handler implements Google’s Agent Payment Protocol v0.1. It generates PaymentMandate objects with structured capability declarations, verifies mandate signatures against on-chain wallet proofs, and anchors open_mandate_hash values for cross-implementation validation. AP2 #265 is the upstream issue tracking the open_mandate_hash extension proposal authored by AlgoVoi.

A2A handler

The A2A handler implements the Google Agent-to-Agent v1.0 protocol. The /.well-known/agent.json endpoint publishes the AlgoVoi agent card declaring three skills: verify-payment, create-checkout, and check-status. The /message:send endpoint accepts A2A task envelopes and returns task results. Autonomous agents that trigger a 402 during A2A skill invocation receive a payment-required envelope and can retry with proof attached — the gateway handles the pay-and-retry loop transparently.

Solana Actions handler

The Solana Actions handler follows the Solana Actions and Blinks standard. GET /actions/checkout/{token} returns action metadata including label, description, icon URL, and a links.actions array with the POST endpoint. POST /actions/checkout/{token} accepts a { account } body carrying the payer public key and returns a serialised, unsigned transaction for the Blinks wallet UI to present for signing. The checkout token is embedded in the transaction memo field to enable automatic post-sign verification.

xChain handler

The xChain handler routes cross-chain payments from a source chain (any EVM or Solana) to any AlgoVoi-supported destination chain. It co-ordinates with Allbridge for non-CCTP routes and with Circle CCTP V2 for Circle-native USDC bridging (approximately 50-second finality on Solana). A private key never leaves the browser extension; the handler receives a signed intent and returns bridge calldata for the extension to submit. Bridge state is tracked on dedicated cross-chain bridge infrastructure.

Bazaar and discovery

The Bazaar integration makes AlgoVoi the first compliance-aware Bazaar facilitator. Every payable resource published through the gateway carries embedded compliance metadata — tenant risk tier, KYC status flag, and a compliance_posture summary — so that Bazaar consumers can make admission decisions before initiating payment.

Public endpoints

GET /discovery/resources returns the public Bazaar catalog. No authentication is required. The response is a paginated list of resource objects, each containing:
FieldTypeDescription
resource_idstringStable resource identifier
tenant_short_idstringPublishing tenant’s URL-safe short ID
resource_typeenumapi_endpoint, data_feed, agent_skill, payment_link
titlestringHuman-readable resource title
descriptionstringResource description
endpoint_urlstringURL at which the resource is accessible
payment_requiredbooleanTrue if payment is required to access
accepted_protocolsarray of enumProtocols this resource accepts (x402, mpp, ap2, a2a)
chains_acceptedarray of enumChains the resource will accept payment on
amount_usdintegerAccess price in USD cents, if applicable
compliance_postureobjectTenant risk_tier, kyc_status, last_screened_at
created_atstringISO-8601 creation timestamp

Publishing a resource

POST /v1/resources registers a new payable resource. The tenant must be mainnet-active (KYC approved). The endpoint URL is screened against SSRF guards and threat-intel feeds at registration time.
FieldTypeRequiredDescription
titlestringYesResource title
descriptionstringNoHuman-readable description
endpoint_urlstringYesAccessible URL for this resource
resource_typeenumYesapi_endpoint, data_feed, agent_skill, or payment_link
payment_requiredbooleanYes
accepted_protocolsarray of enumYesAt least one of: x402, mpp, ap2, a2a
chains_acceptedarray of enumNoDefaults to all supported chains
amount_usdintegerNoRequired if payment_required is true
metadataobjectNoArbitrary key-value pairs

Compliance enforcement

Compliance runs synchronously on every payment. The pipeline cannot be bypassed, deferred, or disabled at the tenant level. It consists of five sequential operations. Sanctions screening. The payer wallet address is matched against three consolidated sanctions lists maintained on the gateway: OFSI (UK), OFAC SDN (US), and EU Consolidated List. List data is refreshed daily from authoritative sources. Matching uses both exact-address and fuzzy-address normalisation to catch checksummed variants. Verdicts are returned in SAMLA 2018 s.20 compliant form — generic outcome categories only, never naming the specific list that produced a hit. Hit recording. If a sanctions hit is found, the payment is blocked unconditionally. The hit is appended to the screening_hits hash chain with payer_address, list_code (a generic category, not the list name), outcome (BLOCKED or CLEAR), and screened_at. The tenant receives a payment.blocked.compliance webhook event carrying only the generic outcome. Audit chain insertion. Every payment that clears sanctions is inserted into the payment_ledger hash chain. Each row carries:
FieldTypeDescription
chain_positionintegerMonotonically increasing position in the ledger
payment_iduuidPayment record identifier
content_hashstringSHA-256 of the canonical payment row JSON
prev_hashstringcontent_hash of the preceding row
committed_atstringISO-8601 timestamp
The hash chain is tamper-evident: any modification to a historical row breaks the chain from that position forward. Object Lock archival. Every audit row is also shipped to a Backblaze B2 bucket configured with Object Lock in COMPLIANCE mode and a 7-year retention period (to 2033). No software path — including AlgoVoi operators — can delete or modify objects within their retention window. This property supports FCA / EMR audit obligations. Webhook delivery. A signed payment.verified webhook is dispatched to the tenant’s registered endpoint. The HMAC-SHA256 signature is computed over the raw request body using the tenant’s webhook secret. The X-AlgoVoi-Signature header carries the signature prefixed with algvw_.

Pre-payment screening endpoint

POST /compliance/screen is a public endpoint that accepts a wallet address and returns a SAMLA-compliant screening result without creating a payment. This allows merchants to pre-screen payers before generating a checkout link.
Request fieldTypeDescription
addressstringWallet address to screen
chainenumChain the address belongs to
Response fieldTypeDescription
outcomeenumCLEAR or BLOCKED
screened_atstringISO-8601 timestamp
list_codestringGeneric category code if blocked; null if clear
No authentication is required on this endpoint.

Compliance attestation endpoint

GET /compliance/attestation is a public endpoint returning the operator’s current compliance posture. It carries:
FieldTypeDescription
operatorstringAlgoVoi operator identifier
audit_chain_headobjectLatest payment_ledger chain_position and content_hash
screening_hits_headobjectLatest screening_hits chain_position and content_hash
object_lock_bucketstringB2 bucket name
object_lock_modestringCOMPLIANCE
retention_yearsinteger7
retention_untilstringISO-8601 end-of-retention date
samla_compliancestringSAMLA 2018 s.20
last_attested_atstringISO-8601 timestamp
The attestation endpoint also returns a Composite Trust Query (CTQ) shaped response compatible with the draft-hopley-x402-composite-trust-query Internet-Draft, enabling downstream verifier consumers to parse the attestation in a protocol-standard form.

MCP integration

The gateway exposes a Model Context Protocol surface at /mcp/*, mirroring the 28-tool inventory of the algovoi-mcp server available on PyPI as algovoi-mcp and on npm as @algovoi/mcp-server. AI agents and LLM tool-use integrations can call these tools directly over MCP without managing API keys in prompt context.

Tool inventory (28 tools)

CategoryTools
Payment linkscreate_payment_link, get_payment_link, list_payment_links, cancel_payment_link
Verificationverify_payment, get_verification_status
Compliancescreen_recipient, get_compliance_attestation
x402generate_x402_challenge, verify_x402_proof
MPPgenerate_mpp_challenge, verify_mpp_receipt, get_mpp_subscription
AP2generate_ap2_mandate, verify_ap2_mandate
A2Afetch_agent_card, send_a2a_message, get_a2a_task_status
Solana Actionsget_action_metadata, build_action_transaction
xChainget_xchain_quote, submit_xchain_transfer, get_xchain_status
Discoverylist_resources, get_resource
Accountget_tenant_status, get_trial_balance
The same tool surface is available through the MCP Registry at mcp.algovoi.co.uk for discovery by compliant MCP clients.

Authentication

All authenticated endpoints require two headers:
HeaderFormatDescription
AuthorizationBearer Tenant API key
X-Tenant-IdTenant UUID
API keys use the prefix algv_ (standard), algv_admin_ (admin, 14 scopes), or algv_ro_ (read-only). Keys are never stored in plaintext; only a SHA-256 hash is retained after creation. Multi-key rotation is supported: an old key remains valid during the transition window while a new key is active. The Idempotency-Key header is supported on all POST endpoints that create resources. Idempotency windows are 24 hours. Duplicate requests within the window return the original response with an X-Idempotency-Replay: true header.

Public endpoints (no authentication required)

EndpointMethodDescription
/healthGETService liveness check
/compliance/attestationGETOperator compliance posture and audit chain heads
/compliance/screenPOSTPre-payment SAMLA-compliant sanctions screen
/discovery/resourcesGETPublic Bazaar catalog
/.well-known/agent.jsonGETA2A agent card
/.well-known/pay-skills.jsonGETpay.sh skills catalog
/actions/checkout/GETSolana Actions metadata
/mpp/sub/demo/mpp-sub-test-daily-baseGETMPP subscription demo fixture

Chain and asset support

ChainNative tokenUSDC assetNotes
AlgorandALGOUSDC (ASA 31566704)ARC-4 asset transfers, memo field
VOIVOIUSDC (ARC-200)AVM-compatible, ARC-200 token standard
HederaHBARUSDC (HTS)Mirror node verification, topic memo
StellarXLMUSDC (GA5ZSEJ…)Horizon REST, classic USDC (not Soroban)
BaseETHUSDC (ERC-20)Alchemy EVM RPC, receipt confirmations
SolanaSOLUSDC (SPL)Token program, memo program, Blinks
TempoTEMPOUSDCe (ERC-20)EVM-compatible, similar verification path to Base
Price oracle. When native-asset payments are accepted, the gateway converts ALGO, VOI, HBAR, XLM, ETH, and SOL to USD cents at settlement time. The oracle queries multiple price feeds and applies median outlier rejection before accepting a price. If the oracle is unavailable, native-asset payments are queued and settled when the oracle recovers; stablecoin payments are unaffected.

Rate limits and error codes

The gateway enforces a rate limit of 300 requests per minute per API key, with a burst allowance of 60 requests. Exceeding the limit returns 429 Too Many Requests with a Retry-After header indicating the earliest retry time.
HTTP statusMeaning
200Success
201Resource created
400Validation error — response body contains field-level error array
401Missing or invalid API key
403Insufficient scope for the requested operation
404Resource not found
409Conflict — idempotency key collision or duplicate resource
422Unprocessable entity — logically invalid request
429Rate limit exceeded
500Internal server error
503Facilitator or chain RPC temporarily unavailable
All error responses carry a structured JSON body with error_code (snake_case string), message (human-readable), and an optional field_errors array for validation failures.

Webhook events

The gateway delivers signed webhook events to tenant-registered endpoints for all significant payment and compliance lifecycle events.
Event typeTrigger
payment.verifiedOn-chain payment verified and compliance cleared
payment.pending_finalityPayment seen on-chain; awaiting confirmation depth
payment.blocked.compliancePayment blocked by sanctions screening
payment.expiredCheckout reached expiry without verified payment
checkout.createdNew checkout link created
checkout.cancelledCheckout explicitly cancelled
mandate.createdNew payment mandate created
mandate.activatedMandate confirmed via on-chain wallet signature
mandate.pausedMandate pulls suspended
mandate.resumedMandate pulls reinstated
mandate.revokedMandate revoked on-chain
mandate.expiredMandate reached cancel_at
mandate.cancelledMandate cancelled by operator
recurring.pull_executedRecurring pull completed successfully
recurring.pull_failedRecurring pull failed (insufficient balance, RPC error)
kyc.approvedTenant KYC approved
kyc.rejectedTenant KYC rejected
compliance.sanctions_hitPayer address matched sanctions list
Webhook requests carry X-AlgoVoi-Signature, X-AlgoVoi-Event, X-AlgoVoi-Delivery (unique delivery ID), and X-AlgoVoi-Timestamp headers. The delivery ID is stable across retries; the timestamp is the original dispatch time.