Create and Pay Requests

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

Talk to an expert

Discover how Request Network API can enhance your app's features - book a call 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 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

recurrenceobjectoptional

The recurrence of the invoice

Responses
curl -L \
  --request POST \
  --url 'https://api.request.network/v1/request' \
  --header 'x-api-key: text' \
  --header 'Content-Type: application/json' \
  --data '{
    "payee": "0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7",
    "amount": "10",
    "invoiceCurrency": "USD",
    "paymentCurrency": "ETH-sepolia-sepolia",
    "recurrence": {
      "startDate": "2025-01-01T00:00:00.000Z",
      "frequency": "DAILY"
    }
  }'
{
  "requestID": "01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb",
  "paymentReference": "0xb3581f0b0f74cc61"
}

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
curl -L \
  --url 'https://api.request.network/v1/request/{paymentReference}' \
  --header 'x-api-key: text'
{
  "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
curl -L \
  --request PATCH \
  --url 'https://api.request.network/v1/request/{paymentReference}/stop-recurrence' \
  --header 'x-api-key: text'

No body

Get payment calldata

get

Get the calldata needed to pay a request. Returns different transaction structures for native currency vs ERC20 token payments.

Path parameters
paymentReferencestringrequired

The payment reference of the request

Example: 0xb3581f0b0f74cc61
Header parameters
x-api-keystringrequired

API key for authentication

Responses
curl -L \
  --url 'https://api.request.network/v1/request/{paymentReference}/pay' \
  --header 'x-api-key: text'
{
  "transactions": [
    {
      "data": "0xb868980b...00",
      "to": "0x11BF2fDA23bF0A98365e1A4e04A87C9339e8687",
      "value": {
        "type": "BigNumber",
        "hex": "0x038d7ea4c68000"
      }
    }
  ],
  "metadata": {
    "stepsRequired": 1,
    "needsApproval": false,
    "approvalTransactionIndex": null
  }
}

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
curl -L \
  --request POST \
  --url 'https://api.request.network/v1/pay' \
  --header 'x-api-key: text' \
  --header 'Content-Type: application/json' \
  --data '{
    "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
  }
}

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

Create and Pay Request Workflow

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

Last updated

Was this helpful?