To ensure accurate billing for customers whose subscriptions have usage-based pricing, usage must be recorded in Turnstile before the close of each billing period.
Usage can be added manually, or you can use the Turnstile API to have usage added automatically.
| API | Manual |
Pros | Fully automated. Turnstile automatically sends all invoices. | No API integration required. |
Cons | Requires upfront API work. | Invoices must be manually sent every billing period. |
Record usage automatically via the API
When creating usage events via the API, use turnstile_customer_id as the customer_alias to identify the customer. A stripe_customer_id may also be accepted in certain cases.
Usage events must be added before the scheduled issue date. Any events added after the scheduled issue date will not be included on the current invoice and will appear on the next period instead.
Note: Turnstile processes usage events asynchronously, so aggregated usage on upcoming invoices might not immediately reflect recently received usage events.
Record usage manually
You can manually enter usage data from the customer page or the invoices workflow page in Turnstile.
Manually add usage from the customer page
Open the customer page and scroll to the Usage section.
Click + to open the Add usage event window.
Enter the number of units and select the date of the usage event.
Click Save and add more to enter additional usage events, or Save and finish to close the window.
Once the usage event has been entered, Turnstile will immediately recalculate invoices to reflect the newly added data.
Manually add usage from the invoices workflow
Invoices with active usage periods (within 30 days) appear in the in progress section of the invoice workflow page.
Head to Invoices > Invoice workflow.
Click the In progress tile.
Click an invoice to open a side panel with the invoice details.
Click the + plus icon for the usage-based product to open the Add usage event window.
Enter the number of units and select the date of the usage event.
Click Save and add more to enter additional usage events, or Save and finish to close the window.
Once the usage event has been entered, Turnstile will immediately recalculate invoices to reflect the newly added data.