PHPackages                             giftbalogun/kudaapitoken - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. giftbalogun/kudaapitoken

ActiveLibrary[API Development](/categories/api)

giftbalogun/kudaapitoken
========================

KudaApiToken is a library to allow communication with Kuda Bank API to setup your own fintech apps

v1.1.5(2mo ago)1402MITPHP

Since Jul 22Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/giftbalogun/KudaOpenApi)[ Packagist](https://packagist.org/packages/giftbalogun/kudaapitoken)[ RSS](/packages/giftbalogun-kudaapitoken/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependenciesVersions (17)Used By (0)

KudaOpenApi Integration in Laravel
==================================

[](#kudaopenapi-integration-in-laravel)

 [![Github top language](https://camo.githubusercontent.com/f5900ba03f249b043f1c4497cb6a7aea9a7cc9c78f4d1b5cb787b36b8590b251/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f6769667462616c6f67756e2f6b756461417069546f6b656e3f636f6c6f723d353642454238)](https://camo.githubusercontent.com/f5900ba03f249b043f1c4497cb6a7aea9a7cc9c78f4d1b5cb787b36b8590b251/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f6769667462616c6f67756e2f6b756461417069546f6b656e3f636f6c6f723d353642454238) [![Star](https://camo.githubusercontent.com/58dc68c70ea64d50a54139f5cc492e307371f1547f95cfd586a78e0082ffd786/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6769667462616c6f67756e2f6b756461417069546f6b656e3f636f6c6f723d353642454238)](https://camo.githubusercontent.com/58dc68c70ea64d50a54139f5cc492e307371f1547f95cfd586a78e0082ffd786/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6769667462616c6f67756e2f6b756461417069546f6b656e3f636f6c6f723d353642454238) [![GitHub issues](https://camo.githubusercontent.com/0edd4102dfc8328fbea6501d18cf62c0b981ea043bfaa95e987970bee753a874/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6769667462616c6f67756e2f6b756461417069546f6b656e3f636f6c6f723d353642454238)](https://camo.githubusercontent.com/0edd4102dfc8328fbea6501d18cf62c0b981ea043bfaa95e987970bee753a874/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6769667462616c6f67756e2f6b756461417069546f6b656e3f636f6c6f723d353642454238) [![License](https://camo.githubusercontent.com/fd20964391cf2b00045ab75a1f63b4b72d23315298bfd278c1e5c83d16ee5428/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6769667462616c6f67756e2f6b756461417069546f6b656e3f7374796c653d706c617374696326636f6c6f723d353642454238)](https://camo.githubusercontent.com/fd20964391cf2b00045ab75a1f63b4b72d23315298bfd278c1e5c83d16ee5428/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6769667462616c6f67756e2f6b756461417069546f6b656e3f7374796c653d706c617374696326636f6c6f723d353642454238)

####  Laravel integration with KudaOpenApi for seemless Banking via Kuda Bank Open Api

[](#laravel-integration-with-kudaopenapi-for-seemless-banking-via-kuda-bank-open-api)

---

Table of Contents
-----------------

[](#table-of-contents)

1. [Getting Started](#dart-getting-started)
2. [Installation](#dart-installation)
3. [Usage](#sparkles-usage)
4. [Documentation](#star-documentation)
5. [Testing and Debugging](#wrench-testing-and-debugging)
6. [License](#memo-license)
7. [Social Presence](#mega-social-presence)

🎯 Getting Started
-----------------

[](#dart-getting-started)

Enable your product for local transactions with the KUDA Open API platform! With the KUDA Open APIs, you can embed services on your platform and connect your customers to a wide range of banking services.

> **Note:** Ensure you have a [KUDA Business account](https://business.kuda.com/) linked to your profile for live access.

### Steps:

[](#steps)

1. Sign up for a KUDA Business account.
2. Generate an API token from your developer dashboard.
3. Proceed with the installation and configuration below.

🎯 Installation
--------------

[](#dart-installation)

[PHP](https://php.net) 7.2+ and [Composer](https://getcomposer.org) are required.

To get the latest version of KudaApiToken, simply require it

```
composer require giftbalogun/kudapaitoken
```

Or add the following line to the require block of your `composer.json` file.

```
"giftbalogun/kudapaitoken": "1.0.*"

```

and add This

```
"repositories": [
    {
        "type": "git",
        "url": "https://github.com/giftbalogun/kudaApiToken"
    }
],

```

You'll then need to run `composer install` or `composer update --prefer-dist` to download it and have the autoloader updated.

⚙️ Configuration
----------------

[](#️-configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="Giftbalogun\Kudaapitoken\KudaApiTokenServiceProvider"
```

Open your .env file and add your public key, secret key, merchant email and payment url like so:

```
KUDA_API_TOKEN=XXXXXXXXXXXXXXXXXXXX
KUDA_API_URL=XXXXXXXXXXXXXXXXXXXXXX
KUDA_USER_EMAIL=YOUR_EMAIL
ENVIRONMENT_ENV=LIVE_OR_TEST
```

⭐ Documentation
---------------

[](#star-documentation)

Documentation  (COMING SOON)

Article Medium to Read

✨ Usage
-------

[](#sparkles-usage)

Availbale coomand to be use are in [COMMAND](COMMAND.md) file with easy to understand related to ServiceTypes.

Send request with this command.

```
//simple
$data = [
    'email' => $request->email,
    'phoneNumber' => $request->phone,
    'lastName' => $request->l_name,
    'firstName' => $request->f_name,
    'businessName' => $request->business_name,
    'trackingReference' => $customer_code,
]; # $data is the format for making request to the api

$ref = rand(); #used to generate randon unique number for the request

//For Pay with Transfer
$data = [
    "Amount"=>5000000,
    "IsFlexiblePayment"=>true, //true or false
    "RemittingAccounts"=>[
    {
        "SplitPercentage"=>50,
        "AccountName"=>"foods",
        "AccountNumber"=>"3020806687"
    },
    {
        "SplitPercentage"=>50,
        "AccountName"=>"foods",
        "AccountNumber"=>"3020808612"
    }
    ]
];
```

Styles of Calling the Controller

```
use Giftbalogun\Kudaapitoken\Controllers\KudaBankController;

$this->kudabankservice->create_virtual_account($data, $ref);
```

OR

```
use Giftbalogun\Kudaapitoken\Kuda;

$this->kuda->initController('default')->create_virtual_account($data, $ref);
## Controllers include 'Bill', 'Card', 'GiftCard', 'KudaBank' | Default is same as KudaBank
```

⚡️ Available Controllers
------------------------

[](#️-available-controllers)

```
$kuda->initController('Bill');
$kuda->initController('Card');
$kuda->initController('Saving');
$kuda->initController('PayWith');
$kuda->initController('KudaBank'); // default
$kuda->initController('GiftCard');
```

⚡️ Example: Creating a Customer Account
=======================================

[](#️-example-creating-a-customer-account)

```
