Request Network Docs
WebsiteGithubStatusDiscord
  • Request Network Docs
  • Request Network API
    • Create and Pay Requests
    • Crosschain Payments
    • EasyInvoice: API Demo App
    • API Portal: Manage API Keys and Webhooks
      • Manage API Keys and Webhooks programmatically
    • Full API Reference
  • General
    • Lifecycle of a Request
    • Request Scan
    • Supported Chains
      • Smart Contract Addresses
    • Request Network Token List
  • Advanced
    • Request Network SDK
      • Get Started
        • Quickstart - Browser
        • Quickstart - Node.js
        • Installation
        • SDK Injector
        • Request Node Gateways
      • SDK Demo Apps
        • Request Invoicing
          • Pay from Safe Multisig
        • Request Checkout
        • Components
          • Create Invoice Form
          • Invoice Dashboard
          • Payment Widget
          • Add Stakeholder
      • SDK Guides
        • Request Client
          • Configure the Request Client
          • Updating a Request
          • Payment Reference
          • Compute a Request ID without creating the request
          • Use your own signature mechanism
          • Support a new currency
          • In-Memory Requests
        • Encryption and Decryption
          • Encrypt with a wallet signature using Lit Protocol
          • Encrypt with an Ethereum private key
          • Share an encrypted request
        • Payment
          • Detect a payment
          • Native Payment
          • Conversion Payment
          • Declarative Payment
          • Configuring Payment Fees
          • Single Request Forwarder
          • Batch Payment
          • Swap-to-Pay Payment
          • Swap-to-Conversion Payment
          • Transferable Receivable Payment
          • Meta Payments
          • Escrow Payment
          • Streaming Payment
          • Pay through a proxy-contract with a multisig
          • Hinkal Private Payments
        • Mobile using Expo
      • SDK Reference
        • request-client.js
          • RequestNetwork
            • createRequest()
            • computeRequestId()
            • fromRequestId()
            • fromIdentity()
            • fromTopic()
          • Request
            • waitForConfirmation()
            • getData()
            • refresh()
            • cancel()
            • accept()
            • increaseExpectedAmountRequest()
            • reduceExpectedAmountRequest()
          • IIdentity
          • IRequestDataWithEvents
          • PaymentReferenceCalculator
        • payment-processor
          • payRequest()
        • web3-signature
          • Web3SignatureProvider
        • epk-signature
          • EthereumPrivateKeySignatureProvider
        • epk-decryption
          • EthereumPrivateKeyDecryptionProvider
    • Protocol Overview
      • SDK and Request Node Overview
      • Payment Networks
      • Private Requests using Encryption
      • Smart Contracts Overview
    • Internal SDK Architecture
      • Request Logic
      • Advanced Logic
      • Transaction
      • Data-access
      • Storage
      • Data flow
      • Request IPFS network
  • FAQ
  • Glossary
  • Contributing
Powered by GitBook
On this page
  • Usage
  • Parameters
  • Returns
  • Types and Interfaces
  • IConversionPaymentSettings

Was this helpful?

Edit on GitHub
Export as PDF
  1. Advanced
  2. Request Network SDK
  3. SDK Reference
  4. payment-processor

payRequest()

Usage

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

Parameters

Name
Type
Required?
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

Name
Type
Required?
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

Previouspayment-processorNextweb3-signature

Last updated 1 year ago

Was this helpful?

An ethers v5 Provider. See for explanation how to wrap a viem WalletClient to look like an ethers v5 Provider.

ConversionPaymentSettings
Pay a request
IRequestData