Unable To Create New Virtual Card Using PHP

I am trying to create a visual Card but here’s the error I’m getting:
Cannot POST /v3/virtual-cards/trnsfers/166948/retries

Here’s my Sample code:

`<?php

$curl = curl_init();
$userdata = array(
    "currency" => "USD",
    "amount" => "200",
    "debit_currency" => "USD",
    "billing_name" => "John Doe",
    "billing_address" => " Enugu, Nigeria",

    "billing_city" => "Enugu",
    "billing_state" => "Enugu",
    "billing_country" => "Nigeria",

    "billing_postal_code" => "400106",
    "callback_url" => "localhost",

);
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api.flutterwave.com/v3/virtual-cards/trnsfers/166948/retries",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode($userdata),
  CURLOPT_HTTPHEADER => array(
  "Authorization: Bearer FLWSECK_TEST-SANDBOXDEMOKEY-X",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;`

Hi @obi_ekene your request is invalid. please kindly go through the docs and ensure you have all the required parameters added to the request.

Best Regards

the creation of virtual cards still work?

Hi @maestrojims

Virtual card creation is currently operational. please share any issues you may have.

Thanks

1 Like