Payment Links
Create and manage payment collection links — shareable URLs that let anyone pay a fixed amount to the agent's wallet.
All endpoints require Authorization: Bearer <agent-jwt> (or Privy user token).
Create payment link
bash
curl -X POST https://walletapi.fluxapay.xyz/api/payment-links \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
-d '{
"amount": "1000000",
"currency": "USDC",
"network": "base",
"description": "API access — 1 USDC",
"resourceContent": "{\"plan\":\"basic\"}",
"expiresAt": "2025-03-01T00:00:00.000Z",
"maxUses": 100
}'Key fields:
amount— price in atomic units (required;1000000= 1.0 USDC).currency— onlyUSDC(optional, defaults toUSDC).network—baseorbase-sepolia(optional, defaults tobase).description— human-readable label (optional).resourceContent— JSON or text delivered to the payer after payment (optional).expiresAt— ISO timestamp after which the link is no longer valid (optional).maxUses— max number of payments accepted;nullfor unlimited (optional).
Response:
json
{
"success": true,
"paymentLink": {
"id": 42,
"linkId": "pl_a1b2c3d4",
"amount": "1000000",
"currency": "USDC",
"network": "base",
"payTo": "0x...",
"assetAddress": "0x833589fCD6Edb6E08f4c7C32D4f71b54bdA02913",
"scheme": "exact",
"description": "API access — 1 USDC",
"resourceContent": "{\"plan\":\"basic\"}",
"status": "active",
"expiresAt": "2025-03-01T00:00:00.000Z",
"maxUses": 100,
"useCount": 0,
"url": "https://agentwallet.fluxapay.xyz/paymentlink/pl_a1b2c3d4",
"createdAt": "2025-01-15T10:00:00.000Z",
"updatedAt": "2025-01-15T10:00:00.000Z"
}
}Share the url with payers.
List payment links
bash
curl https://walletapi.fluxapay.xyz/api/payment-links?limit=50 \
-H "Authorization: Bearer $JWT_TOKEN"Query parameters:
limit— max results (optional, default100, max500).
Response:
json
{
"paymentLinks": [ /* same shape as above */ ]
}Get payment link
bash
curl https://walletapi.fluxapay.xyz/api/payment-links/pl_a1b2c3d4 \
-H "Authorization: Bearer $JWT_TOKEN"Response:
json
{
"paymentLink": { /* same shape as create response */ }
}Update payment link
bash
curl -X PATCH https://walletapi.fluxapay.xyz/api/payment-links/pl_a1b2c3d4 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
-d '{
"description": "Updated description",
"maxUses": 200
}'Updatable fields: description, expiresAt, maxUses, resourceContent.
Response:
json
{
"paymentLink": { /* updated link */ }
}Delete payment link
bash
curl -X DELETE https://walletapi.fluxapay.xyz/api/payment-links/pl_a1b2c3d4 \
-H "Authorization: Bearer $JWT_TOKEN"Response:
json
{
"success": true
}Get payments for a link
List all payments received through a specific payment link.
bash
curl https://walletapi.fluxapay.xyz/api/payment-links/pl_a1b2c3d4/payments \
-H "Authorization: Bearer $JWT_TOKEN"Response:
json
{
"payments": [
{
"id": 1,
"amount": "1000000",
"currency": "USDC",
"status": "succeeded",
"txHash": "0x...",
"createdAt": "2025-01-16T08:30:00.000Z"
}
]
}