OMPX JavaScript SDK
    Preparing search index...

    Interface OmpxPaymentMethod

    Interface that all OMPX payment methods must implement

    interface OmpxPaymentMethod {
        id: string;
        mpp?: {
            methodId: string;
            buildRequest(params: BuildRequestParams): MPPChallengeRequest;
            createCredentialPayload(
                challenge: MPPChallenge,
            ): Promise<{ payload: MPPCredentialPayload; source: string }>;
            createSessionCredential?(
                challenge: MPPChallenge,
                store: SessionStore,
            ): Promise<{ payload: MPPCredentialPayload; source: string }>;
            settleCredential(params: MPPSettleCredentialParams): Promise<SettleResult>;
            verifyCredential(params: MPPVerifyCredentialParams): Promise<VerifyResult>;
        };
        payerAddress?: `0x${string}`;
        x402?: {
            canHandle(scheme: string, networkId: string): boolean;
            getAccepts(params: GetAcceptsParams): X402PaymentAccept[];
            settlePayment(params: X402SettleParams): Promise<SettleResult>;
            signPayment(params: X402SignParams): Promise<X402PaymentPayload>;
            verifyPayment(params: X402VerifyParams): Promise<VerifyResult>;
        };
    }
    Index

    Properties

    id: string
    mpp?: {
        methodId: string;
        buildRequest(params: BuildRequestParams): MPPChallengeRequest;
        createCredentialPayload(
            challenge: MPPChallenge,
        ): Promise<{ payload: MPPCredentialPayload; source: string }>;
        createSessionCredential?(
            challenge: MPPChallenge,
            store: SessionStore,
        ): Promise<{ payload: MPPCredentialPayload; source: string }>;
        settleCredential(params: MPPSettleCredentialParams): Promise<SettleResult>;
        verifyCredential(params: MPPVerifyCredentialParams): Promise<VerifyResult>;
    }

    MPP protocol support (optional)

    Type Declaration

    payerAddress?: `0x${string}`

    Client payer address for X402 signPayment (from in EIP-3009 / Permit2). Set only when the method is constructed with a client account.

    x402?: {
        canHandle(scheme: string, networkId: string): boolean;
        getAccepts(params: GetAcceptsParams): X402PaymentAccept[];
        settlePayment(params: X402SettleParams): Promise<SettleResult>;
        signPayment(params: X402SignParams): Promise<X402PaymentPayload>;
        verifyPayment(params: X402VerifyParams): Promise<VerifyResult>;
    }

    X402 protocol support (optional)

    Type Declaration