Skip to main content
A payment stream lets you drip USDC continuously from a sender’s wallet to a receiver at a fixed rate per second — useful for subscriptions, pay-per-use APIs, real-time payroll, or any scenario where value should accrue over time rather than in a single lump sum. When you call this endpoint, FlareHQ locks totalDeposited USDC on-chain and waits for confirmation before returning. From that moment, the receiver is owed ratePerSecond USDC for every second that passes until the deposited balance is exhausted. The stream can be stopped at any point by the sender, returning the unstreamed balance.
To calculate ratePerSecond for a given payment schedule, divide the total amount by the desired duration in seconds: ratePerSecond = totalDeposited / durationSeconds. For example, a $500/month stream over 30 days (2,592,000 seconds) is approximately "0.000193" USDC per second.

Endpoint

Authentication

Pass your API key in the x-api-key header.

Request Body

string
required
The Circle SCA wallet address of the payer. This wallet must hold enough USDC to cover totalDeposited. The API signs both the approval and stream-creation transactions from this address.
string
required
The SCA wallet address of the recipient. The receiver can call POST /api/payments/stream/withdraw at any time to claim accrued USDC while the stream is active.
string
required
USDC to stream per second, as a decimal string — e.g. "0.000193". USDC uses 6 decimal places; the minimum non-zero value is "0.000001". Use the formula totalDeposited / durationSeconds to derive this value for a target duration.
string
required
Total USDC to lock into the stream contract — e.g. "500.00". The stream runs until this balance is fully streamed. The estimatedDurationSeconds in the response reflects totalDeposited / ratePerSecond.
string
A publicly reachable HTTPS URL. FlareHQ will POST stream.created, stream.stopped, stream.withdrawn, and stream.completed events to this URL. Delivery is non-blocking and best-effort.

Response

boolean
true when the stream is live on-chain.
string
Unique stream identifier in the format stream_<base36timestamp>_<random> — e.g. "stream_n2p4q8_f3g7h1". Use this in stop and list calls.
object
The persisted stream record.
string
On-chain transaction hash for the stream creation transaction.
string
ArcScan link — https://testnet.arcscan.app/tx/{txHash}.
number
Calculated stream lifetime in whole seconds: floor(totalDeposited / ratePerSecond).
string
ISO 8601 timestamp when the stream will be fully exhausted at the given rate.
string
Human-readable confirmation showing the rate, sender, and receiver.
object
Convenience strings for stop, withdraw, and list operations.

Examples

Success Response

Error — Missing Parameters

Stream creation involves on-chain transactions that can take up to 75 seconds to confirm. Do not retry during this window — a duplicate request will lock additional USDC into a second independent stream.