Docs · Flows
Flows
Sign-in, a payment and every agent protocol, step by step.
Every flow below is a numbered sequence diagram with the same steps written out underneath. Sign-in is in the OpenAPI contract. The payment flow, the protocol flows and the connectors are designed and marked that way.
Sign-in
Steps in text
- Your service: Sign a client assertion (JWT, RS256) with your registered private key. Audience: the token endpoint.
- Your service to insimbi API: POST /oauth2/token with grant_type, client_id, client_assertion and optional scope
- insimbi API: Verify the signature against your registered key, reject replays, check your credential, grants and scopes
- insimbi API to Audit record: Record token.issued (or security.rejected)
- insimbi API to Your service: 200: access_token, token_type Bearer, expires_in (60 s at most), scope
- Your service to insimbi API: GET /v1/merchant-accounts/{id} with Authorization: Bearer
- insimbi API to Audit record: Record the access decision: authorization.allowed or authorization.denied
- Audit record to insimbi API: Decision captured
- insimbi API to Your service: 200 merchant account, or 403 insufficient_authority. X-Request-ID on every response.
A payment
Designed. Payment endpoints are designed. Every check in this flow is written to the record.
Steps in text
- Your app or agent to insimbi API: POST /v1/payments with an Idempotency-Key
- insimbi API: Authenticate the token and record the access decision
- insimbi API to Rules and mandate check: Check the payment against your rules and the agent's mandate
- Rules and mandate check to Operator: Above your threshold: propose for approval
- Operator to Rules and mandate check: A person approves
- Rules and mandate check to insimbi API: Allowed. The routing rule chooses the rail.
- insimbi API to Rail: Submit on the chosen rail
- Rail to insimbi API: Rail result
- insimbi API to Record: Write the ledger entry, fee lines cited to rules, and the ticket
- insimbi API to Your app or agent: 201 with the ticket id
- insimbi API to Your app or agent: Event delivered to your webhook endpoint
Agent protocols
Designed. Protocol support is designed. Each flow follows the protocol's published specification, with insimbi on the merchant side.
Steps in text
- Client (agent) to Merchant API: Request a resource
- Merchant API to insimbi: Price it and check your rules for which assets and networks to accept
- Merchant API to Client (agent): 402 Payment Required with a PAYMENT-REQUIRED header
- Client (agent) to Merchant API: Retry with a signed payment in the PAYMENT-SIGNATURE header
- Merchant API to insimbi: Check the payment against your rules and the agent's mandate
- insimbi to Facilitator (regulated partner): POST /verify
- Facilitator (regulated partner) to insimbi: Verification result (isValid, payer)
- insimbi to Merchant API: Allowed
- Merchant API: Perform the work
- Merchant API to insimbi: Settle
- insimbi to Facilitator (regulated partner): POST /settle
- Facilitator (regulated partner) to insimbi: Settlement result (success, transaction, network)
- insimbi: Write the ledger entry and fee lines to the record
- Merchant API to Client (agent): Return the resource with a PAYMENT-RESPONSE header
Steps in text
- User (trusted surface) to Shopping agent: Give the agent a shopping task
- Shopping agent to Merchant: Build a cart
- Merchant to Shopping agent: Cart, signed by the merchant
- Shopping agent to Credentials provider and network: Ask for an applicable payment method
- Shopping agent to User (trusted surface): Show the cart and payment method
- User (trusted surface) to Shopping agent: Approve: a signed Checkout Mandate
- Shopping agent to Merchant: Submit the order with the Checkout Mandate and Payment Mandate
- Merchant to insimbi: Authorize the payment
- insimbi: Check the mandates against your rules, choose the rail
- insimbi to Credentials provider and network: Authorization, with agent presence signals
- Credentials provider and network to insimbi: Approved (or a challenge such as 3-D Secure)
- insimbi to Merchant: Result, written to the record
- Merchant to User (trusted surface): Order confirmed
Steps in text
- Agent to Merchant: POST /checkout_sessions (line items, currency)
- Merchant to Agent: 201 with the authoritative cart, totals and fulfilment options
- Agent to Merchant: POST /checkout_sessions/{id} to update choices
- Agent to Delegated payment provider: POST /agentic_commerce/delegate_payment with an allowance
- Delegated payment provider to Agent: Delegated token id
- Agent to Merchant: POST /checkout_sessions/{id}/complete with payment_data
- Merchant to insimbi: Charge the delegated token
- insimbi: Check your rules and the allowance, choose the rail
- insimbi to Delegated payment provider: Redeem the token within its allowance
- Delegated payment provider to insimbi: Result
- insimbi to Merchant: Result, written to the record
- Merchant to Agent: Completed checkout and order
Steps in text
- Client (agent) to Merchant API: Request a resource
- Merchant API to insimbi: Price it and pick the payment methods your rules allow
- Merchant API to Client (agent): 402 Payment Required with WWW-Authenticate: Payment (the Challenge)
- Client (agent) to Payment method (rail or regulated partner): Pay with the method the Challenge names
- Client (agent) to Merchant API: Retry with Authorization: Payment (the Credential)
- Merchant API to insimbi: Verify the Credential is bound to the original Challenge
- insimbi to Payment method (rail or regulated partner): Confirm the payment
- Payment method (rail or regulated partner) to insimbi: Confirmed
- insimbi: Write the ledger entry and fee lines to the record
- Merchant API to Client (agent): 200 with a Payment-Receipt header
Steps in text
- Platform (agent) to Business: GET /.well-known/ucp
- Business to Platform (agent): Profile: version, services, capabilities, payment handlers
- Platform (agent) to Business: Create checkout
- Business to Platform (agent): Checkout, advertising the payment handlers it accepts
- Platform (agent) to Payment handler: Execute the handler to get a token or credential
- Payment handler to Platform (agent): Token
- Platform (agent) to Business: Complete checkout with the token
- Business to insimbi: Authorize
- insimbi: Check your rules, choose the rail, write the record
- insimbi to Business: Result (or a challenge for strong authentication)
- Business to Platform (agent): Checkout completed
Steps in text
- Agent to Visa: Enrol the card: an agent-specific token, cardholder step-up and a passkey
- Agent to User: Recommend a purchase and ask to make it
- User to Agent: Authenticate the payment instruction with the passkey
- Agent to Visa: Submit the instruction and request payment credentials
- Visa to Agent: Credentials that match the instruction
- Agent to Merchant: Check out with the agent token
- Merchant to insimbi: Authorize
- insimbi to Visa: Authorization through the network, which checks merchant and amount against the instruction
- Visa to insimbi: Result
- insimbi to Merchant: Result, written to the record
- Agent to Visa: Share the purchase outcome as commerce signals
Steps in text
- Agent: Sign the request: Signature-Input and Signature over the authority and path, with created time, nonce and keyid
- Agent to Merchant edge: Request the page or checkout with the signature headers
- Merchant edge to Agent key directory: Fetch the public key for the keyid
- Agent key directory to Merchant edge: Public key
- Merchant edge: Verify the signature, the domain and path, the time window and the nonce
- Merchant edge to insimbi: Pay, with the verified agent attached
- insimbi: Record the agent verification with the payment
- insimbi to Merchant edge: Result
Steps in text
- Agent to Mastercard: Register and verify the agent
- Consumer to Mastercard: Set what the agent may buy; an Agentic Token is issued
- Consumer to Agent: Authenticate, for example with on-device biometrics
- Agent to Merchant: Pay with the Agentic Token
- Merchant to insimbi: Authorize
- insimbi to Mastercard: Authorization through the network, identified as agent-initiated
- Mastercard to insimbi: Result
- insimbi to Merchant: Result, written to the record
Steps in text
- Agent (MCP client) to insimbi MCP server: tools/list
- insimbi MCP server to Agent (MCP client): quote_ticket, explain_decision, get_rule, open_mandate
- Agent (MCP client) to insimbi MCP server: tools/call quote_ticket
- insimbi MCP server to insimbi API and record: Price the payment against your rules. Nothing is submitted.
- insimbi API and record to Agent (MCP client): Fee lines with rule citations and the perimeter decision
- Agent (MCP client) to insimbi MCP server: tools/call open_mandate
- insimbi MCP server to insimbi API and record: Propose the change (approval.proposed)
- insimbi API and record to Operator: Ask a person to approve
- Operator to insimbi API and record: Approve (approval.approved), bound to that exact change
- insimbi API and record to Agent (MCP client): Mandate granted
Connectors
Designed. Connectors are designed. Each one maps a partner's API to an insimbi rail or worker, and every call it makes is written to the record.
| Event-contract venues | Order entry, cancels, fills, positions, settlements and balances, read back into the record for reconciliation and cutoffs. |
|---|---|
| Stablecoin settlement | Verify and settle agent payments through regulated partners, with each settlement matched to its ledger entry. |
| Connected-account platforms | Onboard sub-merchants, split payments, transfers and payouts, with webhooks reconciled against the record. |
| Edge and bot verification | Signed agent requests verified at the edge, and pay-per-request access with the charge recorded per request. |
insimbi is in early access with design partners.