billing

Put unsynced usage back on the billing queue

Re-queues { usage_event_id } messages for ledger rows Stripe has not acknowledged, and RESETS their re-drive counter — the reason an operator presses this is that they have fixed the cause, and a counter that survived the fix would refuse the first retry after it. Idempotent and safe to repeat: the consumer derives the amount, customer and workspace from the persisted row and collapses a row that has since synced to a no-op. Nothing here can change an amount. Every call writes an audit row naming who did it.

post/v1/admin/billing/redrive

Request

  • Base URL: https://api.hyperresearch.ai
  • URL: https://api.hyperresearch.ai/v1/admin/billing/redrive
  • Auth: API key in cookie hr_session

Request body

usage_event_idsstring[]

The exact ledger rows to re-queue. Omit to take the oldest unsynced priced rows instead. An id that is not an unsynced ledger row is reported back under skipped, never enqueued.

limitinteger
reconcile'charged' | 'not_charged'

Your verdict on rows reported under needs_reconcile on GET /v1/admin/billing/unsynced, after you have read the Stripe meter-event summary for that customer and window. charged: Stripe has it — the ledger row is marked synced with no provider call. not_charged: Stripe does not — the flag and the attempt instant are cleared, which starts a fresh idempotency window, and the row goes back on the queue. Requires usage_event_ids: a verdict is about rows you have looked at, so without them this call does nothing.

Response

What was re-queued

availableboolean required
requeuedstring[] required
reconciledstring[] required

Rows your reconcile verdict settled or released (0042).

Changes

No recorded changes to this operation across all 1 revision of this API.