Bag Docs
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
}
FieldDescription
availableBalanceAmount you can withdraw now
totalCollectedAll-time payments received
totalSettledAll-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

FieldTypeRequiredDescription
amountnumberYesAmount to withdraw
networkstringYesNetwork to settle on
destinationWalletstringYesWallet to receive funds
txHashstringYesOn-chain transaction hash
tokenstringNoDefaults 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

StatusMeaning
processingSettlement created, being processed

Using the dashboard

You can also request payouts from the Bag dashboard:

  1. Go to Settlements in the sidebar.
  2. Click Withdraw Funds.
  3. Enter the amount and destination wallet.
  4. Confirm the withdrawal.

What's next

On this page