RedditPP Mascot

RedditPP

r/ShopifyAppDev • … • u/vaccine_question69

How to implement a credit-based pricing model?

I have an action which costs me a fixed amount every time a merchant uses it.

Managed pricing is no good because it doesn't deal with credits at all. It's a monthly flat price, which fails to account for the merchant's under- or overusage.

appUsageRecordCreate et. al. is no good because it charges the merchant end of month which can result in a surprise bill (yes, there are caps, but still).

I think the most UX friendly way is to pre-purchase credits and let the action consume that. What is the best way to implement this? Is it via appPurchaseOneTimeCreate or is there a better way?

— 0