A place to discuss charging merchants for your apps and services using the billing API.
Hi! My name is Vitaly. What scopes should I have to add recurring application charges via API?
every time I get an error "recurring_application_charges.json` resulted in a `403 Forbidden` response".
I don't understand what rights I lack.
The plan "test" fields is not affecting the behavior also.
I wonder if this is the case here and charges cannot be tested at all on demo(test) shops.
Copied from Shopify docs:
"Note
For testing purposes you can include "test": true when creating the charge. This prevents the credit card from being charged. Test shops and demo shops can't be charged."
https://help.shopify.com/en/api/reference/billing/applicationcharge
I use Laravel and I've tried packages:
ohmybrew/laravel-shopify
LukeTowers\ShopifyApi
and curl requests, the result is always one -> error.
Facing the same issue. It returns 403 whenever we try to install an app on all new stores.
But when I try this on existing paid old stores with credit card added.. It works.
Not sure why this is happening.. Shopify Support kindly help.
Hey @Enmaboya and @harshul-rzp ,
There is no access scopes needed to use the Billing API and creating a recurring_application_charge for a merchant using your App. Every public app will automatically have permission to do this.
If possible, can you provide me with the value of the X-Request-ID header from the Shopify 403 Error Response? With this value I can better troubleshoot and help you investigate what is causing this error.
Also, please ensure that you are providing all of the correct fields when creating the recurring application charge (i.e. name, price, return_url). Also if you are including the "capped_amount" field you also need to include the "terms" field.
To learn more visit the Shopify Help Center or the Community Blog.
Hey @harshul-rzp ,
Looking through our logs, it appears that your app is a private or custom app? (Please feel free to correct me if I am wrong)
As per the Shopify documentation you can only use the Billing API for public apps. You cannot bill a merchant from a private or custom app.
To learn more visit the Shopify Help Center or the Community Blog.
Hey @hassain Thanks for your reply.
Yes, that's correct. I am trying recurring_application_charges.json API for a custom app. I will try this for my public app.
But, right now I am sure, a month ago this API worked for custom app / private app too.
Let me test this for public app.
@Enmaboya I will post my findings here.. Can you also do the same?
Confirmed.
The recurring_application_charges.json API works ONLY for public apps and not for custom or private app.
If tried with custom or private app, it will throw 403 Forbidden error.
Thanks @hassain for your help on this.
Hi,
Recurring application charge is working for my private app on one store but it's not working on another shopify store.
Can you please help?