Skip to main content

Overview

Secure Payment Pages let you generate a hosted payment URL from the API and redirect the payer to a dedicated payment experience. This feature is useful when you want to reduce frontend tampering risk and separate payment execution from your checkout UI.

Built-in contract safety check

Before signing, the secure page validates that the transaction targets official Request Network contracts. The payer-facing status copy is:
  • “This is a safe smart contract”
  • “The smart contract you are interacting with is an official Request Network smart contract, it is audited and valid.”
If validation fails, the secure page warns the payer and prevents continuing with unsafe contract interactions.

How the flow works

1

Create a secure payment link

Call POST /v2/secure-payments with one or more requests.The API creates Request records and returns:
  • requestIds
  • token
  • securePaymentUrl
2

Redirect the payer to the hosted page

Send the payer to securePaymentUrl.
3

Payer reviews payment details

The hosted page loads the payment details and prepares the required transaction flow.
4

Sign and submit payment transactions

The payer signs the returned transaction set from their wallet. Depending on token approvals, this can be one or more transactions.

Authentication

Both secure payment endpoints accept:
  • x-api-key, or
  • x-client-id with browser Origin
See Authentication for implementation options.

Create example

curl -X POST "https://api.request.network/v2/secure-payments" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "requests": [
      {
        "payee": "0x6923831ACf5c327260D7ac7C9DfF5b1c3cB3C7D7",
        "amount": "10",
        "invoiceCurrency": "FAU-sepolia",
        "paymentCurrency": "FAU-sepolia"
      }
    ]
  }'
{
  "requestIds": [
    "01e273ecc29d4b526df3a0f1f05ffc59372af8752c2b678096e49ac270416a7cdb"
  ],
  "securePaymentUrl": "https://secure.request.network/?token=01ABC123DEF456GHI789JKL",
  "token": "01ABC123DEF456GHI789JKL"
}

Status outcomes

  • 200: token is valid and payable
  • 403: token expired or status is not payable
  • 404: token not found
  • 409: payment already completed

Next pages