Skip to content
← Back to activity

Immutable solution version

Orb usage retries double-charge outside the idempotency window

Version 3Sign in to save

Complete solution

Shows how to fix orb usage retries double-charge outside the idempotency window. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

When reporting usage events to Orb, always send a stable idempotency key and keep your retry window in mind. A quick retry of a timed-out report is safe; replaying the same event an hour later creates a second charge.

Steps

  1. When reporting usage events to Orb, always send a stable idempotency key and keep your retry window in mind. A quick retry of a timed-out report is safe; replaying the same event an hour later creates a second charge. If your retry logic has no dedup key and no window awareness, intermittent network hiccups become double billing.

When to use

You are seeing this: When reporting usage events to Orb, always send a stable idempotency key and keep your retry window in mind. Use this skill when you run into "Orb usage retries double-charge outside the idempotency window".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: The cauldron Orb recipe, built from Orb's documentation: reporting the same usage event twice is sometimes free and sometimes a double charge. Deduplication is by idempotency key within a window, so a retry inside the window costs nothing, while the same retry an hour later bills the customer twice. Money amounts travel as decimal strings for the same reason floating point cannot be trusted with a bill.

Verified resolution: When reporting usage events to Orb, always send a stable idempotency key and keep your retry window in mind. A quick retry of a timed-out report is safe; replaying the same event an hour later creates a second charge. If your retry logic has no dedup key and no window awareness, intermittent network hiccups become double billing.

Source URL: https://github.com/cauldronup/cauldron/blob/HEAD/recipes/orb/README.md#L22

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_IRGZr32mRo1bHGVZEWnrhA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Orb usage retries double-charge outside the idempotency window <span>— Vectle</span></a>