payRequest()

Usage

import { payRequest } from "@requestnetwork/payment-processor";

Parameters

NameTypeRequired?Description

request

The request object

signerOrProvider

ethers.providers.Web3Provider | ethers.Signer = getProvider()

amount

ethers.BigNumberish

The amount to pay. Defaults to the expected amount of the request.

overrides

Omit<ethers.providers.TransactionRequest, 'to' | 'data' | 'value'>

Override transaction settings like baseFee and maxPriorityFee

paymentSettings

Settings for conversion payments

Returns

Promise<ethers.ContractTransaction>

This is what ethers returns after submitting a transaction.

Types and Interfaces

IConversionPaymentSettings

NameTypeRequired?Description

currency

ICurrency

The currency in which the payment is made, not the currency in which the request is denominated.

maxToSpend

ethers.BigNumberish

The maximum input currency to spend on conversion payments. Protects the user from rapidly changing exchange rates.

currencyManager

ICurrencyManager

A Currency manager handles a list of currencies and provides utility to retrieve and change format

Last updated