Create a virtual card - Flutterwave API
const Flutterwave = require('flutterwave-node-v3');
const flw = new Flutterwave(PUBLIC_KEY, SECRET_KEY );
const createVcard = async () => {
try {
const payload = {
"currency": "NGN",
"amount": 200,
"billing_name": "Jermaine Graham",
"billing_address": "2014 Forest Hills Drive",
"billing_city": "Node",
"billing_state": "Javascript",
"billing_postal_code": "000009",
"billing_country": "NG",
"callback_url": "https://your-callback-url.com/"
}
const response = await flw.
VirtualCard.create(payload)
console.log(response);
} catch (error) {
console.log(error)
}
}
createVcard();