{"openapi":"3.1.0","info":{"title":"AlgoVoi Gateway","description":"Public-facing x402 payment gateway.","version":"1.0.0-phase1c","x-guidance":"To access payment-gated resources, send the required payment proof header. Use GET /mpp/{resource_id} for MPP or GET /protected/{resource_id} for x402."},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/verify":{"post":{"tags":["v1"],"summary":"MPP payment verification","description":"Verify an on-chain payment transaction for the MPP adapter.\n\nThe adapter submits the tx_id and network from the payer's credential;\nthe gateway looks up the resource definition to get the expected amount\nand receiver, then delegates to the facilitator for on-chain confirmation.\n\nReturns a receipt JWT on success.","operationId":"mpp_verify_v1_verify_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MppVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MppVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ap2/verify":{"post":{"tags":["v1"],"summary":"AP2 mandate verification","description":"Verify an AP2 mandate credential submitted by a payer.\n\nThe mandate dict must contain a ``signature`` field holding the JWT\naccess token issued by POST /ap2/confirm.  The gateway verifies the\nJWT signature, checks that the tenant_id claim matches the authenticated\ntenant, and confirms the token has not expired.\n\nReturns ``{\"verified\": true}`` on success.","operationId":"ap2_verify_v1_ap2_verify_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ap2VerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ap2VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mpp/challenge":{"post":{"tags":["mpp"],"summary":"Mpp Challenge","description":"Explicit challenge pre-fetch for MPP agents that want to obtain a\nchallenge token before building their payment transaction.\n\nReturns the same challenge object that GET /mpp/{resource_id} returns\nin its 401 body, allowing agents to pipeline challenge fetch → pay →\nproof submission without the round-trip to the resource endpoint.","operationId":"mpp_challenge_mpp_challenge_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MppChallengeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MppChallengeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mpp/{resource_id}":{"get":{"tags":["mpp"],"summary":"Mpp Resource","description":"IETF draft-httpauth-payment resource gate.\n\nNo Authorization header → HTTP 401 + WWW-Authenticate: Payment challenge.\nAuthorization: Payment <b64> → validate challenge echo → verify on-chain → HTTP 200.\n\nThe x402 /protected/{resource_id} endpoint is completely unchanged.","operationId":"mpp_resource_mpp__resource_id__get","parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","title":"Resource Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"authMode":"payment","protocols":["mpp","x402"],"price":{"mode":"fixed","amount":"10000","currency":"31566704"}}}},"/ap2/intent":{"post":{"tags":["ap2"],"summary":"Submit an IntentMandate to open an AP2 shopping session","description":"Receive an IntentMandate. If user_authorization is present (SD-JWT-VC),\nverification is deferred to /pay where it binds to specific cart and\npayment hashes — at /intent stage we have nothing concrete to bind to.\n\nPer spec: if intent is not user-signed, user_cart_confirmation_required\nMUST be True (otherwise the agent could shop unilaterally without consent).","operationId":"submit_intent_ap2_intent_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2IntentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2IntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ap2/cart":{"post":{"tags":["ap2"],"summary":"Submit a merchant-signed CartMandate, verified against an accepted IntentMandate","operationId":"submit_cart_ap2_cart_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2CartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2CartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ap2/pay":{"post":{"tags":["ap2"],"summary":"Submit PaymentMandate; verify user_authorization and return crypto challenge","operationId":"initiate_payment_ap2_pay_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2PayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2PayResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ap2/confirm":{"post":{"tags":["ap2"],"summary":"Confirm on-chain transaction; gateway verifies via facilitator and issues JWT","operationId":"confirm_payment_ap2_confirm_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2ConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2ConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ap2/status/{cart_id}":{"get":{"tags":["ap2"],"summary":"Inspect AP2 mandate chain state by cart_id","operationId":"get_status_ap2_status__cart_id__get","parameters":[{"name":"cart_id","in":"path","required":true,"schema":{"type":"string","title":"Cart Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ap2/extensions":{"get":{"tags":["ap2"],"summary":"List AP2 extensions supported by this gateway","description":"Returns the AP2 extensions this gateway supports. Used by AP2 agents to\ndiscover available payment methods (e.g. AlgoVoi crypto rails) before\nconstructing a CartMandate.","operationId":"list_extensions_ap2_extensions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AP2ExtensionsResponse"}}}}}}},"/v1/payment-links":{"post":{"tags":["v1"],"summary":"Create a dynamic payment link","description":"Create a hosted checkout link for a specific fiat amount. The amount is converted to stablecoin (USDC / aUSDC) or native crypto using the tenant's configured network and the live FX rate. The returned `checkout_url` can be sent directly to the buyer.","operationId":"create_dynamic_payment_link_v1_payment_links_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicPaymentLinkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicPaymentLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shop-demo/checkout":{"post":{"tags":["shop-demo"],"summary":"Shop Demo Checkout","description":"Hosted checkout flow — creates a payment link and returns its URL.","operationId":"shop_demo_checkout_shop_demo_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/protected/{resource_id}":{"get":{"tags":["x402-protected"],"summary":"Get Protected Resource","description":"x402-compliant protected resource endpoint.\n\nAccepts payment proof via either header (compatible with both specs):\n- X-PAYMENT (gateway spec)\n- PAYMENT-SIGNATURE (coinbase/x402 spec, used by AlgoVoi extension)\n\n- No payment header  →  HTTP 402 + PAYMENT-REQUIRED header\n- Payment header     →  verify on-chain → HTTP 200 + body","operationId":"get_protected_resource_protected__resource_id__get","parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","title":"Resource Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-payment","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Payment"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"authMode":"payment","protocols":["mpp","x402"],"price":{"mode":"fixed","amount":"10000","currency":"31566704"}}}},"/public/{resource_id}":{"get":{"tags":["x402-public-demo"],"summary":"Get Public Demo Resource","description":"Public x402 demo endpoint — no authentication required.\n\nImplements the standard x402 protocol for the AlgoVoi demo tenant.\nOnly whitelisted resource IDs are served.\n\nCompatible with both x402 header specs:\n  - X-PAYMENT / X-PAYMENT-REQUIRED  (AlgoVoi gateway spec)\n  - PAYMENT-SIGNATURE / PAYMENT-REQUIRED  (coinbase/x402 spec, used by extension)\n\nFlow:\n  No payment header  →  HTTP 402 + PAYMENT-REQUIRED header\n  Payment header     →  verify on-chain  →  HTTP 200 + body","operationId":"get_public_demo_resource_public__resource_id__get","parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","title":"Resource Id"}},{"name":"x-payment","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Payment"}},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/resources/{resource_id}":{"get":{"tags":["resources"],"summary":"Get Resource","operationId":"get_resource_resources__resource_id__get","parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","title":"Resource Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/x402/challenge":{"post":{"tags":["x402"],"summary":"Challenge","description":"Return payment instructions using per-resource price/network and per-tenant payout address.","operationId":"challenge_x402_challenge_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/x402/verify":{"post":{"tags":["x402"],"summary":"Verify","description":"Submit tx_id for verification using per-tenant payout address as expected receiver.","operationId":"verify_x402_verify_post","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checkout/{token}/verify":{"post":{"tags":["checkout"],"summary":"Verify Checkout","description":"Verify the payer's on-chain transaction and mark the payment link paid.\n\nThe payer must have sent exactly the required amount to the receiver address\non the correct chain. The facilitator performs the on-chain verification.\n\nReturns the redirect_url on success so the browser JS can redirect.\nReturns 422 if the transaction is invalid or cannot be verified.\nReturns 409 if the link is already paid.\nReturns 410 if the link is expired or cancelled.","operationId":"verify_checkout_checkout__token__verify_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checkout/{token}/detect":{"get":{"tags":["checkout"],"summary":"Detect Payment","description":"Auto-detect inbound payment by polling the chain's indexer/mirror node.\n\nSupports all chains:\n  - Algorand/VOI: queries indexer /v2/transactions?address=...&note-prefix=...\n  - Hedera: queries Mirror Node /api/v1/transactions?account.id=...\n\nReturns {\"found\": true, \"tx_id\": \"...\"} when detected, or {\"found\": false}.","operationId":"detect_payment_checkout__token__detect_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checkout/{token}/submit-sponsored":{"post":{"tags":["checkout"],"summary":"Submit Sponsored","description":"Accept a customer's signed 0-fee transaction and submit it via the\ntenant's sponsor wallet (atomic group fee pooling).\n\nBody: { \"signed_tx\": base64, \"chain\": \"algorand-mainnet\" | \"voi-mainnet\" }\n\nIf the tenant has no sponsor wallet configured, returns\n{\"error\": \"not_sponsored\", \"fallback\": true} so the client can fall back\nto normal payment flow.","operationId":"submit_sponsored_checkout__token__submit_sponsored_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checkout/{token}/cancel":{"post":{"tags":["checkout"],"summary":"Cancel Checkout","description":"Cancel an active checkout link. Sets status to 'cancelled'.\n\nF5 security fix: requires cancel_secret in the request body. The secret\nis generated at link-creation time and returned to the merchant only —\nit is never embedded in the public checkout page. This prevents an\nattacker who merely knows the checkout URL from cancelling the link.\n\nOnly active links can be cancelled. Paid/expired/already-cancelled links\nreturn 409/410.  Returns redirect_url so callers can redirect customers.","operationId":"cancel_checkout_checkout__token__cancel_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelCheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/checkout/{token}/status":{"get":{"tags":["checkout"],"summary":"Checkout Status","description":"Polling endpoint — returns whether the link has been paid.\n\nSafe to call repeatedly; does not mutate state.\nReturns { \"status\": \"active\"|\"paid\"|\"expired\"|\"cancelled\", \"redirect_url\": str|null }","operationId":"checkout_status_checkout__token__status_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signup/create":{"post":{"tags":["signup"],"summary":"Signup Proxy","description":"Proxy signup request to control plane (avoids nginx /api/ → /internal/ rewrite).\n\nRate limited at 5/hour per real client IP (via X-Real-IP / X-Forwarded-For).\nThis limit is the real enforcement point — the control_plane's limiter sees\nonly the gateway container IP so it's a shared bucket.","operationId":"signup_proxy_signup_create_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AP2CartRequest":{"properties":{"intent_id":{"type":"string","format":"uuid","title":"Intent Id"},"mandate":{"$ref":"#/components/schemas/CartMandate"}},"additionalProperties":false,"type":"object","required":["intent_id","mandate"],"title":"AP2CartRequest","description":"POST /ap2/cart — agent submits a merchant-signed CartMandate."},"AP2CartResponse":{"properties":{"cart_id":{"type":"string","title":"Cart Id"},"status":{"type":"string","enum":["locked","pending_user_confirmation"],"title":"Status"},"expires_at":{"type":"string","title":"Expires At"}},"additionalProperties":false,"type":"object","required":["cart_id","status","expires_at"],"title":"AP2CartResponse"},"AP2ConfirmRequest":{"properties":{"payment_id":{"type":"string","format":"uuid","title":"Payment Id"},"tx_id":{"type":"string","maxLength":128,"minLength":1,"title":"Tx Id"},"network":{"type":"string","title":"Network"}},"additionalProperties":false,"type":"object","required":["payment_id","tx_id","network"],"title":"AP2ConfirmRequest","description":"POST /ap2/confirm — agent confirms on-chain tx_id."},"AP2ConfirmResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"additionalProperties":false,"type":"object","required":["verified"],"title":"AP2ConfirmResponse"},"AP2ExtensionInfo":{"properties":{"uri":{"type":"string","title":"Uri"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"type":"string","title":"Description"}},"additionalProperties":false,"type":"object","required":["uri","name","version","description"],"title":"AP2ExtensionInfo","description":"Single extension entry for GET /ap2/extensions discovery response."},"AP2ExtensionsResponse":{"properties":{"ap2_version":{"type":"string","title":"Ap2 Version","default":"0.1"},"extensions":{"items":{"$ref":"#/components/schemas/AP2ExtensionInfo"},"type":"array","title":"Extensions"}},"additionalProperties":false,"type":"object","required":["extensions"],"title":"AP2ExtensionsResponse","description":"GET /ap2/extensions — list of extensions this gateway supports."},"AP2IntentRequest":{"properties":{"mandate":{"$ref":"#/components/schemas/IntentMandate"},"user_authorization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Authorization","description":"Optional base64url SD-JWT-VC authorizing the intent."}},"additionalProperties":false,"type":"object","required":["mandate"],"title":"AP2IntentRequest","description":"POST /ap2/intent — agent submits a signed IntentMandate."},"AP2IntentResponse":{"properties":{"intent_id":{"type":"string","format":"uuid","title":"Intent Id"},"status":{"type":"string","const":"accepted","title":"Status","default":"accepted"},"expires_at":{"type":"string","title":"Expires At"}},"additionalProperties":false,"type":"object","required":["expires_at"],"title":"AP2IntentResponse"},"AP2PayRequest":{"properties":{"cart_id":{"type":"string","title":"Cart Id"},"mandate":{"$ref":"#/components/schemas/PaymentMandate"}},"additionalProperties":false,"type":"object","required":["cart_id","mandate"],"title":"AP2PayRequest","description":"POST /ap2/pay — agent submits a PaymentMandate with user_authorization."},"AP2PayResponse":{"properties":{"payment_id":{"type":"string","format":"uuid","title":"Payment Id"},"network":{"type":"string","title":"Network"},"receiver":{"type":"string","title":"Receiver"},"amount_microunits":{"type":"integer","title":"Amount Microunits"},"price_token":{"type":"string","title":"Price Token"},"payment_reference":{"type":"string","title":"Payment Reference"},"cart_mandate_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cart Mandate Hash"}},"additionalProperties":false,"type":"object","required":["network","receiver","amount_microunits","price_token","payment_reference"],"title":"AP2PayResponse","description":"x402-style payment challenge returned to the agent.\n\nFor AlgoVoi crypto payments, this echoes the crypto extension data\n(network, receiver, amount_microunits) so the agent can submit an\non-chain transaction. The cart_mandate_hash is the RFC 8785 JCS hash\nof CartContents — the agent MUST include this in the tx note field\nfor on-chain anchoring (enforced by the facilitator verify step)."},"AP2StatusResponse":{"properties":{"cart_id":{"type":"string","title":"Cart Id"},"intent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Intent Id"},"mandate_chain_status":{"type":"string","enum":["intent_accepted","cart_locked","pending_user_confirmation","payment_initiated","confirmed","expired","failed"],"title":"Mandate Chain Status"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network"},"tx_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tx Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","required":["cart_id","mandate_chain_status"],"title":"AP2StatusResponse","description":"GET /ap2/status/{cart_id}"},"Ap2VerifyRequest":{"properties":{"mandate":{"additionalProperties":true,"type":"object","title":"Mandate"},"merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Id"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["mandate"],"title":"Ap2VerifyRequest"},"Ap2VerifyResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["verified"],"title":"Ap2VerifyResponse"},"CancelCheckoutRequest":{"properties":{"cancel_secret":{"type":"string","maxLength":128,"minLength":1,"title":"Cancel Secret"}},"type":"object","required":["cancel_secret"],"title":"CancelCheckoutRequest","description":"Body for POST /checkout/{token}/cancel (gateway-side).\n\nF5 security fix: the cancel endpoint now requires cancel_secret so that\nonly the merchant (who received cancel_secret at link-creation time) can\ncancel a link programmatically. Customers use the in-browser 'abandon'\nflow which navigates them away without touching the backend."},"CartContents":{"properties":{"id":{"type":"string","title":"Id","description":"A unique identifier for this cart."},"user_cart_confirmation_required":{"type":"boolean","title":"User Cart Confirmation Required","description":"If true, the merchant requires the user to confirm the cart before the purchase can be completed."},"payment_request":{"$ref":"#/components/schemas/PaymentRequest","description":"The W3C PaymentRequest object to initiate payment. This contains the items being purchased, prices, and the set of payment methods accepted by the merchant for this cart."},"cart_expiry":{"type":"string","title":"Cart Expiry","description":"When this cart expires, in ISO 8601 format."},"merchant_name":{"type":"string","title":"Merchant Name","description":"The name of the merchant."}},"type":"object","required":["id","user_cart_confirmation_required","payment_request","cart_expiry","merchant_name"],"title":"CartContents","description":"The detailed contents of a cart.\n\nThis object is signed by the merchant to create a CartMandate (the\nsignature travels in CartMandate.merchant_authorization as a base64url JWT).\n\nSpec source: ap2/types/mandate.py"},"CartMandate":{"properties":{"contents":{"$ref":"#/components/schemas/CartContents","description":"The contents of the cart."},"merchant_authorization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Authorization","description":"A base64url-encoded JSON Web Token (JWT) that digitally signs the cart contents. Header: alg + kid. Payload: iss, sub, aud, iat, exp, jti, cart_hash (RFC 8785 JCS hash of CartContents)."}},"type":"object","required":["contents"],"title":"CartMandate","description":"A cart whose contents have been digitally signed by the merchant.\n\nmerchant_authorization is a base64url-encoded JWT (typically RS256) with\nclaims: iss, sub, aud, iat, exp (5-15 min), jti, cart_hash. The cart_hash\nis computed via RFC 8785 JCS over CartContents.\n\nSpec source: ap2/types/mandate.py"},"ChallengeRequest":{"properties":{"resource_id":{"type":"string","title":"Resource Id"}},"type":"object","required":["resource_id"],"title":"ChallengeRequest"},"ChallengeResponse":{"properties":{"resource_id":{"type":"string","title":"Resource Id"},"network":{"type":"string","title":"Network"},"receiver":{"type":"string","title":"Receiver"},"amount_microalgos":{"type":"integer","title":"Amount Microalgos"},"payment_reference":{"type":"string","title":"Payment Reference"},"price_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Token"},"note_binding_required":{"type":"boolean","title":"Note Binding Required","default":false},"note_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Prefix"}},"type":"object","required":["resource_id","network","receiver","amount_microalgos","payment_reference"],"title":"ChallengeResponse"},"CheckoutRequest":{"properties":{"item_name":{"type":"string","maxLength":255,"minLength":1,"title":"Item Name"},"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"}},"type":"object","required":["item_name","amount","currency"],"title":"CheckoutRequest"},"CheckoutVerifyRequest":{"properties":{"tx_id":{"type":"string","maxLength":100,"minLength":10,"title":"Tx Id"},"chain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chain"}},"type":"object","required":["tx_id"],"title":"CheckoutVerifyRequest","description":"Body for POST /checkout/{token}/verify (gateway-side, unauthenticated)."},"CheckoutVerifyResponse":{"properties":{"payment_ledger_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payment Ledger Id"},"status":{"type":"string","title":"Status"},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"}},"type":"object","required":["status"],"title":"CheckoutVerifyResponse","description":"Successful verification response."},"ContactAddress":{"properties":{"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"address_line":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Address Line"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"dependent_locality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dependent Locality"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"sorting_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sorting Code"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","title":"ContactAddress","description":"Subset of W3C ContactAddress used by AP2 for shipping + payer info.\n\nSpec: https://www.w3.org/TR/contact-picker/#contactaddress"},"DynamicPaymentLinkCreate":{"properties":{"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount","description":"Amount in major currency units, e.g. 49.99 for £49.99"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","description":"ISO 4217 currency code, e.g. GBP"},"label":{"type":"string","maxLength":255,"minLength":1,"title":"Label","description":"Item / order description shown on the checkout page"},"preferred_network":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Network","description":"Force a specific network, e.g. 'algorand_mainnet'. Defaults to the tenant's first configured network."},"redirect_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Redirect Url","description":"URL to redirect the buyer to after payment is confirmed"},"expires_in_seconds":{"type":"integer","maximum":86400.0,"minimum":60.0,"title":"Expires In Seconds","description":"Link lifetime in seconds (60–86400). Default: 1800 (30 min).","default":1800}},"type":"object","required":["amount","currency","label"],"title":"DynamicPaymentLinkCreate"},"DynamicPaymentLinkResponse":{"properties":{"id":{"type":"string","title":"Id"},"checkout_url":{"type":"string","title":"Checkout Url"},"amount_microunits":{"type":"integer","title":"Amount Microunits"},"asset_id":{"type":"string","title":"Asset Id"},"chain":{"type":"string","title":"Chain"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","checkout_url","amount_microunits","asset_id","chain","label","expires_at","created_at"],"title":"DynamicPaymentLinkResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntentMandate":{"properties":{"user_cart_confirmation_required":{"type":"boolean","title":"User Cart Confirmation Required","description":"If false, the agent can make purchases on the user's behalf once all purchase conditions have been satisfied. This must be true if the intent mandate is not signed by the user.","default":true},"natural_language_description":{"type":"string","title":"Natural Language Description","description":"The natural language description of the user's intent. This is generated by the shopping agent, and confirmed by the user. The goal is to have informed consent by the user."},"merchants":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Merchants","description":"Merchants allowed to fulfill the intent. If not set, the shopping agent is able to work with any suitable merchant."},"skus":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Skus","description":"A list of specific product SKUs. If not set, any SKU is allowed."},"requires_refundability":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Refundability","description":"If true, items must be refundable.","default":false},"intent_expiry":{"type":"string","title":"Intent Expiry","description":"When the intent mandate expires, in ISO 8601 format."}},"type":"object","required":["natural_language_description","intent_expiry"],"title":"IntentMandate","description":"Represents the user's purchase intent.\n\nFor human-present flows this contains the core shopping bounds. For\nhuman-not-present flows additional fields will be added in future spec\nversions.\n\nSpec source: ap2/types/mandate.py"},"MppChallengeRequest":{"properties":{"resource_id":{"type":"string","title":"Resource Id"},"network":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network"}},"type":"object","required":["resource_id"],"title":"MppChallengeRequest"},"MppChallengeResponse":{"properties":{"challenge":{"additionalProperties":true,"type":"object","title":"Challenge"},"accepts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Accepts"}},"type":"object","required":["challenge","accepts"],"title":"MppChallengeResponse"},"MppVerifyRequest":{"properties":{"tx_id":{"type":"string","title":"Tx Id"},"network":{"type":"string","title":"Network"},"resource_id":{"type":"string","title":"Resource Id"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["tx_id","network","resource_id"],"title":"MppVerifyRequest"},"MppVerifyResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"payer":{"type":"string","title":"Payer","default":""},"amount":{"type":"integer","title":"Amount","default":0},"receipt":{"type":"string","title":"Receipt","default":""},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["verified"],"title":"MppVerifyResponse"},"PaymentCurrencyAmount":{"properties":{"currency":{"type":"string","title":"Currency","description":"Three-letter ISO 4217 currency code."},"value":{"type":"number","title":"Value","description":"The monetary value."}},"type":"object","required":["currency","value"],"title":"PaymentCurrencyAmount","description":"W3C PaymentCurrencyAmount — monetary value with ISO 4217 currency code.\n\nSpec: https://www.w3.org/TR/payment-request/#dom-paymentcurrencyamount"},"PaymentDetailsInit":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the payment request."},"display_items":{"items":{"$ref":"#/components/schemas/PaymentItem"},"type":"array","title":"Display Items","description":"Items displayed to the user."},"shipping_options":{"anyOf":[{"items":{"$ref":"#/components/schemas/PaymentShippingOption"},"type":"array"},{"type":"null"}],"title":"Shipping Options"},"modifiers":{"anyOf":[{"items":{"$ref":"#/components/schemas/PaymentDetailsModifier"},"type":"array"},{"type":"null"}],"title":"Modifiers"},"total":{"$ref":"#/components/schemas/PaymentItem","description":"The total payment amount."}},"type":"object","required":["id","display_items","total"],"title":"PaymentDetailsInit","description":"W3C PaymentDetailsInit — the details of the payment being requested.\n\nSpec: https://www.w3.org/TR/payment-request/#dom-paymentdetailsinit"},"PaymentDetailsModifier":{"properties":{"supported_methods":{"type":"string","title":"Supported Methods","description":"The payment method ID that this modifier applies to."},"total":{"anyOf":[{"$ref":"#/components/schemas/PaymentItem"},{"type":"null"}],"description":"Overrides the original item total."},"additional_display_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/PaymentItem"},"type":"array"},{"type":"null"}],"title":"Additional Display Items"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["supported_methods"],"title":"PaymentDetailsModifier","description":"W3C PaymentDetailsModifier — method-specific price adjustments.\n\nSpec: https://www.w3.org/TR/payment-request/#dom-paymentdetailsmodifier"},"PaymentItem":{"properties":{"label":{"type":"string","title":"Label","description":"Human-readable description of the item."},"amount":{"$ref":"#/components/schemas/PaymentCurrencyAmount","description":"The monetary amount of the item."},"pending":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pending","description":"If true, the amount is not final."},"refund_period":{"type":"integer","title":"Refund Period","description":"The refund duration for this item, in days.","default":30}},"type":"object","required":["label","amount"],"title":"PaymentItem","description":"W3C PaymentItem — an item for purchase and its price.\n\nSpec: https://www.w3.org/TR/payment-request/#dom-paymentitem"},"PaymentMandate":{"properties":{"payment_mandate_contents":{"$ref":"#/components/schemas/PaymentMandateContents","description":"The data contents of the payment mandate."},"user_authorization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Authorization","description":"Base64url-encoded SD-JWT-VC verifiable presentation binding the user's consent to the CartMandate + PaymentMandateContents hashes via a key-binding JWT's transaction_data claim."}},"type":"object","required":["payment_mandate_contents"],"title":"PaymentMandate","description":"User's instructions and authorization for payment.\n\nuser_authorization is a base64url-encoded SD-JWT-VC (Selective Disclosure\nVerifiable Credential) containing an issuer-signed JWT authorizing a 'cnf'\nclaim and a key-binding JWT with transaction_data including the hashes of\nCartMandate and PaymentMandateContents (RFC 8785 JCS).\n\nSpec source: ap2/types/mandate.py"},"PaymentMandateContents":{"properties":{"payment_mandate_id":{"type":"string","title":"Payment Mandate Id","description":"Unique identifier for this payment mandate."},"payment_details_id":{"type":"string","title":"Payment Details Id","description":"Unique identifier for the payment request."},"payment_details_total":{"$ref":"#/components/schemas/PaymentItem","description":"The total payment amount."},"payment_response":{"$ref":"#/components/schemas/PaymentResponse","description":"The payment response containing details of the chosen payment method."},"merchant_agent":{"type":"string","title":"Merchant Agent","description":"Identifier for the merchant."},"timestamp":{"type":"string","title":"Timestamp","description":"Creation time of the mandate, in ISO 8601 format."}},"type":"object","required":["payment_mandate_id","payment_details_id","payment_details_total","payment_response","merchant_agent"],"title":"PaymentMandateContents","description":"The data contents of a PaymentMandate.\n\nSpec source: ap2/types/mandate.py"},"PaymentMethodData":{"properties":{"supported_methods":{"type":"string","title":"Supported Methods","description":"A string identifying the payment method."},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data","description":"Payment method specific details."}},"type":"object","required":["supported_methods"],"title":"PaymentMethodData","description":"W3C PaymentMethodData — identifies a payment method and method-specific data.\n\nFor AlgoVoi crypto payments, `supported_methods` is set to the AlgoVoi\ncrypto extension URI (https://algovoi.io/ap2/extensions/crypto-algo/v1)\nand `data` contains the CryptoPaymentDetails struct (see ap2_ext_crypto.py).\n\nSpec: https://www.w3.org/TR/payment-request/#dom-paymentmethoddata"},"PaymentOptions":{"properties":{"request_payer_name":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Request Payer Name","default":false},"request_payer_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Request Payer Email","default":false},"request_payer_phone":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Request Payer Phone","default":false},"request_shipping":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Request Shipping","default":true},"shipping_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipping Type","description":"`shipping`, `delivery`, or `pickup`."}},"type":"object","title":"PaymentOptions","description":"W3C PaymentOptions — which payer details to collect.\n\nSpec: https://www.w3.org/TR/payment-request/#dom-paymentoptions"},"PaymentRequest":{"properties":{"method_data":{"items":{"$ref":"#/components/schemas/PaymentMethodData"},"type":"array","title":"Method Data","description":"Supported payment methods."},"details":{"$ref":"#/components/schemas/PaymentDetailsInit","description":"Financial details of the transaction."},"options":{"anyOf":[{"$ref":"#/components/schemas/PaymentOptions"},{"type":"null"}]},"shipping_address":{"anyOf":[{"$ref":"#/components/schemas/ContactAddress"},{"type":"null"}]}},"type":"object","required":["method_data","details"],"title":"PaymentRequest","description":"W3C PaymentRequest — the top-level request for payment.\n\nSpec: https://www.w3.org/TR/payment-request/#paymentrequest-interface"},"PaymentResponse":{"properties":{"request_id":{"type":"string","title":"Request Id","description":"Unique ID from the original PaymentRequest."},"method_name":{"type":"string","title":"Method Name","description":"The payment method chosen by the user."},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details","description":"Payment-method-specific transaction data."},"shipping_address":{"anyOf":[{"$ref":"#/components/schemas/ContactAddress"},{"type":"null"}]},"shipping_option":{"anyOf":[{"$ref":"#/components/schemas/PaymentShippingOption"},{"type":"null"}]},"payer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Name"},"payer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Email"},"payer_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Phone"}},"type":"object","required":["request_id","method_name"],"title":"PaymentResponse","description":"W3C PaymentResponse — user's chosen payment method + approval.\n\nFor AlgoVoi crypto payments, `details` contains a CryptoPaymentResponse\nstruct (see ap2_ext_crypto.py) with tx_id, network, and note field.\n\nSpec: https://www.w3.org/TR/payment-request/#paymentresponse-interface"},"PaymentShippingOption":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the shipping option."},"label":{"type":"string","title":"Label","description":"Human-readable description."},"amount":{"$ref":"#/components/schemas/PaymentCurrencyAmount","description":"Cost of this shipping option."},"selected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Selected","description":"If true, the default option.","default":false}},"type":"object","required":["id","label","amount"],"title":"PaymentShippingOption","description":"W3C PaymentShippingOption.\n\nSpec: https://www.w3.org/TR/payment-request/#dom-paymentshippingoption"},"ResourceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"resource_id":{"type":"string","title":"Resource Id"},"networks":{"items":{"type":"string"},"type":"array","title":"Networks"},"amount_microunits":{"type":"integer","title":"Amount Microunits"},"asset_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Asset Id"},"access_ttl_secs":{"type":"integer","title":"Access Ttl Secs"},"requirement_ttl_secs":{"type":"integer","title":"Requirement Ttl Secs"},"note_binding_required":{"type":"boolean","title":"Note Binding Required"},"is_active":{"type":"boolean","title":"Is Active"},"price_microalgos":{"type":"integer","title":"Price Microalgos","default":1000000},"payment_network":{"type":"string","title":"Payment Network","default":"algorand_mainnet"},"price_fiat_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Fiat Cents"},"price_fiat_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Fiat Currency"}},"type":"object","required":["id","resource_id","networks","amount_microunits","access_ttl_secs","requirement_ttl_secs","note_binding_required","is_active"],"title":"ResourceResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyRequest":{"properties":{"resource_id":{"type":"string","title":"Resource Id"},"network":{"type":"string","title":"Network"},"tx_id":{"type":"string","title":"Tx Id"},"price_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Token"}},"type":"object","required":["resource_id","network","tx_id"],"title":"VerifyRequest"},"VerifyResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}},"type":"object","required":["verified"],"title":"VerifyResponse"}}},"x-discovery":{"ownershipProofs":["fd75bc4d17a00345263e8d20022b6ccc6e1b7b00d752531f82998f8ea66533fb"]}}