copilot_credit.* events
Copilot Credits as they move: a pack bought and credited, free credit granted, the balance running low, and a refund taking credit back.
Copilot Credits as they move: a pack bought and credited, free credit granted, the balance running low, and a refund taking credit back. Copilot Credits are the prepaid pool Subscriby Copilot is metered through, kept in Subscriby's own ledger in US cents: paid packs and free grants side by side, the free part spent first. They never touch the Stripe customer balance, so a pack can never pay a plan invoice and a plan invoice can never consume them.
Every event in this family is about the creator's own account, never a project: project_id is null and the event is delivered to the endpoints of the creator's current team. Two describe money in (copilot_credit.purchased and copilot_credit.granted), one the balance (copilot_credit.low) and one money out (copilot_credit.refunded). Usage itself is not announced: a turn is too frequent for a webhook, and the balance it leaves is on every other event.
Background
Amounts are integers in cents
Every amount is an integer number of US cents (2500 is $25.00), never a decimal string, because the pool is kept in cents. balance_cents is the whole balance after the event, free and paid together; it can be negative after a refund of credit already spent, which is the state in which the Copilot stops until a later grant covers it.
Required ability
Every event in this family requires account:read at token mint time.
Events
copilot_credit.purchasedA pack of Copilot Credits was paid for and credited.copilot_credit.grantedFree Copilot Credits were granted to the creator.copilot_credit.lowThe creator's Copilot Credits fell under the low-balance threshold.copilot_credit.refundedStripe refunded the charge for a pack and the credit was taken back.How is this guide?
Last updated on