Skip to content

Instantly share code, notes, and snippets.

@ikku47
Last active November 17, 2022 11:23
Show Gist options
  • Save ikku47/e33793e89bc429cbbb13451350efdaef to your computer and use it in GitHub Desktop.
Save ikku47/e33793e89bc429cbbb13451350efdaef to your computer and use it in GitHub Desktop.
Adding beneficiary in cashfree
const axios = require('axios');
const crypto = require('crypto');
const beneId = crypto.randomBytes(10).toString("hex");
const response = await axios.post(
'https://payout-gamma.cashfree.com/payout/v1/addBeneficiary',
{
"beneId": beneId,
"name": "john doe",
"email": "johndoe@cashfree.com",
"phone": "9876543210",
"bankAccount": "00111122233",
"ifsc": "HDFC0000001",
"address1": "ABC Street",
"city": "Bangalore",
"state": "Karnataka",
"pincode": "560001"
},
{
headers: {
'Authorization': 'Bearer {{token}}'
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment