Skip to content
myela

**Sandbox only** — returns permission_denied anywhere else, where scheduled invoices collect on their own. Collects your invoices that are due right now, up to a batch limit, and answers {claimed, collected, released}; call it again if claimed came back at the limit. Use it to see a schedule through to a charge without waiting for its date: schedule with a collectAt in the past, then call this. The charge is real, with the same statuses and Attempts rows a dated collection produces — nothing here is simulated. Calling it twice is safe; a second pass reuses the transaction rather than charging again.

Collect due invoices now (sandbox)

POST/v1/invoices/scheduler/runLink

Sandbox only — returns permission_denied anywhere else, where scheduled invoices collect on their own. Collects your invoices that are due right now, up to a batch limit, and answers {claimed, collected, released}; call it again if claimed came back at the limit.

Use it to see a schedule through to a charge without waiting for its date: schedule with a collectAt in the past, then call this. The charge is real, with the same statuses and Attempts rows a dated collection produces — nothing here is simulated. Calling it twice is safe; a second pass reuses the transaction rather than charging again.

SandboxSecret keyinvoices.schedule

Request fields

Edit a field and the generated request updates immediately.

No parameters

This operation needs only its authorization credential.

Response contract

The successful wire shape and errors an integration should branch on.

200

Collection run

application/json
claimedintegerrequired
Invoices of yours that were due and taken for collection in this pass, up to the batch limit. Call again if it comes back at the limit.
collectedintegerrequired
How many of those were charged successfully. A shortfall is not an error — a declined card is recorded against the invoice and retried on its own schedule; read Attempts for the reason.
releasedintegerrequired
Invoices freed from a pass that stopped part-way and left them held. Normally 0.
Example response
{
  "claimed": 2,
  "collected": 1,
  "released": 0
}
Error responses
401authentication_failed

The key is missing, malformed, revoked, or invalid for this environment.

403permission_denied

The key does not have invoices.schedule.

409conflict

The resource is not in a state where this operation is valid.