recurring application charges scopes

Enmaboya
New Member
4 0 1

 

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.

banned
Replies 8 (8)

harshul-rzp
Shopify Partner
13 0 2

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.

hassain
Shopify Staff (Retired)
624 104 187

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.

harshul-rzp
Shopify Partner
13 0 2
Hey Hassain, Thanks for you reply.

X-Request-ID: a6d073bb-083d-4586-9833-8017be8438d7

This is the request that I posted a few minutes ago. Can you please check
the issue and let me know? Any help would be appreciated.

Thanks in advance!
harshul-rzp
Shopify Partner
13 0 2

Hi @Enmaboya
Were you able to fix this issue?

hassain
Shopify Staff (Retired)
624 104 187

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.

harshul-rzp
Shopify Partner
13 0 2

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?

harshul-rzp
Shopify Partner
13 0 2

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.

Tek
New Member
4 0 0

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?