API ReferenceSettlements
Create a settlement
Records a settlement (payout) from your Bag balance. You must provide the on-chain transaction hash of the payout transfer. The settlement amount must not exceed your available balance.
Authorization
privy AuthorizationBearer <token>
Privy JWT authentication for dashboard and management endpoints. This is used internally by the Bag Dashboard and is not intended for direct API integrations. Use API keys instead.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://api.justusebag.xyz/api/settlements" \ -H "Content-Type: application/json" \ -d '{ "amount": 500, "token": "USDC", "network": "base", "destinationWallet": "0xPaYoUt1234567890abCdEf1234567890aBcDeF12", "txHash": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890" }'{
"status": "success",
"data": {
"id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
"amount": 500,
"token": "USDC",
"network": "base",
"destinationWallet": "0xPaYoUt1234567890abCdEf1234567890aBcDeF12",
"txHash": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890",
"status": "completed",
"createdAt": "2026-02-25T16:00:00.000Z"
}
}{
"status": "error",
"message": "amount: Amount must be a positive number up to 999,999,999.99; network: Invalid enum value",
"code": "BAD_REQUEST"
}{
"status": "error",
"message": "Invalid or revoked API key",
"code": "UNAUTHORIZED",
"hint": "Include a valid API key in the Authorization header: Bearer bag_live_sk_..."
}