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

Was this helpful?

  1. Raiden API
  2. API Tutorial

Deposit Tokens

Having an empty open channel won't in itself let you make payments. You also need to make sure that you have tokens deposited at your end of the channel.

PreviousOpen a ChannelNextMake a Payment

Last updated 5 years ago

Was this helpful?

If you opened a channel by yourself you most likely already deposited tokens when sending the request. However, in case someone opened a channel with you, you will not have any tokens at your end of the channel.

You need to make a deposit whenever you want to:

  • Add tokens to an empty channel

  • Top up the amount of tokens in a channel

Deposit into a channel

The endpoint together with a PATCH request is used for depositing tokens into a channel. When making the call you need to include:

  1. The token address as a path parameter.

  2. The address of the partner node as a path parameter.

  3. The amount of tokens you want to deposit in the channel as a body parameter.

curl -i -X PATCH \
http://localhost:5001/api/v1/channels/0x9aBa529db3FF2D8409A1da4C9eB148879b046700/0x61C808D82A3Ac53231750daDc13c777b59310bD9 \
-H 'Content-Type: application/json' \
--data-raw '{"total_deposit": "7331"}'

This will give you the same response object as when or .

Now, once there are tokens at your end of the channel, let's start making payments.

Make a Payment
channel
opening a channel
querying the state of a channel