Request Network Docs
WebsiteGithubStatusDiscord
  • Request Network Docs
  • Request Network API
    • Create and Pay Requests
    • Crosschain Payments
    • Crypto-to-fiat Payments
    • EasyInvoice: API Demo App
    • API Portal: Manage API Keys and Webhooks
    • 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

Was this helpful?

Edit on GitHub
Export as PDF
  1. Request Network API

Create and Pay Requests

The Request Network API provides an interface for creating and paying requests within your application.

PreviousRequest Network DocsNextCrosschain Payments

Last updated 15 hours ago

Was this helpful?

Talk to an expert

Discover how Request Network API can enhance your app's features - with us.

Core Functionality

At its core, the Request Network API empowers you to:

  • Create Requests: Define payment requests with information such as payee, payer (optional), amount, currency, and recurrence (optional).

  • Facilitate Payments: Return transaction calldata, ready to be signed by end-users and sent to the blockchain for secure and transparent value transfer.

  • Deliver Webhook Notifications: Receive instant updates on payment status changes, enabling your application to react dynamically to completed transactions.

Create and Pay Request Workflow

The following diagram illustrates the typical flow for creating and paying requests using the Request Network API:

For detailed information on all available endpoints and their parameters, please refer to the full

Request Network API Reference
book a call

Get request status

get

Get the status of a payment request

Path parameters
paymentReferencestringRequired

The payment reference of the request

Example: 0xb3581f0b0f74cc61
Header parameters
x-api-keystringRequired

API key for authentication

Responses
200
Request status retrieved successfully
application/json
401
Unauthorized
404
Request not found
429
Too Many Requests
get
GET /v1/request/{paymentReference} HTTP/1.1
Host: api.request.network
x-api-key: text
Accept: */*
{
  "hasBeenPaid": true,
  "paymentReference": "0xb3581f0b0f74cc61",
  "requestId": "01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb",
  "isListening": false,
  "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}

Stop a recurring request

patch

Stop a recurring request

Path parameters
paymentReferencestringRequired

The payment reference of the request

Example: 0xb3581f0b0f74cc61
Header parameters
x-api-keystringRequired

API key for authentication

Responses
200
Recurrence stopped successfully
401
Unauthorized
404
Request not found
429
Too Many Requests
patch
PATCH /v1/request/{paymentReference}/stop-recurrence HTTP/1.1
Host: api.request.network
x-api-key: text
Accept: */*

No content

Get payment calldata

get

Get the calldata needed to pay a request.

Path parameters
paymentReferencestringRequired

The payment reference of the request

Example: 0xb3581f0b0f74cc61
Query parameters
walletstringOptional

The wallet address of the payer.

Example: 0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7
chainstring ยท enumOptional

The source chain of the cross chain payment

Possible values:
tokenstring ยท enumOptional

The source token of the cross chain payment

Possible values:
amountstringOptional

The amount to pay, in human readable format

Header parameters
x-api-keystringRequired

API key for authentication

Responses
200
Payment calldata retrieved successfully
application/json
400
Validation failed
application/json
401
Unauthorized
404
Request not found
429
Too Many Requests
get
GET /v1/request/{paymentReference}/pay HTTP/1.1
Host: api.request.network
x-api-key: text
Accept: */*
{
  "transactions": [
    {
      "data": "0xb868980b...00",
      "to": "0x11BF2fDA23bF0A98365e1A4e04A87C9339e8687",
      "value": {
        "type": "BigNumber",
        "hex": "0x038d7ea4c68000"
      }
    }
  ],
  "metadata": {
    "stepsRequired": 1,
    "needsApproval": false,
    "approvalTransactionIndex": null,
    "hasEnoughBalance": true,
    "hasEnoughGas": true
  }
}
  • Core Functionality
  • POSTCreate a new request
  • GETGet request status
  • PATCHStop a recurring request
  • GETGet payment calldata
  • POSTInitiate a payment
  • Create and Pay Request Workflow

Create a new request

post

Create a new payment request

Header parameters
x-api-keystringRequired

API key for authentication

Body
payerstringOptional

The wallet address of the payer

payeestringRequired

The wallet address of the payee

amountstringRequired

The payable amount of the invoice, in human readable format

invoiceCurrencystringRequired

Invoice Currency ID, from the Request Network Token List e.g: USD

paymentCurrencystringRequired

Payment currency ID, from the Request Network Token List e.g: ETH-sepolia-sepolia

Responses
201
Request created successfully
application/json
400
Validation failed
application/json
401
Unauthorized
404
Wallet not found
429
Too Many Requests
post
POST /v1/request HTTP/1.1
Host: api.request.network
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 206

{
  "payee": "0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7",
  "amount": "10",
  "invoiceCurrency": "USD",
  "paymentCurrency": "ETH-sepolia-sepolia",
  "recurrence": {
    "startDate": "2025-01-01T00:00:00.000Z",
    "frequency": "DAILY"
  }
}
{
  "paymentReference": "0xb3581f0b0f74cc61",
  "requestID": "01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb"
}

Initiate a payment

post

Initiate a payment without having to create a request first

Header parameters
x-api-keystringRequired

API key for authentication

Body
payeestringRequired

The wallet address of the payee

amountstringRequired

The payable amount of the invoice, in human readable format

invoiceCurrencystringRequired

Invoice Currency ID, from the Request Network Token List e.g: USD

paymentCurrencystringRequired

Payment currency ID, from the Request Network Token List e.g: ETH-sepolia-sepolia

Responses
201
Request created and payment initiated successfully
application/json
Responseany
401
Unauthorized
404
Wallet not found
429
Too Many Requests
post
POST /v1/pay HTTP/1.1
Host: api.request.network
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 132

{
  "payee": "0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7",
  "amount": "10",
  "invoiceCurrency": "USD",
  "paymentCurrency": "ETH-sepolia-sepolia"
}
{
  "requestID": "01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb",
  "paymentReference": "0xb3581f0b0f74cc61",
  "transactions": [
    {
      "data": "0xb868980b...00",
      "to": "0x11BF2fDA23bF0A98365e1A4e04A87C9339e8687",
      "value": {
        "type": "BigNumber",
        "hex": "0x038d7ea4c68000"
      }
    }
  ],
  "metadata": {
    "stepsRequired": 1,
    "needsApproval": false,
    "approvalTransactionIndex": null,
    "hasEnoughBalance": true,
    "hasEnoughGas": true
  }
}