I am currently working on a Shopify app the employs the Recurring Application Charge billing model. The app has been installed by a store and a RecurringApplicationCharge has been created, in this case with a cap of $4.00. Below is a screenshot of the charge information returned from the API:
I have tried applying different amounts, all with the same outcome. In the past, we have been able to apply usage charges to this store with previous tests. However, upon most recently creating a RecurringApplicationCharge on this store, we haven’t been able to get past this issue.
I would be grateful for any help or insight into this.
Thank you for your quick reply, and thanks for getting this post into the right place. I went back over the RecurringApplicationCharge creation and we did set terms upon creation so unfortunately doesn’t look like the problem.
We have also since (using the same code/configuration) created a new charge with the store which is working correctly and accepting UsageCharges.
Let me know if additional information is required to assist in understanding this problem, and thanks again for your help so far.
Looking in to this problem further it looks we have come up with 2 things we think could potentially be the problem and are wondering if you can help us with this,
that the first application charge was cancelled and then the next one is locked in to this “Total price exceeds balance remaining” state
or that there is an issue with the floating point problem as the balance remaining some time sis incorrect and looks like it due to this “balance_remaining”: 1.1099999999999999,
Ran into a similar issue with a client of ours. Here’s what looks to be going on:
E.g
Client starts a subscription Jan 1 → Jan 30, 10$ cap. (created_at=jan 1, billing_on=jan 30)
Jan 15, cap is reached.
Jan 16, client cancels sub.
Jan 17 client creates a new sub, max cap 20$ (Note the created_at=jan 17, and billing_on=jan 30)
You charge the client 1$ on jan 18 → Technically even though the first sub is cancelled, that “max cap” is still being adhered to. From a merchant perspective this makes sense (I guess?), but anyways, the API responses should be updated IMO to make this more clear.
On feb 1, if you try to charge the client 1$ it’ll work fine.
Generally the “hint” of this can be seen in the fact that you’re “created_at” date and the “billing_on” date aren’t 30 days apart in the new sub. That “billing_on” date is probably 30 days from the “first subscription”
TLDR: The client’s first sub limits are being adhered to regardless of a cancel/new sub. Once the “billing_on” date is reached, the new threshold will be used and things will go back to normal.