Development discussions around Shopify APIs
Return management just got easier! We’ve launched Customer Self-Serve Returns to all Shopify merchants. Click here to learn more!
I'm migrating a few API calls from REST to GraphQL. In REST, there was a test parameter for creating Usage Charges. In GraphQL, this does not exist. I tried creating a usage record for a test subscription, and it worked, but no activity showed up in the App history.
Here is how I think it works, can someone from Shopify confirm?
Thanks!
Hey @Jeff-Blake
In REST, there was a test parameter for creating Usage Charges.
I think the `test` parameter is part of the parent RecurringApplicationCharge, not the UsageCharge.
A UsageCharge created for a test subscription is automatically set to a test. (i.e. not billed). A UsageCharge created for a test subscription is automatically set to a test. (i.e. not billed). It is not possible to create a test usageCharge for a non-test subscription as the `test` parameter does not exist for the appUsageRecordCreate mutation.
Yep, that all sounds accurate.
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@SBD_ Does that mean I will not see a charged amount for appUsageRecordCreate in a test mode(e.g., when the subscription is a test mode subscription)?
Upon appUsageRecordCreate I always get balanceUsed as "0.0" for test mode subscription, also there is no charge happened to the merchant at shop admin. As explained here.
In that case, how can I make sure I charge the merchant the correct amount before pushing live?
Thank you.
Never mind, app reinstall did the trick.
User | RANK |
---|---|
16 | |
7 | |
6 | |
6 | |
5 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022