T402 API Reference - v2.8.0
    Preparing search index...

    Class ExactLegacyEvmClientScheme

    EVM client implementation for the exact-legacy payment scheme. Used for legacy tokens (like USDT) that don't support EIP-3009.

    This scheme uses the approve + transferFrom pattern:

    1. Client must first approve the facilitator to spend tokens
    2. Client signs an authorization message
    3. Facilitator verifies the signature and calls transferFrom

    Note: The client must have already approved the facilitator (spender) for at least the payment amount before creating a payment payload.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    scheme: "exact-legacy"

    Methods

    • Creates a payment payload for the exact-legacy scheme.

      Parameters

      • t402Version: number

        The t402 protocol version

      • paymentRequirements: PaymentRequirements

        The payment requirements

      Returns Promise<Pick<PaymentPayload, "t402Version" | "payload">>

      Promise resolving to a payment payload