Let's create a collection account
This is where the magic begins, to generate a merchant's collection account, the first_name, last_name, phone, amount, and email
is parsed in the request body as seen in the example below.
Example
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'first_name': 'Thomas',
'last_name': 'Abati',
'phone': '07039762251',
'amount': '1000',
'email': 'chivic16@yahoo.com'
});
var config = {
method: 'post',
url: 'https://integrations.getravenbank.com/v1/pwbt/generate_account',
headers: { },
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
{
"status": "success",
"message": "account generated successfully",
"data": {
"account_number": "7790193704",
"account_name": "Raven/ChivicBusiness - Thomas Abati",
"bank": "Wema Bank",
"customer": {
"email": "merchant@gmail.com",
"first_name": "Thomas",
"last_name": "Abati",
"phone": "07039762251"
},
"isPermanent": false,
"amount": "1000"
}
}
This response returned contains the bank, account number, and account name of the new customer, I know you would have guessed right, the account number is the unique identifier of the customer, and the customer can top up his/her new wallet with the account number via any bank, we will inform you anytime your customer get a new credit transaction via webhook
Try it in the console
Updated 15 days ago