What's your biggest current challenge? Have your say in Community Polls along the right column.

How can I handle recurring charge declines in PHP API?

How can I handle recurring charge declines in PHP API?

haleema
Shopify Partner
4 0 2

Hello!

I've integrated billing using a PHP API library. However, the billing charge page only appears the first time the app is installed. When I revisit my app without approving charges, it still shows the app as open. Ideally, it should redirect to the confirmation URL every time I open the app unless the user approves the charges. Has anyone found a solution to this issue? The library came with pre-built routes and billing classes, and I've made some configuration changes. How can I handle this situation and handle billing declines?

Reply 1 (1)

karanviroja
Shopify Partner
1 0 0

I am also facing same issue. In CLI app with php template shopify handles billing process we only need to change plan details in config/shopify.php file.
When we decline the payment and open our app again then it should not open without payment. Still we access the app without payment. The billing model not opened again after we decline the charge.