Flutterwave CI4
View On Github
  • Welcome
  • Getting Started
    • Requirements
    • Installation
  • Usage
    • Collecting Payments
    • Verifications
    • Transactions
    • Webhook
Powered by GitBook
On this page
  • List all transactions
  • Refaund a transaction
  • List all refunds
  • Get transaction fee
  • Flutterwave Fee
  • Merchant Fee
  • Stamp duty Fee
Edit on GitHub
  1. Usage

Transactions

First make sure you place the bellow namespace at the topmost of you codebase to use the classes.

use Seunex17\FlutterwaveCi4\Flutterwave\Transaction;

List all transactions

You can retrieve all transactions carried out on you flutterwave account.

  $transactions = Transaction::list(); // This return an object of array.

Refaund a transaction

Whenever your customer pay you, it is advisable to store the transaction information return by flutterwave. To create a refund we needed the amount paid and transaction id (transaction_id).

  $transactionId = "4717164";
  $amount = 500;

  Transaction::refund($transactionId, $amount);

List all refunds

You can retrieve all refunded transactions carried out on you flutterwave account.

  $refunds = Transaction::refunds(); // This return an object of array.

Get transaction fee

This methods helps you to query the fees expected to be paid for a particular transaction. This methods only returns fees for collections i.e. inflows.

Flutterwave Fee

  $data = [
      'amount' => 500,
      'currency' => 'NGN',
   ];
			
  Transaction::fees($data)->flutterwaveFee();

Merchant Fee

  $data = [
      'amount' => 500,
      'currency' => 'NGN',
   ];
			
  Transaction::fees($data)->stampDutyFee();

Stamp duty Fee

  $data = [
      'amount' => 500,
      'currency' => 'NGN',
   ];
			
  Transaction::fees($data)->stampDutyFee();

PreviousVerificationsNextWebhook

Last updated 9 months ago