01
Create your off-chain receive address
- 1. Connect your wallet in the asset manager
Asset manager
- 2. Select "My assets" and create a new asset
- 3. Click your new asset to see your x402 facilitator address
02
Create an x402 payment signature
- 1. Open your wallet in the asset manager
Asset manager
- 2. Deposit funds into your payment channel
- 3. Create an x402 payment claim and take a copy
$ pip install dhali-py
======================
from dhali.dhali_channel_manager import DhaliChannelManager, ChannelNotFound
from dhali.config_utils import get_available_dhali_currencies
from dhali.utils import wrap_as_x402_payment_payload
from eth_account import Account
from web3 import Web3
private_key = "0x..."
account = Account.from_key(private_key)
w3 = Web3(Web3.HTTPProvider("https://ethereum-sepolia.publicnode.com"))
currencies = get_available_dhali_currencies()
sepolia_rlusd = currencies["SEPOLIA"]["RLUSD"] # or "USDC"
manager = DhaliChannelManager.evm(
account=account,
w3=w3,
protocol="SEPOLIA",
currency=sepolia_rlusd.currency
)
off_chain_payment = manager.get_auth_token()
x402_payment = wrap_as_x402_payment_payload(off_chain_payment, b64_payment_required_header)
$ npm install dhali-js
======================
const { ethers } = require('ethers')
const { DhaliChannelManager, getAvailableDhaliCurrencies, wrapAsX402PaymentPayload } = require('dhali-js')
const provider = new ethers.JsonRpcProvider("https://rpc.ankr.com/eth_sepolia")
const signer = new ethers.Wallet("0x...", provider)
const configs = await getAvailableDhaliCurrencies()
const sepoliaUsdc = configs["SEPOLIA"]["USDC"]
const manager = DhaliChannelManager.evm(
signer,
provider,
"SEPOLIA",
sepoliaUsdc.currency
)
token = await manager.getAuthToken(1000000); // 1 USDC
x402Payment = wrapAsX402PaymentPayload(token, paymentRequiredHeader)
03
Send off-chain payments to yourself
04
Settle on-chain when you’re ready
- 1. Enter the asset manager
Asset manager
- 2. Select "My assets" and select your asset
- 3. View your earnings. Your payments will settle nightly
Our integrations
Bithomp: Accessing APIs using payment channels.
Our users
Here's what they said.
Dhali made is great to work with and made it really easy to set up nanopayments for our APIs.
Dhali is a great marketplace for developers and projects that are wanting to monetize their APIs.
Navigation was simple and straight to the point; didn't have to be a rocket scientist to understand it.
Pricing
Usage-based, chain-agnostic pricing.
If proxying, how long does your API take to respond to a request?
ms
What will you charge for your API?
Per request
Per second














