Skip to main content
Scheduled payments let you set up a recurring USDC transfer that settles automatically every intervalDays days. Each schedule is registered as ACTIVE with a nextRunAt timestamp, and a cron job (Render Cron Job or any external scheduler calling POST /api/payments/scheduled/run) executes due runs on an interval. You can cap the total number of runs with maxRuns or leave it out for an open-ended subscription. Recurring debits require a FlareHQ-created (Circle-custodied) payer wallet. External (non-custodial) wallets are rejected because recurring debits need server-authorized signing from a Circle SCA wallet — FlareHQ never holds or exposes private keys for wallets you custody yourself.
When the schedule fires, each run settles amount USDC on-chain. The payer wallet is resolved from payerSCA — pass payerWalletId explicitly, or it is looked up from the payer’s registered consumer account.

Endpoint

Request

Headers

This route accepts any valid session: an API key, a merchant dashboard cookie, or a consumer session cookie.

Body Parameters

string
required
SCA wallet address of the payer (the account being debited). This wallet must be Circle-custodied — external wallets are rejected with HTTP 400.
string
required
SCA wallet address that receives each recurring USDC settlement.
string
required
USDC amount for each run, as a decimal string (e.g. "10.00").
string
required
Number of days between settlements (e.g. "30"). Parsed as an integer.
string
Circle wallet ID for payerSCA. If omitted, FlareHQ resolves it from the payer’s registered consumer account automatically.
string
Total number of runs before the schedule deactivates. Omit for an unlimited recurring schedule.
string
Free-form note describing the schedule.
string
Publicly reachable HTTPS URL for settlement notifications.
boolean
default:"true"
When true (default), nextRunAt is set to now and the first run is eligible on the next scheduler tick. When false, the first run is scheduled intervalDays days in the future.

Response

boolean
true when the schedule was created.
object
The persisted schedule record.
string
Human-readable confirmation, e.g. "Recurring payment created — 10.00 USDC every 30 day(s). First run: ...".
string
Note that the schedule runs automatically via the scheduler, and that you can trigger a manual run with POST /api/payments/scheduled/run.

Examples

Success Response

Error Responses

Notes

Scheduled runs are executed by an external scheduler (e.g. a Render Cron Job) calling POST /api/payments/scheduled/run on a fixed interval, typically hourly. The first run becomes eligible as soon as nextRunAt passes, not exactly at that second.
You can also list schedules with GET /api/payments/scheduled?payerSCA=...&status=... and cancel one with DELETE /api/payments/scheduled (body: { "reference": "sched_..." }) — both accept the same session credentials.
Recurring debits only work with Circle-custodied payer wallets. If payerSCA resolves to an external, non-custodial wallet the request is rejected with HTTP 400 before any schedule is created.