1. Go to this page and download the library: Download kayode-suc/flutterwave library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kayode-suc / flutterwave example snippets
// This file is generated by Composer
e a new Client instance
$client = new Client('Your Api Key');
// $client->transaction->all();
$transactions = $client->transaction->all();
print_r($transactions);
// This file is generated by Composer
e a new Client instance
$client = new Client('Your Api Key');
/**
* Get transaction fee
*
* @since 1.0
*
* @param Int $amount
* @param string $currency
* @param string $payment_type
* @return array
*
* $client->transaction->fee(int $amount, string $currency = 'NGN', string $payment_type = 'card')
*/
$fee = $client->transaction->fee(10000);
print_r($fee);
// This file is generated by Composer
e a new Client instance
$client = new Client('Your Api Key');
/**
* Resend transaction webhook
*
* @since 1.0
*
* @param Int $id
* @return array
*
* $id - This is the transaction unique identifier.
*
* $client->transaction->resend_webhook(int $id)
*
*/
$transaction = $client->transaction->resend_webhook(1000);
print_r($transaction);
// This file is generated by Composer
e a new Client instance
$client = new Client('Your Api Key');
/**
* initiate a transaction refund
*
* @since 1.0
*
* @param Int $id
* @param Int $amount
* @return array
*
* $client->transaction->refund(int $id, int $amount)
*
* $id - This is the transaction unique identifier.
* $amount - amount.
*
*/
$transaction = $client->transaction->refund(2069367, 50);
print_r($transaction);
// This file is generated by Composer
e a new Client instance
$client = new Client('Your Api Key');
/**
* Verify transactions using the transaction ID
*
* @since 1.0
*
* @param Int $id
*
* @return array
*
* $client->transaction->verify(int $id)
*
* $id - This is the transaction unique identifier.
* $amount - amount.
*
*/
$transaction = $client->transaction->verify(2069367));
print_r($transaction);
// This file is generated by Composer
e a new Client instance
$client = new Client('Your Api Key');
/**
* View Transaction Timeline
*
* @since 1.0
*
* @param Int $id
*
* @return array
*
* $client->transaction->timeline(int $id)
*
* $id - This is the transaction unique identifier.
*
*/
$transaction = $client->transaction->timeline(2069367));
print_r($transaction);
/**
* Get all transfers
*
* @since 1.0
*
* @return array
*/
$transfers = $client->transfer->all();
print_r($transfers);
/**
* Get a transfer
*
* @since 1.0
*
* @param int $id
*
* @return array
*/
$transfer = $client->transfer->single(191112);
print_r($transfer);
/**
* Fetch transfer retry attempts for a single transfer on your account
*
* @since 1.0
*
* @param int $id
*
* @return array
*/
$retry = $client->transfer->retry_attempt(191112);
print_r($retry);
/**
* Get the status of a bulk transfer on your account
*
* @since 1.0
*
* @param int $id
*
* @return array
*/
$bulk = $client->transfer->get_bulk(191112);
print_r($bulk);
/**
* Transfer rates when making international transfers
*
* @since 1.0
*
* @param int $amount
* @param string $destination_currency
* @param string $source_currency
*
* @return array
*/
$rate = $client->transfer->rate(1000, 'USD', 'NGN');
print_r($rate);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.