Add credits to a customer
For a promotion, a goodwill gesture or a sale made outside Payrudder. With an `idempotency_key` (or the `Idempotency-Key` header) a repeat of the call adds nothing and returns `replayed: true`; the same key with other values is `billing.credits.key_reused`.
Loading the operation...
What the customer's next invoice would be if it were drafted now GET
An estimate of the regular invoice of the period that is still open (or, while a closed period's grace period runs, of that period): the usage and late usage so far, rated by the plan version in force, the fixed fee, tax at the tenant's rate for the customer's country and the credit balance the invoice would use. It is computed by the same code that drafts the real invoice, from the same inputs, and nothing is stored. It moves with every event until the period closes, and a change of plan, a coupon or a tax rate made later can move it too: `estimate` is always `true`, and the response has no id and no number. A fixed fee invoiced in advance is its own invoice and is not in it. A customer with nothing to bill in the period gets `has_invoice: false` and no lines.
Give a customer a coupon that their next eligible checkout uses without a code POST
One grant per (customer, source, source_ref); repeating it grants nothing more.