DocsUnderstand

Poppy to Beckn mapping

How each Poppy call becomes Beckn.

2 min readEdit on GitHub

Haat is a Poppy Company (draft 0.3) and a Beckn BAP (buyer app) at the same time.

Poppy (Personal Agent side)Haat doesBeckn / ONDC (seller side)
GET /.well-known/poppy.jsonPublishes channels and the operations extension—
Poppy-Session header on every requestVerifies (5.3); maps sid to Session state and sub to the UserNever forwarded
GET /api/v1/search?q=…Lexicon parse, one search per itemsearch via the gateway; many on_search callbacks collected for a short window
POST /api/v1/orders (no approval)Builds a quoteselect → on_select (price, stock), init → on_init (delivery, payment terms)
403 approval_required + operationsummary from the seller's own quote; terms as JSON—
POST /api/v1/orders + Poppy-ApprovalChecks Session, revision, expiry and cart fingerprintconfirm → on_confirm, once
GET /api/v1/orders/{id}Owner check by Userstatus → on_status
POST /api/v1/orders/{id}/cancelSeparate operation and approvalcancel → on_cancel
Conversation message with operationSame gate as the API, owned by the conversationas above
Conversation message with approvalPerforms the conversation's operationconfirm

#Identity on each side

flowchart LR
  subgraph Poppy
    PA[Personal agent<br/>client_id URL + JWKS] -- Session JWT signed by<br/>a delegated key --> H
  end
  H[Haat] -- Authorization: Signature<br/>Ed25519, BLAKE2b-512 digest --> S
  subgraph ONDC
    R[(Registry<br/>keys + URLs)]
    S[Seller BPP]
  end
  H -. lookup seller keys and URL .-> R
  S -. lookup Haat key .-> R
  • The agent's keys never reach sellers, and Haat's Beckn key never reaches agents.
  • A seller's URL always comes from the registry, never from the agent's request.
  • Sellers call back only to the bap_uri the registry lists for Haat.

#Signed in and signed out

Signed out (Session header only)Signed in (Session header + access token)
Orders belong tothe User ID at this agentthe account, across Sessions and agents
Operations belong tothe Sessionthe account (Operations section 3)
Delivery addresssent in each ordersent, or a saved delivery_address_id
Conversationsthe agent + User IDthe account, once it used the account (8.2)

Guest orders a User placed through an agent move to the account the first time that User signs in through it.

#Payment

v0.1 uses ON-FULFILLMENT payment collected by the seller (cash or UPI on delivery). The agent and Haat never hold money. The approval summary states the amount and the payment method before anything is ordered. Prepaid flows are on the roadmap and need ONDC's settlement rules to be checked first (going live).