Skip to content

Payment links, received payments & refunds ​

Payment links let the agent get paid. Create a link, share its URL, and payers (people or other agents) pay it in USDC. Payments go to the linked wallet.

All amounts here are USDC atomic units (6 decimals): 1000000 = 1.00 USDC.

bash
fluxa-wallet paymentlink-create --amount 5000000 --desc "AI Research Report" \
  --max-uses 100 --expires "2026-12-31T00:00:00.000Z"
FlagTypeRequiredDefaultDescription
--amountinteger, atomic unitsYes—Price per payment
--descstringNo—Description shown to payers
--resourcestringNo—Content delivered to the payer after payment
--expiresISO 8601 date-timeNoneverWhen the link stops accepting payments
--max-usesintegerNounlimitedMaximum number of payments
--networkstringNobaseNetwork
json
{
  "success": true,
  "data": {
    "paymentLink": {
      "linkId": "lnk_a1b2c3d4e5",
      "amount": "5000000",
      "currency": "USDC",
      "network": "base",
      "description": "AI Research Report",
      "status": "active",
      "expiresAt": "2026-12-31T00:00:00.000Z",
      "maxUses": 100,
      "useCount": 0,
      "url": "https://wallet.fluxapay.xyz/pay/lnk_a1b2c3d4e5"
    }
  }
}

Share data.paymentLink.url with payers.

ErrorWhat to do
Missing required parameter: --amountSupply --amount
Amount must be a positive integer (smallest units)Convert to atomic units. No decimals
bash
fluxa-wallet paymentlink-list --limit 10
FlagTypeRequiredDescription
--limitintegerNoMaximum number of links returned

Returns data.paymentLinks, an array of link objects shaped like the one above.

bash
fluxa-wallet paymentlink-get --id lnk_a1b2c3d4e5
FlagTypeRequiredDescription
--idstringYesLink ID (lnk_…)

Returns data.paymentLink.

bash
fluxa-wallet paymentlink-update --id lnk_a1b2c3d4e5 --status disabled
fluxa-wallet paymentlink-update --id lnk_a1b2c3d4e5 --expires null --max-uses null
FlagTypeRequiredDescription
--idstringYesLink ID
--descstringNoNew description
--resourcestringNoNew delivered content
--statusactive | disabledNoTurn the link on or off
--expiresISO 8601, or nullNoNew expiry. null removes it
--max-usesinteger, or nullNoNew usage cap. null removes it

Only the fields you pass are changed.

bash
fluxa-wallet paymentlink-delete --id lnk_a1b2c3d4e5
FlagTypeRequiredDescription
--idstringYesLink ID

To stop payments but keep the link and its history, use paymentlink-update --status disabled instead.

Lists payments made on one link.

bash
fluxa-wallet paymentlink-payments --id lnk_a1b2c3d4e5 --limit 10
FlagTypeRequiredDescription
--idstringYesLink ID
--limitintegerNoMaximum number of records
json
{
  "success": true,
  "data": {
    "payments": [
      {
        "id": 49217,
        "payerAddress": "0xPayer...",
        "amount": "5000000",
        "currency": "USDC",
        "settlementStatus": "settled",
        "settlementTxHash": "0xabc...",
        "createdAt": "2026-10-27T10:30:00.000Z"
      }
    ]
  }
}

A payment has completed when settlementStatus is settled. failed means it failed. Treat any other value as processing.

received-records ​

Lists every payment the agent has received, across all its payment links.

bash
fluxa-wallet received-records --limit 20 --offset 0
FlagTypeRequiredDefaultDescription
--limitinteger, max 100No20Page size
--offsetintegerNo0Pagination offset

Returns data.payments. Each record has the fields shown above, plus sourceType, description, paymentLinkId and payerEmail where available.

received-record ​

bash
fluxa-wallet received-record --id 49217
FlagTypeRequiredDescription
--idintegerYesNumeric payment record ID from received-records or paymentlink-payments

Returns data.payment. It has the same fields as the list, plus network and payTo.

ErrorWhat to do
Invalid payment ID: must be a numberUse the numeric id, not the link ID

Refunds ​

A refund returns all or part of a received payment to the payer. Like a payout, it needs the user's approval: the CLI returns a refundUrl for the user to approve. If nobody approves it within about 24 hours, the refund expires.

bash
# Full refund
fluxa-wallet paymentlink-refund-create --payment-id 49217

# Partial refund with a reason
fluxa-wallet paymentlink-refund-create --payment-id 49217 --amount 500000 --reason "Partial refund"
FlagTypeRequiredDefaultDescription
--payment-idintegerYes—Numeric payment record ID
--amountinteger, atomic unitsNofull amountPartial refund amount
--reasonstringNo—Stored with the refund
json
{
  "success": true,
  "data": {
    "refundId": "plr_xxxxxxxxxxxx",
    "refundUrl": "https://walletapi.fluxapay.xyz/refundlink/plr_xxxxxxxxxxxx",
    "paymentId": 49217,
    "amount": "500000",
    "currency": "USDC",
    "refundType": "partial",
    "status": "pending",
    "expiresAt": "2026-10-28T10:30:00.000Z"
  }
}

Send the user the complete refundUrl. refundId is a string (plr_…). Pass it unchanged to the commands below.

ErrorWhat to do
Missing required parameter: --payment-idSupply the numeric payment record ID
Invalid payment ID: must be a numberUse the numeric id from received-records
Amount must be a positive integer (atomic units)Convert to atomic units

Refund status ​

Outcomestatus
Awaiting approvalpending
Completedsettled (refundTxHash is set)
Failed / not sentfailed, expired, cancelled

Treat any other value as processing. A completed refund is on-chain and can't be reversed.

bash
fluxa-wallet paymentlink-refund-list --limit 20 --offset 0
FlagTypeRequiredDefaultDescription
--limitinteger, max 100No20Page size
--offsetintegerNo0Pagination offset

Returns data.refunds.

bash
fluxa-wallet paymentlink-refund-get --id plr_xxxxxxxxxxxx
FlagTypeRequiredDescription
--idstringYesRefund ID (plr_…)

Cancels a refund that's still awaiting approval. A completed refund can't be cancelled.

bash
fluxa-wallet paymentlink-refund-cancel --id plr_xxxxxxxxxxxx
FlagTypeRequiredDescription
--idstringYesRefund ID (plr_…)

See also: Payment Link guide.

Released under the MIT License.