Problem transitioning from sandbox to live

I have a working payment system in the sandbox and am ready to go live.
I’ve switched out my application ID and access token.
I’ve changed my endpoint from
https://connect.squareupsandbox.com/v2/payments
to
https://connect.squareup.com/v2/payments
NOW, when I ran my first sample run with a live credit card, it doesn’t work. My program shows nothing returned.
When I check the API logs, there is nothing showing that a transaction was even tried.
I’m not sure how to troubleshoot this.

:wave: Did you also update script references. In the ADD SCRIPT REFERENCES section, you added script references in index.html. Update the domain string in the JavaScript reference from sandbox.web.squarecdn.com/v1/square.js to web.squarecdn.com/v1/square.js.

If so what’s the error you’re getting and what’s you application ID? :slightly_smiling_face:

I did update the js reference.
My application ID is sq0idp-1BlRPwlJHlWPyt3VCcDMig.
I’m using the SocketTools Library Edition to make the API call. It isn’t giving me any return JSON, but it was working with sandbox.
thanks

I took a look at the logs and I’m seeing that you’ve successfully created the source_id in production but I don’t see any attempts to call CreatePayment. The issue has got to be somewhere right after the source_id generation and the server side call to Square. :slightly_smiling_face:

OK.
Do you see anything wrong with this?

{
	"source_id": "cnon:[removed code went here]",
	"idempotency_key": "36_813633",
	"amount_money": {
		"amount": 100,
		"currency": "USD"
	}
}

my endpoint is
https://connect.squareup.com/v2/payments

That request is correct. I’m just not seeing the POST to the endpoint in your API Logs. So that mean that the endpoint isn’t being called. :slightly_smiling_face:

thanks for checking that… I’ll look from that point

Hi:
I’ve traced it down to HTTP error 426, so I think my request is getting rejected by the server.
Can you tell me if the Square Live Server requires HTTP 2.0?
Thanks

With Square’s APIs, HTTPS is required for all API calls to Square endpoints. Unencrypted HTTP API calls will not work. :slightly_smiling_face:

I mean specifically HTTPS 2.0, versus HTTPS 1.0

I’m trying to confirm but I believe you’ll need to use 2.0. :slightly_smiling_face:

That’s what I’m afraid of because Socket Tools won’t support HTTPS v2 until the next release. It’s odd that it works in the sandbox though.
If so, I’ll need to do the request using Python or something I suppose.

Did you happen to verify if HTTPS v2 is necessary?
It’s odd that it works in the sandbox but not on the live server so before I retool everything it would be nice to know if that were the case.
Thank you!

I know that 1.0 is no longer accepted but not sure about 1.1. We definitely recommend upgrading. :slightly_smiling_face:

I re-did the payment submission using python and it’s working. Thanks

Glad to hear it’s working! :slightly_smiling_face: