Skip to content
Integra Protocol
API

@integraledger/lcp/acp

ACP checkout sessions and delegate-payment allowances, and the pairings `acp/checkout/delegated` and `acp/checkout/undelegated`: the ATR hash as the checkout session's `id`.

For AI agents: this page as Markdown, and llms.txt, the index of every page.

ACP checkout sessions and delegate-payment allowances, and the pairings acp/checkout/delegated and acp/checkout/undelegated: the ATR hash as the checkout session's id.

The link rides beside it in the session's metadata.legal_context, and, where the handler requires delegate_payment, the hash is also the allowance's checkout_session_id. Pure; no I/O. Nothing here signs or verifies a signature.

Interfaces

AcpBinding

The shape of an ACP pairing: its id, data, binding record and codec.

Type Parameters

Type Parameter
Id extends string

Properties

PropertyType
claimsboolean
dataPairingData
idId
patternLcpPattern
tie(options) => ["acp", { options: readonly HandlerOption[]; }]

Methods

advertise(doc, h, link, offer, agreementUrl?): Refusal | Session

Parameters
ParameterType
docSession
h`0x${string}`
linkstring
offerHandlerOption
agreementUrl?string
Returns

Refusal | Session

bound()

bound(presented): Promise<Refusal | `0x${string}`>

Parameters
ParameterType
presentedunknown
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
ParameterType
presentedunknown
Returns

Promise<Refusal | Broadcaster>

build()

build(choice, h): Promise<Refusal | Unsigned>

Parameters
ParameterType
choiceAcpChoice
h`0x${string}`
Returns

Promise<Refusal | Unsigned>

read()

read(doc): Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { session: Session; }; }

Parameters
ParameterType
docSession
Returns

Refusal | { agreement?: string; h: `0x${string}`; link: string; offer: { session: Session; }; }

unplaced()

unplaced(option): Refusal | HandlerOption

Parameters
ParameterType
optionHandlerOption
Returns

Refusal | HandlerOption


AcpChoice

The buyer's own values for the allowance, and the session it pays.

Properties

PropertyType
currencystring
expires_atstring
max_amountnumber
merchant_idstring
sessionSession

ChargePresented

What the seller presents of a charge: its own reference for it, the processor's identifier of the payment.

Properties

PropertyTypeDescription
chargestring1 to 255 visible ASCII characters: a Stripe PaymentIntent's id, an Adyen pspReference.

ChargeRef

The reference of a charge: the checkout of the option it answers, where the option names one, and the charge.

Properties

PropertyType
chargestring
checkout?string

Unsigned

Properties

PropertyType
allowanceAllowance

Methods

complete()

complete(request): Refusal | Presented

Parameters
ParameterType
requestPresented
Returns

Refusal | Presented

Type Aliases

Allowance

Allowance = object

ACP's Allowance: six members, closed.

Properties

PropertyType
checkout_session_idstring
currencystring
expires_atstring
max_amountnumber
merchant_idstring
reason"one_time"

HandlerOption

HandlerOption = object

The kind of payment handler a session offers: ACP's own requires_delegate_payment flag.

Properties

PropertyType
requires_delegate_paymentboolean

Presented

Presented = object & object

The delegate_payment request as the agent signs it.

Type Declaration

NameType
allowanceAllowance

Session

Session = object & object

A CheckoutSession. Every member other than id and metadata.legal_context is carried untouched.

Type Declaration

NameType
id?string
metadata?object

Variables

delegated

const delegated: AcpBinding<"acp/checkout/delegated">

acp/checkout/delegated. The payee broadcasts (broadcaster answers "payee" for a payment within bound's shape gate, allowanceShape): the seller's PSP charges the vault token the buyer's agent obtained; nothing here reads it. Any other value gets acp/allowance-malformed, as bound refuses it.


issuedDigest

const issuedDigest: typeof digestJson = digestJson

SHA-256 over the RFC 8785 form of an issued handler option.


METADATA_KEY

const METADATA_KEY: "legal_context" = "legal_context"

The member of a CheckoutSession's metadata that carries the ATR hash and link.


undelegated

const undelegated: AcpBinding<"acp/checkout/undelegated"> & object

acp/checkout/undelegated. The payee broadcasts (broadcaster answers "payee"): the seller's payment handler charges the payment the checkout completed; nothing here reads it. reference names the charge by the seller's own reference for it.

Type Declaration

NameType
reference()(presented, option) => Promise<Refusal | ChargeRef>

Functions

tie()

tie(options): ["acp", { options: readonly HandlerOption[]; }]

The binding slot: one option per kind of payment handler the session offers, and nothing from the checkout.

Parameters

ParameterType
optionsreadonly HandlerOption[]

Returns

["acp", { options: readonly HandlerOption[]; }]

References

Broadcaster

Re-exports Broadcaster

Last updated on

On this page