ACH Payment Error - With Production Credentials

Hello,

Everything works fine with sandbox ACH transactions. But, when I put in my production details appId and locationId I get an error.

“missing-credentials”

document.addEventListener('DOMContentLoaded', async function () {
       if (!window.Square) {
           throw new Error('Square.js failed to load properly');
       }

       let payments;
       try {
           console.log(appId);
           console.log(locationId);
           payments = window.Square.payments(appId, locationId);
       } catch {
           const statusContainer = document.getElementById(
               'payment-status-container'
           );
           console.log('missing credentials')
           statusContainer.className = 'missing-credentials';
           statusContainer.style.visibility = 'visible';
           return;
       }

I double checked that the appId and locationId are correct.

Do I need to do something with OAuth first? I didn’t think I needed to.
Am I missing something? Or is there a bug?

Any help would be appreciated. Thanks!

As log as all the credentials are set to production there shouldn’t be any additional configurations. Whats your application ID?

sq0idp-xMpN6NrtCeS0M9HRd676VQ

Is it possible I should just create a new app with new credentials?

It turns out I missed this javascript link

<script type="text/javascript" src="https://sandbox.web.squarecdn.com/v1/square.js"></script>

Glad to hear that you figured it out. :slightly_smiling_face:

But you said you were working on Production. How your code is going to work in production if you are instancing sandbox?

The solution for this was moving from:

https://sandbox.web.squarecdn.com/v1/square.js

to

https://web.squarecdn.com/v1/square.js

in order to process production payments. :slightly_smiling_face: