Offsite payment extension stopped working

All of a sudden today at around 1:12pm eastern the staging version of our payments app (which is just a single offsite payment extension) stopped working. Specifically it appears to never be initiating a payment session. We haven’t made any configuration changes or pushed a new version in a few days. We confirmed that Shopify is never attempting to even hit payment_session_url by updating it to a URL that just captures all requests. Is it possible there’s a shopify side issue? Is there some way to debug this? I scoured the docs for any mention of a log or anything but since this is a Shopify backend –> our backend request we have zero visibility. Any suggestions?

EDIT: confirmed that app is still installed, it’s still showing up as a payment method in settings, it’s still displaying as an option on checkout, when we click Pay Now it loads for a second and then displays “There was an issue processing your payment. Try again or use a different payment method.”

Hi @a24seth,

We can certainly help look into this behaviour with you, though we will need you to reach out to the Shopify Support Team via the Shopify Help Center, while logged into your Partner account, with a specific example for us to look into further, to ensure we are fully authenticated with any shops or partner accounts involved.

When you do reach out, please have the following information prepared to ensure efficeint troubleshooting from our team.

  • The name of the app
  • The payment session URL that the request should be sent to
  • The full checkout URL from an example checkout where this occurred
  • A HAR file recording showing the behaviour when you click the Pay Now button

Here’s some additional information on how you can record a HAR file from the most popular web browsers.

Note: HAR files can contain login information/credentials and session cookies. For data privacy purposes, please avoid entering/recording personal details such as passwords and credit card information. It would be best to record the HAR via an Incognito window.

Chrome

  1. Open the Developer Tools from the menu (Menu > More Tools > Developer tools), or by pressing Ctrl+Shift+C on your keyboard.
  2. Click on the Network tab.
  3. Look for a round button at the top-left of the Network tab. Make sure it is red. If it is grey, click it once to start recording.
  4. Check the box next to Preserve log.
  5. Use the clear button (a circle with a diagonal line through it) right before trying to reproduce the issue to remove any unnecessary information.
  6. Reproduce the issue (E.g. load/refresh the page that has errors, or perform the action that has errors).
  7. Save the capture by right-clicking on the grid and choosing Save as HAR with Content. Alternatively, you can click the export/save button (downward arrow with a line underneath).

Safari

  1. In Safari, go to the page where the HTTP(s) URL Sequence needs to be monitored.
  2. Enable Developers Tool by going to Safari > Preferences > Advance > Click Show Develop menu in menu bar
  3. In the menu bar at the top, click Develop and select Show Web Inspector.
  4. Click the Resources tab and enable Preserve Logs.
  5. Go to the Network tab.
  6. Reproduce the issue (E.g. load/refresh the page that has errors, or perform the action that has errors).
  7. After successfully performing the activity, lick the Export icon and save the HAR file.

Firefox

  1. In Firefox, go to the page where the issue is occurring.
  2. Click the Firefox menu available at the top-right of your browser window and select Web Developer → Network, or simply press the F12 button. The Developer Tools window opens as a docked panel at the side or bottom of Firefox.
  3. Click the Network tab.
  4. Click on Network Settings and enable Persist Logs.
  5. Now refresh the page and perform the activity that needs to be recorded i.e. the activity that produces the error.
  6. After successfully performing the activity, right-click on any row of the activity pane and select Save all as HAR or click the Export HAR icon and select Save all as HAR to download the HAR file.

Edge

  1. Open Microsoft Edge and navigate to the page where the issue is occurring. Note: This is tab and window dependent, so if the issue occurs in a new tab or window, the HAR recording needs to be done in that new tab or window.
  2. Click the horizontal ellipsis menu button and select More Tools, then click Developer Tools.
  3. Click the Network tab, and then click the Record button in the upper left corner of the tab and verify that it is red, if it is grey, click it to start recording.
  4. Check the box Preserve Log.
  5. Click the Clear button to clear out any existing logs from the Network tab. Note: Do not close the Developer Tools panel. This will end recording and the HAR file will be lost.
  6. Reproduce the issue while the network requests are being recorded.
  7. Once you have reproduced the issue fully, right-click anywhere on the grid of network requests and choose Save as HAR with Content, and save the file to the computer.

Thanks Kellan, we’re still not quite sure how this happened, but we threw spaghetti at the wall and found that running this mutation again worked paymentsAppConfigure. It’s unclear why this worked since we also ran it two days ago and we didn’t make any app updates since… I think the broader question here is what are the proper channels for getting support on something like this in the future and are we correct that there really aren’t any developer accessible ways to observe what’s gone wrong here? We looked quite closely at the browser network requests, but there’s not much in there since this is (a) browser –> (b) shopify backend –> (c) our self hosted payment gateway backend and the issue was happening between b and c, the browser wasn’t having any issues. Would be great if (b) → (c) issues were surfaced somewhere (dev dashboard for example).

Hi @a24seth,

I’m glad to hear you got the issue resolved! It’s hard to say what could cause the payment app from being deactivated like that without looking into specific examples on our end, though typically it’s from the app being uninstalled and reinstalled, which is mentioned in the Shopify.dev docs here:

Uninstalling a payments app breaks order management. For example, an uninstalled app isn’t available for use with any outstanding order returns. If an app is reinstalled after an uninstall, then you need to call the paymentsAppConfigure mutation again.

As for troubleshooting issues like this in the future, your best bet is to reach out to the support team directly via the Shopify Help Center, with specific examples that we can look into on our end to confirm if the payment session request is being sent or not, to where, and see any errors that are returned internally if any.

We would need you to reach out through the Help Center directly, to ensure that we are authenticated with the correct Partner Accounts and Stores involved, and so you can provide us with specific examples to look into, including the details I mentioned in my previous post. We should be able to look into this behaviour with just the App and Checkout details, we probably don’t need the full HAR file for this case, but it would help to have just in case so we have the full context of all events that happened in the storefront and checkout leading up to the issue.

As for observing the requests on your end, unfortunately that is not available via the Dev Dashboard at this time for Payment Extension apps, the only logs that are available via the Dev Dashboard are Deprecated API calls, Webhook Requests, and Function Run Logs.

I do agree that Payment Session Requests for payment apps should also be logged in the Dev Dashboard as well, similar to Webhooks, and I will be submitting some feedback on your behalf internally that we would like to see this added in the future.

1 Like

Thanks!

We did uninstall the app and reinstall it, but we immediately called the paymentsAppConfigure mutation - we know this was successful because the offsite payment method was not available to be added to “Additional payment methods” until after we called the mutation. We called it, added our payment method and tested it. It was working flawlessly. It wasn’t until 2 days later that it all of a sudden stopped working. We checked and the app was still installed and still showed up in the “Additional payment methods” (which along with the install logs confirmed it has not been uninstalled during this 2 day window). Calling this mutation again immediately resolved this issue. It’s all very mysterious!

Hey @a24seth,

That definitely does sound odd. If you experience this again, please do reach out to our Shopify Support Team via the Help Center, logged in with a Partner or Merchant account with access to the store or app in question, and provide us with the store name, app name, and timeframe when it occurred, and we can definitely look into it further.