Hello, I am testing cashin using nodejs sdk, and every time when I try it, it takes time in pending, and after about 10 minutes it always fails, with no error or logs to tell me what’s going wrong.
I am using an approved phone number.
One of my failed transaction ref is
8c586f6b-6620-4fa4-a529-abe5286da927
This is how I am testing it:
const cashIn = async (req, res) => {
try {
const { number, amount } = req.body;
const response = await fetch("https://payments.paypack.rw/api/transactions/cashin?Idempotency-Key=OldbBsHAwAdcYalKLXuiMcqRrdEcDGRv", {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: `Bearer ${access_token}`,
},
body: JSON.stringify({
amount,
number,
}),
});
const data = await response.json();
console.log(data);
res.status(200).json(data);
} catch (err) {
console.log({err});
res.status(500).json({
error: {
message: err.message,
name: err.name,
}
});
}
};