Skip to content

Get payout status ​

Fetch the current state of a payout this agent created.

Requires Authorization: Bearer <agent-jwt>.

GET/api/payouts/:payoutIdBearer agent-jwt
bash
curl https://walletapi.fluxapay.xyz/api/payouts/po_abc123 \
  -H "Authorization: Bearer $AGENT_JWT"

200 OK:

json
{
  "payout": {
    "payoutId": "po_abc123",
    "displayStatus": "completed",
    "displayStatusExpiresAt": null,
    "txHash": "0xabc...def",
    "approvalUrl": "https://agentwallet.fluxapay.xyz/authorize-payout/po_abc123",
    "expiresAt": 1713340800,
    "toAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "amount": "1000000",
    "currency": "USDC",
    "network": "base",
    "assetAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "mandateId": null,
    "bizId": "order_20260416_001",
    "description": "Refund for order #001",
    "agentId": "agent_001",
    "agentName": "My Agent",
    "failureReason": null,
    "createdAt": 1713254400,
    "executedAt": 1713254460
  }
}

displayStatus ​

displayStatus is the payout's outcome. Base your logic on this field.

displayStatusMeaningFinal?What to do
awaiting_approvalWaiting for the user to approve it in FluxA Wallet.NoShow approvalUrl to the user and keep polling.
processingApproved. The transfer is in progress.NoKeep polling.
completedThe funds arrived. txHash is set.YesDone.
failedThe payout didn't go through.YesCreate a new payout if you still need to pay.
rejectedThe user declined the payout.YesDon't retry without asking the user.
expiredThe user didn't approve it before expiresAt.YesCreate a new payout (new payoutId) if still needed.

Treat any other value as processing. New outcome values may be added later.

While a payout is awaiting_approval, displayStatusExpiresAt gives the Unix time at which it becomes expired. Otherwise it is null.

Response fields ​

FieldDescription
payoutIdYour payout ID.
displayStatusOutcome. See the table above.
displayStatusExpiresAtWhen an awaiting_approval payout expires (Unix seconds), or null.
txHashOn-chain transaction hash once the transfer is sent, or null.
approvalUrlFluxA Wallet page where the user reviews this payout.
expiresAtApproval deadline (Unix seconds).
toAddressDestination address.
amountAmount in atomic units.
currencyUSDC.
networkbase or base-sepolia.
assetAddressUSDC contract address.
mandateIdThe mandate used for automatic approval, or null.
bizIdYour business reference, or null.
descriptionThe memo, or null.
agentIdID of the agent that created the payout.
agentNameName of the agent that created the payout.
failureReasonSet only when displayStatus is failed: a short hint about why. Use it for logs only, not for program logic.
createdAtCreation time (Unix seconds).
executedAtWhen the transfer was sent (Unix seconds), or null.

Polling ​

Poll until displayStatus is completed, failed, rejected or expired. Leave a few seconds between calls.

Errors ​

HTTPBodyMeaning
401{ "error": "..." }The agent JWT is missing, invalid or expired. A VC token returns { "error": "wrong_token_type" }.
404{ "error": "Payout not found" }No payout with this ID was created by this agent.

Released under the MIT License.