After creation of cnon payment method using react-native-square-in-app-paymentsV1.7.6, and create delayed payment and then complete payment, it’s using square node SDK in the backend version 37.0.0 and the payment response is getting the following error.
“errors”: [
{
“category”: “INVALID_REQUEST_ERROR”,
“code”: “NOT_FOUND”,
“detail”: “Card nonce not found”
}
]
- I’ve done some research and some questions regarding to this mentioned that it could be a mismatch environments in the client and the backend, this’s not the case due to
some payments with cnon payment method are completing ok and it works as expected. - Also the creation of the cnon uses Production Application ID - sqOidp-********* and the backend - Production Application- secret- this gets refresh an Auth access token. The access token can be from the main access token or the seller access token, because it’s using different locations attached to merchantId,
Please find the delay payment request
const response = await squareClient.paymentsApi.createPayment({
sourceId: paymentNonce,
orderId:orderId,
idempotencyKey: uuidv4(),
amountMoney: {
amount: BigInt(totalCents),
currency: 'USD',
},
delayDuration: 'PT24H', // 24-hours delay transaction before the delayed payment void by itself
autocomplete: false,
customerId: paymentCustomerId,
locationId:squareLocationId,
});
and complete payment
const payment = await squareClient.paymentsApi.completePayment(squarePaymentId, {
versionToken: squareVersionToken,
});
is there any other reason why it’s getting back with this error?