Solved

Shopify saves payments app redirect URL

dabedala
Shopify Partner
18 1 0

Hi Team,

We've noticed that Shopify is saving the "redirect URL for a payment page hosted by the Partner's app" for abandoned checkouts, causing transactions for those orders to break on retries.

 

Further Explanation

For new transactions, shopify follows the steps in API Docs guide. But for abandoned checkout orders, Shopify omits step number 1 and proceeds to redirect customers to the return url sent by payments app provider in the first step. 

 

Issue

Our payments app generates a new token on each transaction request. This token expires after some time, and unless Shopify follows the flow in API Docs guide, requests using the old token will fail as the token expired.

 

Could you please advise when/will this be solved?

 

 

Accepted Solution (1)

_JCC_
Shopify Staff
200 27 55

This is an accepted solution.

This is expected behavior on our end. If the buyer reaches the point of checkout where the payment session is initiated but the buyer doesn't complete the payment step the checkout will be abandoned, and Shopify will not re-initiate a new session if the buyer returns to complete the checkout. In this environment, the only time Shopify would re-initiate the payment session is if the contents of the cart were changed.

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 5 (5)

_JCC_
Shopify Staff
200 27 55

This is an accepted solution.

This is expected behavior on our end. If the buyer reaches the point of checkout where the payment session is initiated but the buyer doesn't complete the payment step the checkout will be abandoned, and Shopify will not re-initiate a new session if the buyer returns to complete the checkout. In this environment, the only time Shopify would re-initiate the payment session is if the contents of the cart were changed.

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

jazeel
Shopify Partner
9 0 0

Hi @_JCC_ ,

I am having similiar issue. When we get a payment request from shopify then we create a url & that url will be expired after 30mins, we will process payment if we get request before 30mins & we will not process the request if we get that url after expiry. And now some customers are facing issues due to that.

So, I would like to know how long shopify will save that url? is there any expiry for that payment?

Please help, so that we can implement accordingly for shopify payment request.

_JCC_
Shopify Staff
200 27 55

@jazeel the redirect url is stored with the checkout and will last as long as the checkout object exists and is not completed. So a user that abandons the checkout before completing the payment step on your infrastructure and later tries to complete that abandoned checkout will come back with the same redirect_url you originally provided. We will only start a new session if the amount or other info like addresses changes.

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

jazeel
Shopify Partner
9 0 0

Hi @_JCC_ ,

Thank you for response.

So the abandoned checkout will never be expired?

Should we increase our expiry time to 24hours? Can you please suggest?

_JCC_
Shopify Staff
200 27 55

An abandoned checkout with no changes can exist for up to three months.

 

Abandoned checkouts not completed but with updates can last longer than that, but updates to info like address, line items and quantities would always start a new payment session.

 

Given the life of the abandoned checkout, the question I have is if the auto expiry on your end is necessary. If the payment session was never resolved or rejected because the buyer never completed a step on your end, and nothing has changed with the checkout we don't currently start a new session.

 

I realize this means there's no predictable expiry of an abandoned checkout and you'll have payment sessions never being completed on your end but it's how the current flow works.

 

Chatting with the payments app team I believe long term this will get resolved where you can use a payment session expiry as you are now without worry. Unfortunately I don't have a date on when that will happen.

 

Regards,

John

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog