Compliance & Payouts
Request a Payout
Withdraw funds from your Bag balance to your wallet.
Request a Payout
As payments come in, your balance accumulates in Bag. When you're ready to withdraw, create a settlement to move funds to your wallet.
Check your balance
Before requesting a payout, check how much is available:
curl https://justusebag.xyz/api/settlements/balance \
-H "Authorization: Bearer $BAG_API_KEY"const response = await fetch("https://justusebag.xyz/api/settlements/balance", {
headers: { Authorization: `Bearer ${process.env.BAG_API_KEY}` },
});
const balance = await response.json();
console.log(`Available: $${balance.availableBalance}`);
console.log(`Total collected: $${balance.totalCollected}`);
console.log(`Total settled: $${balance.totalSettled}`);Response
{
"status": "success",
"availableBalance": 500.00,
"totalCollected": 1000.00,
"totalSettled": 500.00
}| Field | Description |
|---|---|
availableBalance | Amount you can withdraw now |
totalCollected | All-time payments received |
totalSettled | All-time payouts completed |
Create a settlement
Request a payout by creating a settlement:
curl -X POST https://justusebag.xyz/api/settlements \
-H "Authorization: Bearer $BAG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 250.00,
"network": "base",
"destinationWallet": "0xYourWalletAddress",
"txHash": "0xSettlementTxHash"
}'Parameters
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount to withdraw |
network | string | Yes | Network to settle on |
destinationWallet | string | Yes | Wallet to receive funds |
txHash | string | Yes | On-chain transaction hash |
token | string | No | Defaults to USDC |
Response
{
"status": "success",
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"merchantWalletAddress": "0xYourMerchantWallet",
"amount": 250.00,
"token": "USDC",
"network": "base",
"destinationWallet": "0xYourWalletAddress",
"txHash": "0xSettlementTxHash",
"status": "processing",
"createdAt": "2026-03-01T12:00:00.000Z"
}
}List your settlements
curl https://justusebag.xyz/api/settlements \
-H "Authorization: Bearer $BAG_API_KEY"Returns up to 50 settlements, most recent first.
Settlement statuses
| Status | Meaning |
|---|---|
processing | Settlement created, being processed |
Using the dashboard
You can also request payouts from the Bag dashboard:
- Go to Settlements in the sidebar.
- Click Withdraw Funds.
- Enter the amount and destination wallet.
- Confirm the withdrawal.