Step 1: Configuring Custom Pricing Units for Credits
- Go to Settings > Pricing Units:
- You’ll find a list of real-world currencies, such as USD.
- Custom Pricing Units represent the credits that will be used in your pre-purchase credit ledger.
- Create a Custom Pricing Unit:
- Identifier: Used programmatically to reference credits.
- Display Name: How the credits will appear in the Orb UI.
- Short Name: How credits will be denoted on invoice line items (e.g., “consumed 2
credits
”).
Step 2: Creating a Plan with Custom Credit Pricing
- Create a new plan: For example, “Starter with Credits.”
- Enable Custom Pricing Units: When you add a usage-based price, you’ll see a new input called Price Currency.
- Select Credits instead of USD to charge using your custom credit unit.
- Set up overage charges: If the customer runs out of credits, you can set a price for overages. For example, you might charge $2 for every additional credit used beyond their allocation.
Step 3: Using Allocations to Grant Credits
Allocations allow you to automatically grant credits to customers on a recurring or one-time basis.- Recurring Allocation: For example, you could give the customer 10 credits each month.
- One-Time Allocation: If you only want to provide credits upon sign-up.
- No Rollover: Credits will expire at the end of the month if they aren’t used, preventing accumulation.
Step 4: Adding a Prepaid Credit Balance
- Go to the Customer Profile and add a Prepaid Credit Balance:
- Choose Credits (or USD, depending on your pricing unit).
- Enter the number of credits (e.g., 10 credits) and the Cost Basis (e.g., $2 per credit).
- Set the Effective Date: This determines when the credit block becomes active for drawdown.
- Optional settings:
- You can add an expiration date for the credits.
- Optionally, generate an invoice for the credit purchase (e.g., 10 credits at $2 each will result in a $20 invoice).
Step 5: Creating a Subscription to Track Usage
- Create the subscription for the customer:
- Select the plan that uses the credit-based pricing model (e.g., “Starter with Credits”).
- Align the subscription’s effective date with the credit block’s date to ensure they synchronize.
- Ingest usage events:
- Orb will automatically deduct credits as usage events are sent in. If you backdate the subscription, Orb will replay the ledger to apply the appropriate credits to past usage events.
Step 6: Monitoring Credit Usage and Overages
- View usage events: As usage events are ingested, credits are deducted from the balance.
- For example, if a customer uses 2 API calls, 2 credits will be deducted from their balance.
- Handling overages:
- If the customer exhausts their credit balance, overage charges will apply based on the plan’s settings.
- Example: If the customer runs out of credits and uses additional API calls, they will be charged $2 per credit over the allocated amount.
- If the customer exhausts their credit balance, overage charges will apply based on the plan’s settings.
Step 7: Reviewing Invoices with Credits Applied
- Draft invoices: Orb will generate draft invoices that reflect the usage and credit consumption.
- If the customer stays within their pre-purchased credit allocation, the invoice will reflect a $0 charge.
- If they exceed their credit balance, overage charges will appear on the invoice.
- Currency Matching:
- Orb ensures that usage for a price is deducted from the credit block’s matching currency (e.g., USD or credits).
- However, fixed fees will not be deducted from the credit balance.
- For example, USD fixed fees will not be deducted from the USD credit balance.
- Viewing the Credit Ledger:
- You can view a detailed ledger showing credit increments and decrements.
- Pending states indicate that a usage event is still within the grace period and could change before being “committed”.