Skip to content

Create payout

Initiate an outbound USDC transfer (Base) from the user's FluxA wallet to an external address.

Request:

bash
curl -X POST https://walletapi.fluxapay.xyz/api/payouts \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -d '{
    "payoutId": "payout-unique-id-001",
    "network": "base",
    "currency": "USDC",
    "assetAddress": "0x833589fCD6Edb6E08f4c7C32D4f71b54bdA02913",
    "toAddress": "0xDESTINATION_ADDRESS",
    "amount": "1000000",
    "description": "Optional description",
    "metadata": { "orderId": "12345", "source": "my-service" },
    "webhookUrl": "https://yourapp.example.com/fluxa-webhook",
    "ttlSeconds": 600
  }'

Key fields:

  • Authorization: Bearer $JWT_TOKEN – use the agent's JWT obtained at registration.
  • payoutId – idempotency key and tracking identifier (unique per user).
  • network / currency / assetAddress – Base + USDC; backend may enforce an allowlisted USDC address.
  • toAddress – destination EVM address (0x‑prefixed Base address).
  • amount – integer string in smallest units (USDC has 6 decimals; 1000000 = 1.0 USDC).
  • Optional: description, metadata, webhookUrl, ttlSeconds (60–3600s).

Response:

json
{
  "payoutId": "payout-unique-id-001",
  "status": "pending_authorization",
  "txHash": null,
  "approvalUrl": "https://agentwallet.fluxapay.xyz/authorize-payout/payout-unique-id-001",
  "expiresAt": 1730400000
}

If status is pending_authorization and approvalUrl is present, surface that URL so the user can approve in their browser. Once approved, the worker will sign and broadcast.

Released under the MIT License.