Create a virtual card
The create card endpoint allows you to generate a virtual card for your customer with ease by passing in the customers email , NIN, BVNwith phone_no and the following amount, currency, image in the request body.
Example
var axios = require('axios');
var data = '{\n "bvn":"12345678932",\n "nin":"987654321",\n "phone":"09039000000",\n "email": "[email protected]",\n "currency": "ngn",\n "amount":"500",\n "image": "null"\n}';
var config = {
method: 'post',
url: 'https://integrations.getravenbank.com/v1/v1/cards/create',
headers: { },
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
//response
{
"status": "success",
"message": "card created successfully",
"data": {
"card_id": "62f22f80fc9b4e40441831e9"
}
}{
"status": "success",
"message": "card created successfully",
"data": {
"card_id": "62f22f80fc9b4e40441831e9"
}
}Making a successful call to this endpoint returns a response with the new card_id if you encounter any error while calling this endpoint, the response will declaratively tell you what went wrong, in some cases where a merchant doesn't have permission to create virtual cards, you are required to reach out to the Raven Atlas Support Team, with the error description.
Try it in the console
Updated 11 months ago