Code:
const fetch = require('node-fetch');
const bodyData = {
"payoutId": "cf6dff53-597b-4a3f-bd2c-6b914c4766f5",
"amount": "",
"currency": "XOF",
"country": "BEN",
"correspondent": "MTN_MOMO_BEN",
"payer": {
"type": "MSISDN",
"address": {
"value": ""
}
},
"customerTimestamp": "2024-11-27T12:38:03.730Z",
"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);