We’ve been receiving an intermittent not-authorized error when creating payments.
The error would go away when we retry in 1 minutes (as can been seen in the req/resp attached below)
Any suggestions why we are getting this errors or how we can fix that?
I found the error for that location (9JDDYZQ61HE7Y). The access token that was being used was for another merchant account that doesn’t have access to this location. I do see the order was successfully created for this location (9JDDYZQ61HE7Y), so I’m not sure how it got changed, but the CreatePayment request was definitely for a different merchant account.
We do not log the actual access token for security reasons, but I can see the merchant that is tied to the request, and the CreatePayment request was for a different merchant (it doesn’t have that location), which implies it is a different access token.
Does your application do many requests/functions in parallel? I’m wondering if even though it was a retry, is there any possibility of the access token (merchant) being swapped before the retry (ie is there another part of your code that runs at the same time that can change tokens)?
We process many requests at the same time. Our team is now investigating a potential race condition or anything else like that which could have caused this.