In a shopify app, I want to charge based on usage, but use a step function to determine the charge.
For all usage less than 300, charge $10
For all usage greater than 300, but less than 1000, charge $22
For all usage greater than 100, but less than 3000, charge $50
For each additional 1500, charge $10
Please write the billing code/requests needed to create a billing scheme such as this.