Hello all,
An app I have built has run into an issue where I am unable to create a Usage Charge (through the REST API) to use up the remaining allowance on a RecurringApplicationCharge. Below is the data concerning the Recurring Application Charge (from a GET RecurringApplicationCharge call):
{
"recurring_application_charge": {
"price": "0.00",
"status": "active",
"billing_on": "2022-01-08",
"created_at": "2021-12-09T14:58:17+00:00",
"updated_at": "2021-12-09T14:58:24+00:00",
"test": false,
"activated_on": "2021-12-09",
"cancelled_on": null,
"trial_days": 0,
"capped_amount": "41.00",
"trial_ends_on": "2021-12-09",
"balance_used": 31.49,
"balance_remaining": 9.510000000000002,
...
}
}
If I make a request to create a Usage Charge with the following body, the response has status 406:
{
"usage_charge": {
"description": "arbitrary test description",
"price": 9.510000000000002
}
}
Note: I have also tried using a truncated price amount of just 9.51 which returns the same response.
The endpoint I am using to create the application charge is:
{{store}}.myshopify.com/admin/api/2021-10/recurring_application_charges/{{charge_id}}/usage_charge.json
I’ve become stuck on this issue and would be very grateful for any help! Let me know if any additional information would be useful,
Many thanks.