@integraledger/lcp/ucp
UCP checkouts and bookings, and five pairings, each of which carries the ATR hash and link as one `links[]` entry of type `legal_context` in the checkout response.
For AI agents: this page as Markdown, and llms.txt, the index of every page.
UCP checkouts and bookings, and five pairings, each of which carries the ATR hash and link as one links[] entry of
type legal_context in the checkout response.
The ap2-mandate pairings read the hash from the checkout JWT presented beside the buyer's checkout mandate, after
AP2's checkout_hash check, the mandate presented alone or last in AP2's chain after the open mandate;
ucp/checkout/agent-signed reads it from the legal_context member of the platform's signed request, once the
request's Content-Digest matches its body; the unsigned pairings have nothing signed to read. Nothing here takes
a key, signs, or verifies a signature, a cnf delegation or a link between chained mandates.
Interfaces
AgentSignedPresented
The platform's signed request as the business received it: its body, as text, and its Content-Digest value.
Properties
| Property | Type |
|---|---|
body | string |
contentDigest | string |
AgentSignedUnsigned
The member the platform writes into the request that completes the checkout, before it signs the request.
Properties
| Property | Type |
|---|---|
legal_context | object |
legal_context.type | "sha256" |
legal_context.value | `0x${string}` |
UcpBinding
The shape of a UCP pairing: its id, data, binding record and codec, over the checkout or booking option O.
Type Parameters
| Type Parameter |
|---|
Id extends string |
O extends Option |
Properties
| Property | Type |
|---|---|
claims | boolean |
data | PairingData |
id | Id |
pattern | LcpPattern |
Methods
advertise()
advertise(
doc,h,link,offer,agreementUrl?):Refusal|Checkout
Parameters
| Parameter | Type |
|---|---|
doc | Checkout |
h | `0x${string}` |
link | string |
offer | O |
agreementUrl? | string |
Returns
bound()
bound(
presented):Promise<Refusal|`0x${string}`>
Parameters
| Parameter | Type |
|---|---|
presented | unknown |
Returns
Promise<Refusal | `0x${string}`>
broadcaster()
broadcaster(
presented):Promise<Refusal|Broadcaster>
Who broadcasts what the payer presents: the seller, which completes the payment ("payee").
Parameters
| Parameter | Type |
|---|---|
presented | unknown |
Returns
Promise<Refusal | Broadcaster>
build()
Parameters
| Parameter | Type |
|---|---|
offer | UcpOffer |
h | `0x${string}` |
Returns
read()
read(
doc):Refusal| {agreement?:string;h:`0x${string}`;link:string;offer:UcpOffer; }
Parameters
| Parameter | Type |
|---|---|
doc | Checkout |
Returns
Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: UcpOffer; }
tie()
tie(
options): ["ucp", {options: readonlyO[]; }]
Parameters
| Parameter | Type |
|---|---|
options | readonly O[] |
Returns
["ucp", { options: readonly O[]; }]
unplaced()
unplaced(
option):Refusal|O
Parameters
| Parameter | Type |
|---|---|
option | O |
Returns
Refusal | O
UcpOffer
The offer a UCP pairing's read gives, and the buyer's input to its build: the checkout the business returned,
carrying the legal_context link.
Properties
| Property | Type |
|---|---|
checkout | Checkout |
Unsigned
The checkout as the business signed it, and the claims the buyer's checkout mandate carries for it: the checkout JWT
(checkoutJwt) and its hash. complete takes the signed mandate and returns it beside that JWT.
Properties
| Property | Type |
|---|---|
checkout | Checkout |
content | object |
content.checkout_hash | string |
content.checkout_jwt | string |
content.vct | "mandate.checkout.1" |
Methods
complete()
Parameters
| Parameter | Type |
|---|---|
checkout_mandate | string |
Returns
Type Aliases
BookingOption
BookingOption =
object
A booking session's own id, 1–256 characters.
Properties
| Property | Type |
|---|---|
booking | string |
Checkout
Checkout =
object&object
Type Declaration
| Name | Type |
|---|---|
ap2? | object & object |
id | string |
links? | Link[] |
CheckoutOption
CheckoutOption =
object
A checkout's own id, 1–256 characters.
Properties
| Property | Type |
|---|---|
checkout | string |
Link
Link =
object
Properties
| Property | Type |
|---|---|
title? | string |
type | string |
url | string |
Option
Option =
CheckoutOption|BookingOption
Variables
agentSigned
constagentSigned:Readonly<{advertise: (doc,h,link,offer,agreementUrl?) =>Refusal|Checkout;bound: (presented) =>Promise<Refusal|`0x${string}`>;broadcaster: (presented) =>Promise<Refusal|Broadcaster>;build: (offer,h) =>Promise<Refusal|AgentSignedUnsigned>;claims:boolean;data:PairingData;id:"ucp/checkout/agent-signed";pattern:LcpPattern;read: (doc) =>Refusal| {agreement?:string;h:`0x${string}`;link:string;offer:UcpOffer; };tie: (options) => ["ucp", {options: readonlyCheckoutOption[]; }];unplaced: (option) =>Refusal|CheckoutOption; }>
ucp/checkout/agent-signed. The payee broadcasts (broadcaster answers "payee"): the business's payment handler
executes the payment the signed request completes; nothing here reads it. A value that is not an object gets
ucp/request-malformed, as bound refuses it.
ap2Mandate
constap2Mandate:UcpBinding<"ucp/checkout/ap2-mandate",CheckoutOption>
ucp/checkout/ap2-mandate. The payee broadcasts (broadcaster answers "payee"): the business's payment handler
executes the payment the buyer's checkout mandate authorizes; nothing here reads it. A value that is not a JSON
object gets ap2/mandate-malformed, as bound refuses it.
bookingAp2Mandate
constbookingAp2Mandate:UcpBinding<"ucp/booking/ap2-mandate",BookingOption>
ucp/booking/ap2-mandate. The payee broadcasts (broadcaster answers "payee"): the business's payment handler
executes the payment the buyer's checkout mandate authorizes; nothing here reads it. A value that is not a JSON
object gets ap2/mandate-malformed, as bound refuses it.
bookingUnsigned
constbookingUnsigned:UcpBinding<"ucp/booking/unsigned",BookingOption>
ucp/booking/unsigned. The payee broadcasts (broadcaster answers "payee"): the business's payment handler
executes the payment the booking completed; nothing here reads it.
issuedDigest
constissuedDigest: typeofdigestJson=digestJson
The option digest the issuer keeps: SHA-256 over the RFC 8785 form.
LINK_TYPE
constLINK_TYPE:"legal_context"="legal_context"
unsigned
constunsigned:UcpBinding<"ucp/checkout/unsigned",CheckoutOption> &object
ucp/checkout/unsigned. The payee broadcasts (broadcaster answers "payee"): the business's payment handler
executes the payment the checkout completed; nothing here reads it. reference names the charge by the seller's own
reference for it.
Type Declaration
Functions
checkoutJwt()
checkoutJwt(
c):string|Refusal
The checkout JWT a buyer's checkout mandate commits to, for a checkout the business signed: its detached
ap2.merchant_authorization with the payload reinserted, header.payload.signature, the payload being the base64url
of the RFC 8785 form of the checkout without its ap2 member, the bytes that signature covers (UCP 2026-08-25, the
AP2 Mandates extension, Business Authorization). UCP does not say which bytes are the checkout JWT; this is the
second of the two readings its open issue 905 sets out, and the profile states it as provisional. A checkout with no
ap2.merchant_authorization of the form header..signature is ucp/ap2-not-active; one with no RFC 8785 form is
ucp/checkout-malformed. No signature is verified.
Parameters
| Parameter | Type |
|---|---|
c | Checkout |
Returns
string | Refusal
legalContextLink()
legalContextLink(
c):Refusal| {h:`0x${string}`;link:string; }
The hash and link of the checkout's one legal_context link. Nothing else of the checkout is read.
Parameters
| Parameter | Type |
|---|---|
c | Checkout |
Returns
Refusal | { h: `0x${string}`; link: string; }
tie()
tie<
O>(options): ["ucp", {options: readonlyO[]; }]
The binding slot: the checkouts or bookings this ATR was minted for, each by its own id.
Type Parameters
| Type Parameter |
|---|
O extends Option |
Parameters
| Parameter | Type |
|---|---|
options | readonly O[] |
Returns
["ucp", { options: readonly O[]; }]
References
Broadcaster
Re-exports Broadcaster
ChargePresented
Re-exports ChargePresented
ChargeRef
Re-exports ChargeRef
Last updated on
@integraledger/lcp/tvm
TON: the pairing `x402/exact/tvm`. The ATR hash rides in the scheme's `extra.forwardPayload` as a TEP-74 text comment holding its LCP string.
@integraledger/lcp/x402
x402 v2 documents, the request commitment, and the x402 pairings on eip155 chains: `exact` over EIP-3009, Permit2 and ERC-7710 (with its salt level), `upto` over Permit2, `auth-capture` over EIP-3009 and Permit2, and `exact` in Circle Gateway's batched domain.