Can't change script from SANDBOX to PRODUCTION in my source code

We have been maintaining a laravel project that used square payment. What different is the project used SANDBOX script with source file instead of cdn link

The above link is used in the page and It is ok and tested. Now I would like to change to production mode. I change Environment::SANDBOX to Environment::PRODUCTION but I can’t find the right link to change the abouve script. And I would like to have the correct link and like to know if anyting I need to make for production.

: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

Move OAuth from the Sandbox to Production
Square PHP SDK Quickstart
Deploy the Server

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.

To switch from the Square Sandbox environment to the production environment, you need to replace the Sandbox script source URL with the production URL. The production URL for the Square Payment Form script is “”. So, your script tag should look like this:

<script type="text/javascript" src=""></script>

Also, ensure that you replace your Sandbox access token and application ID with your production credentials in your server-side code. These credentials can be found in your Square Developer Dashboard under the production settings of your application.

This answer was reviewed by @Bryan-Square.