Skip to content

@lelantos-org/sdk / x402 / BudgetReservation

Interface: BudgetReservation ​

Defined in: @lelantos-org/sdk/dist/x402/budget.d.ts:15

A payment that has passed the limits and is being minted. Exactly one of commit / release must be called; both are idempotent, so a finally that releases after a commit is safe.

Methods ​

commit() ​

ts
commit(): void;

Defined in: @lelantos-org/sdk/dist/x402/budget.d.ts:17

The payment landed: move the hold into recorded spend.

Returns ​

void


release() ​

ts
release(): void;

Defined in: @lelantos-org/sdk/dist/x402/budget.d.ts:19

The payment did not happen: return the held amount.

Returns ​

void