Skip to content

Interface: X402PaymentPayload<TInner, TExtra> ​

Defined in: packages/x402-core/src/types/payment.ts:71

Generic x402 v2 payment envelope. TInner is the scheme-specific inner payload — the whole payload object is the one chain-specific seam — and TExtra is accepted's extra, as in X402PaymentRequirements. The scheme and the network are not top-level: they are accepted's, the requirements the payer chose. Generic → type-only (valibot can't infer a generic); the loose runtime envelope check lives in isX402PaymentPayload.

Type Parameters ​

TInner ​

TInner = CantonPaymentInner

TExtra ​

TExtra = Record<string, unknown>

Properties ​

accepted ​

ts
accepted: X402PaymentRequirements<TExtra>;

Defined in: packages/x402-core/src/types/payment.ts:78

The accepts[] entry the payer chose: a whole PaymentRequirements, as the spec defines it. Checked for the fields every scheme's requirements share; a caller that reads extra narrows it first.


extensions? ​

ts
extensions?: 
  | {
[key: string]: unknown;
}
  | null;

Defined in: packages/x402-core/src/types/payment.ts:81


payload ​

ts
payload: TInner;

Defined in: packages/x402-core/src/types/payment.ts:79


resource? ​

ts
resource?: object & object | null;

Defined in: packages/x402-core/src/types/payment.ts:80


x402Version ​

ts
x402Version: 2;

Defined in: packages/x402-core/src/types/payment.ts:72