Enabling square for slow-speed connections

I ran a simulation in Firefox by using web developer tools and changing the throttle setting to GPRS (slowest connection speed). Unfortunately, your script square.js does not like slow connections.

I did find a phone provider Lucky mobile. They state with some of their data plans that if one exceeds their alotted data, they can use the internet for the rest of the month for a speed of up to 128kbps both upload and download. That’s why I ran tests of my shopping card in firefox with GPRS mode selected for throttling so I can simulate a slow speed.

Is there a way to configure the web SDK so that people with slow internet connections can still place orders?

Uncaught (in promise) Error: Web Payments SDK was unable to be initialized in time
    n https://sandbox.web.squarecdn.com/v1/square.js:3
    n https://sandbox.web.squarecdn.com/v1/square.js:3
    setTimeout handler*wr/< https://sandbox.web.squarecdn.com/v1/square.js:3
    r https://sandbox.web.squarecdn.com/v1/square.js:3
    Zd https://sandbox.web.squarecdn.com/v1/square.js:3
    Xd https://sandbox.web.squarecdn.com/v1/square.js:3
    a https://sandbox.web.squarecdn.com/v1/square.js:3
    Jd https://sandbox.web.squarecdn.com/v1/square.js:3
    Jd https://sandbox.web.squarecdn.com/v1/square.js:3
    Zd https://sandbox.web.squarecdn.com/v1/square.js:3
    build https://sandbox.web.squarecdn.com/v1/square.js:3
    yh https://sandbox.web.squarecdn.com/v1/square.js:3
    fh https://sandbox.web.squarecdn.com/v1/square.js:3
    a https://sandbox.web.squarecdn.com/v1/square.js:3
    gh https://sandbox.web.squarecdn.com/v1/square.js:3
    gh https://sandbox.web.squarecdn.com/v1/square.js:3
    yh https://sandbox.web.squarecdn.com/v1/square.js:3
    u https://sandbox.web.squarecdn.com/v1/square.js:3
    mh https://sandbox.web.squarecdn.com/v1/square.js:3
    fh https://sandbox.web.squarecdn.com/v1/square.js:3
    a https://sandbox.web.squarecdn.com/v1/square.js:3
    gh https://sandbox.web.squarecdn.com/v1/square.js:3
    gh https://sandbox.web.squarecdn.com/v1/square.js:3
    mh https://sandbox.web.squarecdn.com/v1/square.js:3
    initializePayment https://sandbox.web.squarecdn.com/v1/square.js:3
    initializePaymentMethod https://sandbox.web.squarecdn.com/v1/square.js:3
    getPaymentContext https://sandbox.web.squarecdn.com/v1/square.js:3
    Of https://sandbox.web.squarecdn.com/v1/square.js:3
    a https://sandbox.web.squarecdn.com/v1/square.js:3
    wf https://sandbox.web.squarecdn.com/v1/square.js:3
    wf https://sandbox.web.squarecdn.com/v1/square.js:3
    getPaymentContext https://sandbox.web.squarecdn.com/v1/square.js:3
    setLocale https://sandbox.web.squarecdn.com/v1/square.js:3
    Of https://sandbox.web.squarecdn.com/v1/square.js:3
    a https://sandbox.web.squarecdn.com/v1/square.js:3
    wf https://sandbox.web.squarecdn.com/v1/square.js:3
    wf https://sandbox.web.squarecdn.com/v1/square.js:3
    setLocale https://sandbox.web.squarecdn.com/v1/square.js:3
square.js:3:297900

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

In-App Payments SDK Quickstart
In-App Payments SDK Quickstart
Square Developer

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The error you’re encountering is due to the Web Payments SDK not being able to initialize in time due to the slow connection speed. The SDK has a built-in timeout for initialization to ensure a smooth user experience under normal network conditions.

Unfortunately, there’s no direct way to configure the Web Payments SDK to extend this timeout period for slower connections. However, you could potentially implement a retry mechanism in your application. If the SDK fails to initialize due to a timeout, your application could attempt to initialize it again. This could help accommodate users with slower internet connections.

Please note that while this might improve the experience for users on slow connections, it could still lead to longer loading times for your payment form. It’s important to ensure that your application handles these cases gracefully, perhaps by showing a loading indicator or a message to the user to let them know that the payment form is still loading.

This answer was reviewed by @Bryan-Square.

What is the timeout period?
I want to inform all my new potential customers before they enter the shopping cart so they don’t waste time waiting only to see a loading error from your sdk.