Namespace Xrpl.X402
Classes
X402AmountMapper
Converts a PaymentRequirement amount into an XRPL Currency value, handling both native XRP (drops) and IOU/token assets.
X402ClientOptions
Configuration options for the x402 payment client (X402PaymentHandler). Controls the target network, amount caps, address allowlists, and binding mode.
X402PaymentBuilder
Constructs an XRPL Payment transaction from an x402 PaymentRequirement, ready to be autofilled and signed by an IX402Signer.
X402PaymentException
Exception thrown by the x402 payment client when a payment cannot be negotiated or executed. Carries a machine-readable Reason code alongside the human-readable message.
X402PaymentHandler
A System.Net.Http.DelegatingHandler that automatically pays HTTP 402 challenges using the XRPL x402 protocol.
On a 402 response the handler selects the matching PaymentRequirement, enforces configured
amount caps and allowlists, signs the payment via IX402Signer, and retries the original request
with the PAYMENT-SIGNATURE header attached.
XrplWalletX402Signer
Default IX402Signer implementation that uses an in-memory XrplWallet to autofill and locally sign an XRPL Payment transaction without submitting it.
Interfaces
IVerifiableIntentProvider
Optional hook that produces an x402 extensions object (e.g. a Verifiable Intent
SD-JWT chain under x402Secure.verifiableIntentChain) to attach to a PAYMENT-SIGNATURE.
Implementations integrate with a credential provider (e.g. Trustline); this package ships no default.
IX402Signer
Abstracts the signing of an XRPL Payment transaction for x402 payments. Implementations autofill transaction fields and sign locally without submitting to the ledger.
Enums
X402IntentBinding
How the x402 invoice id is bound to the XRPL transaction.