Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Provider API (OpenAPI)

The orchestrator does not hold your catalog, prices, tax rules or payments. It calls your services for them. This page describes the HTTP API those services expose to the orchestrator.

Spec: openapi.yaml (OpenAPI 3.1). Load it into your API tooling, generate server stubs from it, or validate your service’s responses against it.

Services

Each service has its own base URL, set in the orchestrator’s configuration. The paths in the spec are appended to that base URL.

ServiceBase URL settingEndpointsRequired
CatalogCATALOG_BASE_URLGET /items/{item_id}, POST /catalog/lookup, POST /catalog/searchYes
PricingPRICING_BASE_URLPOST /prices/resolve, POST /discounts/resolveYes
TaxTAX_BASE_URLPOST /tax/resolveYes
GeoGEO_BASE_URLPOST /geo/checkYes
PaymentPAYMENT_BASE_URLPOST /authorize, /capture, /void, /refund, GET /state/{transaction_id}Yes
ReceiptRECEIPT_BASE_URLPOST /receipts/generateYes
FulfillmentFULFILLMENT_BASE_URLPOST /fulfillment/quoteNo: built-in rates are used without it
Payment delegationPAYMENT_DELEGATION_BASE_URLPOST /delegate_paymentNo: ACP delegated payment returns 501 without it
Identity linkingIDENTITY_LINK_BASE_URLPOST /identity/linkNo: UCP identity linking is not advertised without it
3DS2 step-up (payment)PAYMENT_BASE_URL + PAYMENT_AUTHENTICATION_ENABLED=trueauthentication_required on POST /authorize, GET /authentication/{id}, POST /authentication/{id}/authorizeNo: without it 3DS2 is not advertised and a step-up answer is a decline
sequenceDiagram
    participant O as Orchestrator
    participant C as Catalog
    participant Pr as Pricing
    participant T as Tax
    participant G as Geo
    participant Pa as Payment
    participant R as Receipt

    Note over O: Agent adds an item
    O->>C: GET /items/{item_id}
    O->>Pr: POST /prices/resolve
    O->>T: POST /tax/resolve
    O->>Pr: POST /discounts/resolve (only with codes)
    O->>G: POST /geo/check
    Note over O: Agent checks out
    O->>Pr: POST /prices/resolve
    O->>T: POST /tax/resolve
    O->>Pr: POST /discounts/resolve (only with codes)
    O->>G: POST /geo/check
    O->>Pa: POST /authorize (Idempotency-Key)
    O->>Pa: POST /capture (Idempotency-Key)
    O->>R: POST /receipts/generate

Rules every provider should follow

  • Money is an integer in minor units (cents for USD), never a float.
  • Honour Idempotency-Key on authorize, capture, void, refund and delegate payment. A repeat with the same key must return the first outcome without moving money again. The orchestrator relies on this to retry safely.
  • Answer non-2xx for failures. Any non-2xx response fails that step. Transient statuses (408, 425, 429, 500, 502, 503, 504) are retried for GETs and idempotency-keyed requests, honouring Retry-After up to 30 seconds.
  • Ignore fields you do not need. The orchestrator sends its full cart projection; new optional fields can appear in later versions.

How the spec stays accurate

crates/integration-adapters/tests/openapi_spec_test.rs runs in CI. It answers the real adapters with the spec’s own response examples, then checks that every request they sent goes to a documented path, carries the headers the spec requires, and validates against the documented request schema. Request schemas reject unknown fields, so a field added to the wire without updating the spec fails the build.

For the same contracts as tables, with notes on each endpoint’s behaviour, see plug and deploy.