recurring application charge api

Highlighted
Excursionist
19 1 0

Hi

 
Thanks for the help in advance!!
 
I have created an app for optimizing images of shopify store and now I am trying to add billing api for my app. I have added recurring application charge with the help of "https://help.shopify.com/en/api/reference/billing/recurringapplicationcharge". When I have tried to activate my recurring charge for my application, then it was gave me response like the below.
 
[response] => {"errors":"This charge must have an 'accepted' status before it can be activated. Please redirect the shop owner to this charge's confirmation_url."}
 
can you please help me out how can I change the status of payment method from pending to accepted ?
 
Thanks & Regards,
Vikas Rana
0 Likes
Highlighted
Shopify Partner
1777 211 370

The charge is changed to accepted when the store's owner clicks accept when landing on confirmation_url, so it is an interactive action the merchant has to perform. Once that happens (either the charge is accepted or declined) Shopify would redirect back to your app with the status, and you can either activate it (if accepted by merchant) or retry it (if declined).

 

More information and an example of a complete flow here - https://help.shopify.com/en/api/guides/charging-for-your-app/guides/implement-billing-model

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
1 Like
Highlighted
Excursionist
19 1 0

Thanks for replying.

 

Recurring billing charge status was changed, but how can I activate the billing method for a merchant ? 

I have created my app with the laravel framework, when it was redirected to my app then it will gave me not found issue for my redirected url, if you have any laravel shopify app reference then please share it with me. Again thanks for your help.

 

Regards,

Vikas Rana

0 Likes