Last active
November 17, 2022 11:23
-
-
Save ikku47/e33793e89bc429cbbb13451350efdaef to your computer and use it in GitHub Desktop.
Adding beneficiary in cashfree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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