Raiden Network
  • What is Raiden?
  • Installation
    • Quick Start
      • Get MetaMask
      • Get an Infura ID
      • Download and run the Raiden Wizard
      • Handle Limitations
    • Starting Raiden Manually
  • Using Raiden on Mainnet
    • Overview
    • Get Whitelisted Tokens
    • Deposit Tokens to the UDC
    • Open a Channel
    • Make a Payment
    • Deposit Tokens
    • View Channel Status
    • Mediation Fees
  • The Raiden Web Interface
    • Overview
    • Navigate the WebUI
    • Join a Token Network
    • Make a Payment
    • Add More Tokens
    • Settle Payments and Close Channels
  • Using Raiden on testnet
    • Quick Start on Görli Testnet
    • Use Custom Token
      • Get Goerli Testnet ETH (GÖETH)
      • Import Custom Token
      • Compile Imported Token Code
      • Deploy Custom Token
  • Raiden API
    • Introduction
    • Resources
      • Address
      • Version
      • Settings
      • Contracts Information
      • Tokens
      • Channels
      • Payments
      • Connections
      • Pending Transfers
      • Shutdown
      • Testing
    • API Tutorial
      • Create a Token Network
      • Open a Channel
      • Deposit Tokens
      • Make a Payment
      • Withdraw Tokens
      • Settle Payments and Close Channels
  • Other
    • Safe Usage
    • Known Issues
    • Glossary
    • v1.0 Documentation
    • Trademark Attributions
Powered by GitBook
On this page
  • Direct payments
  • Mediated payments

Was this helpful?

  1. Using Raiden on Mainnet

Make a Payment

PreviousOpen a ChannelNextDeposit Tokens

Last updated 4 years ago

Was this helpful?

Payments are made from the endpoint via a POST request that has to include:

  1. The address of the W-ETH token as a path parameter.

  2. The address of the node receiving your payment as a path parameter.

  3. The amount you would like to pay as a body parameter.

curl -i -X POST \
http://localhost:5001/api/v1/payments/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/<target_address> \
-H 'Content-Type: application/json' \
--data-raw '{"amount":"42"}'

You will receive a success response once the payment goes through.

Payments in Raiden can be done either as:

It is possible to receive tokens through the Raiden Network without having any initial Ether or tokens. The receiving peer just needs to have a Raiden full node running and the sender must be willing to pay the fees for the on-chain transactions.

Direct payments

You can open a channel directly with any node you know the address of. You might want to open a direct channel if you know you'll be making frequent payments to a specific peer. Each payment will then go straight to that peer via the open channel. This is called a direct payment.

Mediated payments

If you don't have a direct channel to a node for whom you want to send a payment, Raiden will try to find a path from you to the recipient node through the network of channels. This is called mediated payments.

Mediated payments are a powerful feature in Raiden since it lets you pay anyone in the network by leverging the path of connected payment channels.

By making no more than two API calls - one call to join the token network and one call to make the payment - we can send payments to anyone who is part of the W-ETH token network.

Direct payments
Mediated payments
payments