Console guide: meters, packages and pricing

Draft. Written from the repository's documents and code; not yet reviewed by the owner.

How a price is set up in the console: what is measured (meters), what is sold (packages and their versions), and the money rules around them (tax, payment retries, coupons). The API is in the reference for meters and plans; the order of the calls is in the usage-based billing tutorial.

It was written from the console's own texts (every name in bold is a string of the English console) and its pages' code, not by following it on a screen with a person. Where they differ, the console is right.

Meters

Under Usage and products, Meters: A meter says what is measured and how usage events add up. A new version of a code can change everything except its decimal places; events are checked against the latest one. A meter is needed before a package can price or limit usage.

New meter asks for:

Publish version adds a new version of a code. A distinct-values or latest-value meter keeps that aggregation in every version. Use a new code to change it. More on events and periods is in Usage metering.

Packages

Packages: Publishing a package that exists adds a new version. A version is fixed once published; subscriptions keep the version they started on. A change of price is therefore always a new version, never an edit.

New package takes a Code, a Name and the Fixed fee per month in the account's currency, with Add a fee in another currency for other currencies (each monthly or yearly). Then:

Publish version makes the version. Moving customers from one version to another is Schedule a price change: Moves the customers of one version to another at their next renewal and tells each of them by mail, in their language. Nothing changes before then. The notice is at least 14 days (longer for a customer in a country where the platform keeps a longer minimum: a table the operator edits, not legal advice). The optional Start from (optional) makes each subscription move on its first renewal from that date instead of its next renewal; a yearly plan can wait months for it. The dialog lists what it will do and which subscriptions it leaves alone and why (they renew too soon, already have a change waiting, are run by a payment provider, or belong to a blocked customer).

The same is POST /v1/plans and POST /v1/plans/{code}/versions; the price change is POST /v1/plans/{code}/price-changes.

Tax and retries

The page named Tax and retries holds two settings.

Tax: Payrudder adds these rates on top of the price to the invoices it raises, by the customer's country (the rate without a country covers all others). You set the rates and are responsible for them; an invoice a provider issues is taxed by the provider. Add a rate per country (and Every other country) with a name and a percentage, then Save rates. Payrudder is not a tax engine: see Tax and e-invoices. The same is PUT /v1/tax-rates.

Payment retries and chargebacks: When a charge is declined, Payrudder tries again after each delay below, then gives the invoice up as uncollectible. Delays are in hours (minutes in a sandbox account). Up to six retries, each a whole number of hours from 1 to 720. With none set, the standard delays are shown. Switch on Block the customer when a chargeback opens to block a customer, with the category chargeback, as soon as their bank opens a dispute (no new purchases, open invoices can no longer be paid); it never lifts by itself, you lift it on the customer, and an inquiry does not block. Then Save settings. The same is /v1/dunning-settings.

Coupons and promotion codes

Coupons: A coupon takes a percentage or an amount off the fixed fee Payrudder invoices in advance: once, for a number of periods, or for as long as the subscription lasts. A subscription run by a provider uses a discount at the provider instead. The duration is First fee only, A number of fees or Every fee, with an optional Redemptions limit. A coupon cannot be switched on again once deactivated.

Promotions: A coupon says what is taken off. A customer types a promotion code: many codes can point to one coupon, each with its own limit, expiry and rules. Codes are named one per line or generated; each can be limited to a number of uses, an expiry, a minimum amount, currencies, plans, First purchase only or Once per customer. Redemptions lists every use; a void or a full refund reverses it. The API is /v1/coupons and /v1/promotion-codes.