Cannot retrieve if UsageCharge was a `test` via the API

14 0 2

The API docs as well as the responses I'm fetching using the Ruby Gem do not include the test property. I'm creating usage charges like this:


usage_charge = "desc", price: 1, test: true)
recurring_application_charge = ShopifyAPI::RecurringApplicationCharge.current
usage_charge.prefix_options = {recurring_application_charge_id:}!

Is that correct? The `test` property can be `true` or `false` ?


Shopify Staff
Shopify Staff
240 32 37

Hey @Event-Ticketing,


Test value can be true or null (more info):


For testing purposes you can include"test": truewhen creating the charge. This prevents the credit card from being charged. Test shops and demo shops cannot be charged.

The recurring charge ID will be generated when you save the charge.

14 0 2

@scottydont I've been submitting the `test` parameter as `true` or `false`


Will using `false` not create a real charge? I have revenue in the application, so it seems to be working, but a lot of things aren't adding up like the App history is not showing all of my usage fees I'm creating.


Can you look into my application, ID 1855253 and see if anything is amiss?


Some issues I'm having:

  • App history not showing all of my Usage Charges
  • Inability to query UsageCharge API to determine if a usage charge is a test or not
  • billing_on parameter for usage charges are returning null, for example UsageCharge ID 19606427. This is concerning because it suggests I won't get paid for this
  • What happens if a shop changes their plan (RecurringApplicationCharge) with pending Usage charges that haven't been invoiced yet? For example, the usage charge ID 19606427, the API  returned Sat, 14 Dec 2019 for the billing_on date when I created it, but now when I query it, the billing_on is null