recipients array (each with a wallet address and amount in USDC), and FlareHQ transfers funds sequentially from the authenticated merchant’s own wallet. The response returns a batchRef plus a per-recipient result list so you can reconcile the run. A batch can end as COMPLETED, PARTIAL_FAILURE, or FAILED — or AWAITING_SIGNATURES if the merchant’s wallet is an external (non-Circle) wallet that requires manual signature approval for each transfer.
The payer wallet is never taken from the request body. FlareHQ resolves the payer from the authenticated merchant (via
x-api-key or dashboard session), so you cannot name another merchant’s wallet as payer.Endpoint
Request
Headers
Body Parameters
array
required
A non-empty array of recipients to pay. An empty or missing array returns
HTTP 400 with an example payload. Each item has the following shape:string
HTTPS URL FlareHQ
POSTs to when the batch finishes (unless it ends AWAITING_SIGNATURES). The webhook body carries event: "payroll.completed", the batchRef, status, totalAmount, successCount, failedCount, and results.string
Optional batch description, used as the transfer memo for recipients that have no
label.Response
boolean
true when the batch was created and processed.string
Unique batch reference, e.g.
"payroll_m2x9kl_ab12cd". Use it with GET /api/payroll/run?batchRef={batchRef} to re-check the batch later.string
Final batch status:
COMPLETED— every recipient was paid.PARTIAL_FAILURE— some payments succeeded, some failed.FAILED— every payment failed.AWAITING_SIGNATURES— the merchant wallet is external and each payment awaits a manual signature.
number
Sum of all recipient amounts (before formatting).
number
Number of recipients in the batch.
number
Number of recipients paid successfully.
number
Number of recipients whose payment failed.
number
Number of payments awaiting a manual wallet signature (only non-zero for external wallets).
array
One entry per recipient, in request order. Each entry contains
recipientSCA, amount, and label (or null), plus:SUCCESS→status: "SUCCESS",txHash,explorerUrl.PENDING_SIGNATURE→status: "PENDING_SIGNATURE",requestId.FAILED→status: "FAILED",error.
string
Human-readable summary of the run (or a pointer to
/api/merchant/wallet/sign-requests when signatures are pending).Examples
Success Response
Error Responses
Checking a Batch (GET)
Read a previously created batch record by reference:string
required
The
batchRef returned by the POST call. Omitted → HTTP 400; unknown → HTTP 404.Notes
Payments are processed sequentially (not in parallel) to avoid wallet nonce collisions. The batch record is created with status
PROCESSING before transfers begin and updated to its final status when the loop completes.The
payerWalletId on a batch record now stores the wallet provider kind (e.g. "circle") rather than a Circle wallet ID; the wallet lookup happens inside the wallet provider.
