Code:
const fetch = require('node-fetch');
const bodyData = {
"payoutId": "3f8a9d90-af78-4ec1-9866-dd01043606d2",
"amount": "",
"currency": "XOF",
"country": "BEN",
"correspondent": "MTN_MOMO_BEN",
"payer": {
"type": "MSISDN",
"address": {
"value": "22951345119"
}
},
"customerTimestamp": "2024-11-27T14:33:37.532Z",
"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);