Code:
const fetch = require('node-fetch');
const bodyData = {
"payoutId": "207cc30c-bbf5-4dcf-a5dc-5eadb00f1e8c",
"amount": "",
"currency": "XOF",
"country": "BEN",
"correspondent": "MTN_MOMO_BEN",
"payer": {
"type": "MSISDN",
"address": {
"value": "22951345089"
}
},
"customerTimestamp": "2024-11-27T14:38:15.019Z",
"statementDescription": ""
};
const resp =await fetch('https://api.sandbox.pawapay.com/payouts',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <YOUR_API_KEY>',
},
body: bodyData
});
const data= await resp.json();
console.log(data);