somewhere in the flow of tokenizing an ACH payment in the sandbox environment, the bank-nonce
endpoint is always returning an error and unable to successfully tokenize. i first noticed it on my local build, but it’s also happening on the Square docs example page here. is this a known issue that is being worked on or has something changed? thanks
{
"errors": [
{
"category": "API_ERROR",
"code": "INTERNAL_SERVER_ERROR",
"detail": "An internal error has occurred, and the API was unable to service your request."
}
]
}
What are the steps to reproduce the error. I just tested our example in sandbox and it worked as expected.
in the tokenization flow, there is a POST request to https://pci-connect.squareupsandbox.com/v2/bank-nonce
that fails
when following the example on that page:
`ach.addEventListener(‘ontokenization’, (event) => {
const { tokenResult, error } = event.detail;
if (error) {
// developer handles error
} else if (tokenResult.status === ‘OK’) {
const token = tokenResult.token;
// developer passes token to backend for use with CreatePayment
}
});
ach.tokenize({
accountHolderName: ‘John Doe’,
});`
the conditional to check for an error always runs
or
add
if (error) {
statusContainer.innerHTML = 'ERROR'
}
to line 52 of the example code on the page and go through the flow.
I was able to replicate this and am escalating to the team. We shouldn’t be returning a 5xx
. We should be instead returning a 4xx
since that values being entered aren’t valid test values. The Sandbox supports ACH bank transfer payments by accepting the test user name user_good
and the test password pass_good
.