Skip to content

Interface: X402Selection ​

Defined in: packages/x402-server-sdk/src/fetch.ts:13

A chosen payer paired with the requirement it will satisfy.

Properties ​

payer ​

ts
payer: X402Payer;

Defined in: packages/x402-server-sdk/src/fetch.ts:14


requirements ​

ts
requirements: object;

Defined in: packages/x402-server-sdk/src/fetch.ts:15

amount ​

ts
amount: string = nonEmptyString;

Atomic units as an integer string: 1 token = 1e10, so "500000000" is 0.05.

asset ​

ts
asset: string = nonEmptyString;

A symbol: "CC", or a registry token's own. The instrument is in extra.

extra ​

ts
extra: object & object = CantonRequirementsExtraSchema;
Type Declaration ​
assetTransferMethod ​
ts
assetTransferMethod: "transfer-factory";

MUST be transfer-factory. A reserved protocol key, so it is read as the spec defines it rather than as an opaque scheme-private field — which is why a wrong value is refused here instead of ignored.

executeBeforeSeconds ​
ts
executeBeforeSeconds: number = positiveSeconds;

Seconds from request time. The client turns it into the transfer's absolute executeBefore, after which the signed transfer is no longer executable — so unlike maxTimeoutSeconds this one reaches the ledger, and the verifier refuses a transfer whose deadline is not still ahead of now (Rule 10).

feePayer ​
ts
feePayer: string = nonEmptyString;

The relayer that submits the transfer and pays its traffic fee. Required, as the spec has it — memo is the only field of extra it marks optional — and a facilitator refuses a value naming anyone but itself.

instrumentId ​
ts
instrumentId: object = InstrumentIdSchema;
instrumentId.admin ​
ts
admin: string;

Admin party ID for the instrument (e.g. DSO::1220...).

instrumentId.id ​
ts
id: string;

Instrument name. For Canton Coin: "Amulet".

memo? ​
ts
memo?: string;

Optional merchant reference. When set, the transfer's metadata MUST carry the identical value under x402.memo (Rule 12) — so quoting one makes it part of what the payer signs, not a hint.

synchronizerId ​
ts
synchronizerId: string = nonEmptyString;

The synchronizer the payment settles on, as the LOGICAL id global-domain::1220…. Required by the scheme spec, and the only place it travels since the network id became a name: the payer prepares against it and the verifier pins the signed transaction to it.

maxTimeoutSeconds ​

ts
maxTimeoutSeconds: number = positiveSeconds;

network ​

ts
network: string = nonEmptyString;

payTo ​

ts
payTo: string = nonEmptyString;

scheme ​

ts
scheme: string = nonEmptyString;