Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Unable to Continue an Abandoned Billing Flow

Solved

Unable to Continue an Abandoned Billing Flow

kyle_truong
Shopify Partner
60 6 16

I've implemented a Recurring billing flow using the Billing API and it works assuming the merchant goes from start to finish without stop but if the merchant installs and drops drops off then he/she cannot re-initiate the flow. Here's what I'm expecting from the merchant's perspective:

 

Expected:
- Merchant clicks add app
- Merchant is redirected to install confirmation screen with scope
- Merchant accepts 
- app creates charge and redirects to confirmation URL
- Merchant closes the app (maybe needs time to think about accepting the billing charge) ***
- Merchant opens back the app
- app creates charge and redirects to confirmation URL
- Merchant accepts charge and app is successfully installed and billed

Actual: 
- Merchant clicks add app
- Merchant is redirected to install confirmation screen with scope
- Merchant accepts 
- app creates charge and redirects to confirmation URL
- Merchant closes the app (maybe needs time to think about accepting the billing charge) ***
- Merchant opens back the app
- app creates charge and redirects to confirmation URL
- Shopify admin blocks the redirect

I've confirmed that in both cases the charge is created and saved to the DB successfully. It seems the only way the merchant can complete the billing flow is to uninstall the app and try again but this is not clear and can easily lead to misunderstandings and assumptions that the app just doesn't work despite being installed. What's the accepted way to continue an abandoned billing flow or is there something I'm doing wrong?

For reference, here are what my successful and unsuccessful redirects to the confirmation url look like:
Screen Shot 2019-04-15 at 10.41.57 AM.pngScreen Shot 2019-04-15 at 10.42.20 AM.png

Accepted Solution (1)

kyle_truong
Shopify Partner
60 6 16

This is an accepted solution.

After a bit more debugging I'm starting to think this is intended as a security feature. The moment the merchant declines the charge it seems to render the app unusable. I can open the app again and confirm the hmac validation passes but anything returned from my app is blocked.

View solution in original post

Replies 2 (2)

kyle_truong
Shopify Partner
60 6 16

This is an accepted solution.

After a bit more debugging I'm starting to think this is intended as a security feature. The moment the merchant declines the charge it seems to render the app unusable. I can open the app again and confirm the hmac validation passes but anything returned from my app is blocked.

kyle_truong
Shopify Partner
60 6 16

I'm not sure if something else changed but it seems that despite installing the app properly Shopify blocks the rendering of any requests I make when opening the app from the dev dashboard.

Edit: Nvm, this seems something non-related. Though I'm still not sure about the initial issue.