clearddocs
cleard.ai ↗
API reference Purchases
Markdown ↗

Purchases

Enroll funding authority, register a purchase and reconcile its actual routed payment.

Merchant enrollment#

POST /programs/{program}/merchants creates funding authorization and a merchant wallet link. The policy includes explicit registrar, gross rounding, rolling/recovery rates, caps, upfront minimum, purchase/exposure limits, decision/recovery windows and release rule. The merchant signs the personal-sign enrollment payload and confirms its exact onchain enroll transaction through /enrollment.

Protected checkout#

POST /programs/{program}/purchases binds merchant_id, order_id, beneficiary, integer token base-unit amount, claim_window and covered reason. claim_window starts at creation, not payment: paying on day five of a seven-day window leaves two days to claim. The signed commitment freezes purchase eligibility and funding policy separately from the BLISK root. /activate registers those exact terms through the merchant-authorized registrar; it does not pay for the buyer.

Buyer payment#

The buyer’s wallet approves the exact USDC allowance and calls pay. Payment settles atomically. Reserve mode applies the agreed withholding; direct-wallet mode sends the full amount to the merchant with zero withholding. Routing verifies payment and is distinct from escrow. /reconcile verifies the confirmed receipt and every related recovery log. The snapshot’s payment_allocation reports gross, merchant_net, captured and recovered amounts. Keep its exact transaction hash; never resend an uncertain payment as a new intent.

GET /programs/{program}/purchases/{id} returns fresh approval, paid, outstanding, reserve and chain totals. A cached SDK step is not a current balance. Refresh the purchase after a collection retry or reserve recovery.

Routing OpenAPIMerchant, purchase, enrollment, activation and reconciliation schemas. Funding semanticsExact rounding, caps and source boundaries.
Cleard · Commercial relationships for open commerce.Docs / Purchases

Searches these docs locally. Use Tab to choose a result.