Skip to main content
signEip3009Authorization builds and signs a real EIP-3009 TransferWithAuthorization payload — ready to send as the eip3009 scheme’s paymentPayload to /verify or /settle, or to hand a merchant directly as an X-PAYMENT header.
This performs a genuine EIP-712 signature. There is no mock mode — signing is pure local cryptography with no network dependency, so it works offline and never touches XentFi’s servers.

Signature

Parameters

Eip3009TokenDomain

Returns — Eip3009SchemePayload

The underlying EIP-712 type

buildEip3009Domain(token: Eip3009TokenDomain) builds the matching EIP-712 domain object ({ name, version, chainId, verifyingContract }) if you need to construct or verify a signature manually rather than through signEip3009Authorization.

Example: custom nonce for idempotency

A deterministic nonce (derived from your own request/order ID, for example) lets you safely retry signing the same logical payment without risking a double-spend — the contract rejects a reused nonce for the same signer.

Security notes

  • validBefore is set from validitySeconds (default 5 minutes) — keep this short. A long-lived signed authorization is a bearer instrument until it either expires or is consumed.
  • validAfter is always 0 in the current implementation (immediately valid).
  • The signature never leaves the caller’s process during signing — only the final Eip3009SchemePayload (which includes the signature, not the private key) is transmitted anywhere.

Next steps

Payer Guide

See this used in a full 402 round trip.

API Reference

X402FacilitatorClient and the rest of the type surface.