Request Parameter

Name Required (*) Description
api_key Yes Your genereted and valid API key
first_name Yes First Name of card holder
last_name Yes Last Name of card holder
address Yes Address of card holder
country Yes 2 Digit Country code
Ex. US, GB, IN
state Yes Please enter 2 letter state code for US,
and any string for other countries
city Yes Valid City
zip Yes Valid Zip Code
email Yes Valid Email. Ex - test@gmail.com
phone_no Yes Valid Phone. Ex - +91999999999
card_type Yes Valid Following Card Type.
1 - For Amex
2 - For Visa
3 - For Mastercard
4 - For Discover
amount Yes Amount. Ex - 99.99, 10, 10.5
currency Yes Only 3 digit currency formate valid.
card_no Yes Valid Card No. Ex - 4242424242424242
ccExpiryMonth Yes Valid Exp. Month Ex - 02
ccExpiryYear Yes Valid Exp. Year Ex - 2020
cvvNumber Yes Valid CVV No. Ex - 123

API Call Example

// You can call our API following curl post example
$url = "https://tovo.io/api/transaction";
$key = "Your API Key";
// Fill with real customer info
$data = [
    'api_key' => $key,
    'first_name' => 'First Name',
    'last_name' => 'Last Name',
    'address' => 'Address',
    'country' => 'US',
    'state' => 'NY', // if your country US then use only 2 letter state code.
    'city' => 'New York',
    'zip' => '38564',
    'email' => 'test@gmail.com',
    'phone_no' => '+91999999999',
    'card_type' => '2', // See your card type in list
    'amount' => '10.00',
    'currency' => 'USD',
    'card_no' => '4242424242424242',
    'ccExpiryMonth' => '02',
    'ccExpiryYear' => '2020',
    'cvvNumber' => '123',
];

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER,[
    'Content-Type: application/json'
]);
$response = curl_exec($curl);
curl_close($curl);

$responseData = json_decode($response);

echo "<pre>";
print_r($responseData);
                            

API Error Validation Response

{
    "status": "fail",
    "errors": {
        "first_name": [
            "The first name field is required."
        ]
    }
}
                            

API Fail/Error Response

{
    "status": "fail",
    "message": "None issuing bank"
}
            				

API Success Response

{
    "status": "success",
    "message": "Your Transaction was processed successfully!!"
}