Commerce Studio · B2B extensions for UCP

ai.commercestudio.b2b.terms

Draft, version 2026-10-19. Extends dev.ucp.shopping.checkout (UCP 2026-08-25). Schema: https://b2b.commercestudio.ai/ucp/schemas/terms.json.

Most B2B orders aren't paid at checkout. They're invoiced on account under payment terms such as Net 30, against a credit limit, and quote the buyer's purchase order (PO) number.

UCP already models the terms themselves, in dev.ucp.common.payment.terms. This extension adds what that one doesn't carry: how much credit the account has left, and whether a PO number is required. With those, an agent can tell a buyer before they commit that an order won't go through, and why.

How it fits with standard UCP

Concern Carried by
The term itself (Net 30, due date, amount) dev.ucp.common.payment.terms: one term, one deferred schedule for the checkout total, due_at N days after the order
Paying by purchase order The ai.commercestudio.b2b.purchase_order payment handler (see purchase-order-handler)
Credit position and PO requirement This extension: b2b_terms

An agent can negotiate the terms extension without this one. It still pays on account, but it learns about a credit problem only as an error message.

Response field: b2b_terms

Present on every checkout when the extension is negotiated.

Field Meaning
credit_limit The account's credit limit, in minor units
credit_available Credit left: the limit minus orders already on account and not yet paid
po_number_required true if Complete Checkout must carry a PO number
po_number The PO number on this checkout, once submitted

Rules

Messages

Code Type When
insufficient_credit error (requires_buyer_input) The total is over credit_available
missing error (recoverable) No PO number, and one is required
payment_term_changed warning The agent selected a term the account doesn't have

Callisto on BigCommerce