Recurring application charge api

AI-generated summary

Implementing Shopify recurring billing for an app is blocked at the charge activation step. The API returned an error saying the charge must be in an “accepted” status before activation, and that the merchant must be redirected to the charge’s confirmation_url.

Key clarification provided:

  • “accepted” cannot be set manually by the app.
  • The shop owner must visit the confirmation_url and approve or decline the charge.
  • After that, Shopify redirects back to the app with the result.
  • If accepted, the app can activate the charge; if declined, it must retry or handle the failure.

The later update is that the charge status was apparently changed successfully, but a new problem appeared in the app flow:

  • After Shopify redirects back to the Laravel app, the return URL gives a “not found” error.
  • The requester asked for Laravel-specific Shopify app references to fix the redirect/activation handling.

Current status: the billing concept was clarified, but the integration remains unresolved due to the broken Laravel redirect route.

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

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

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