Implementing a Usage-Based system for our app that we want to take. So I had some issues I wanted to clear up.
We charge our clients 0.1 cents per minute of call. Given that our call volume can be high, if we batch our charges and send shopify the usage charge at the end of the day, is that fine? since our services only operate from 9-9.
Will shopify automatically invoice our merchants at the end of the month?
Will shopify verify by us before sending out a invoice? much like a confirmation email?
There is another graphql endpoint for monthly charge, does that play a role here at all?
If accidentally a wrong merchant is invoiced, or invoiced with the wrong charge or doubly charged, are there ways to rollback this accident? I know this would be on the backend, but still.
Yes you can choose to post usage charges in real time (within API rate limits of course), or batch them at a cadence that makes sense for you.
Yes, all app charges including usage charges are billed directly to merchants via their Shopify bill. You don’t have control over the time of month, it’s dependent on the merchant’s Shopify invoice timing.
No - you can use the Admin GraphQL API to retrieve the current usage balance on the merchant’s Shopify account
The reoccurring amount is another line item on your app subscription mutation. It’s a separate line item from the usage line item.
Yes, you can issue refunds through the app dashboard, or issue app credits.
I would tie a usage charge to a specific resource that your app provides. In your case, it sounds like a call is the main value. So you can leave the unique call ID in the description of the usage charge.
That way you can identify and link back to resources in your own database to verify they are tied to the appropriate account.
I also highly recommend making your usage charge logic idempotent. Store the unique appUsageRecord ID in your database on the record for your “call” object. That way you can make sure you have a corresponding charge and don’t accidentally double charge.
Make sure you have a plan for accounting for merchants that are approaching their usage limit cap, and add messaging and an easy way to update their subscription if they are close to exceeding it or have exhausted their balance.
Thank you for this answer, it really really helps. I also wanted to ask, what’s the normal behavior in usage apps?
When the user first installs the app, we only prompt them to set a monthly limit. Is that it? No other consent or anything? Or am I missing something?
Then as they approach that limit, it’s up to you to update messaging to prompt them to consent for another subscription update (or just ask them to switch plans).
It’s a very flexible design, but merchants attention is very narrow. I would be very careful.