PHPackages                             abduselam/chapa-laravel - 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. [Payment Processing](/categories/payments)
4. /
5. abduselam/chapa-laravel

ActiveLibrary[Payment Processing](/categories/payments)

abduselam/chapa-laravel
=======================

A Laravel Package to Accept Payment through Chapa

v0.2(8mo ago)062MITPHPPHP ^8.3

Since Aug 15Pushed 8mo agoCompare

[ Source](https://github.com/abduselam1/chapa-laravel)[ Packagist](https://packagist.org/packages/abduselam/chapa-laravel)[ Docs](https://github.com/abduselam1/chapa-laravel)[ RSS](/packages/abduselam-chapa-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

 [ ![Chapa Logo](https://camo.githubusercontent.com/24a440af5b6b85bbeff296347d7cc08ace5b0caade3c41aa323f68f67e739432/68747470733a2f2f6173736574732e63686170612e636f2f6173736574732f696d616765732f63686170612d6c6f676f2e737667) ](http://chapa.co/)Official Laravel package for Chapa's API (Laravel 5,6,7,9,10,11)

======================================================================================================================================================================================================================================================================================================================

[](#----------official-laravel-package-for-chapas-api-laravel-56791011)

This Repo forked from [Chapa official Laravel package](https://github.com/Chapa-Et/chapa-laravel) and modified to support multiple chapa account. You can use this package to integrate Chapa's payment gateway in your SaaS project.

If your are doing a Laravel project and want to integrate Chapa's payment solution, this package would help big time.

Go to [Chapa](https://dashboard.chapa.co/) to signup and get your secret key

Documentation
-------------

[](#documentation)

Please visit [Chapa](https://developer.chapa.co/docs/accept-payments/) for full documentation.

Guide
-----

[](#guide)

Please visit [Developers Guide](https://developer.chapa.co/laravel-sdk/) for full guide and examples.

### Usage

[](#usage)

You can check [this](https://github.com/Chapa-Et/sdk-examples/tree/master/chapa-laravel-example) sample Laravel code as a reference.

### Configuration

[](#configuration)

Since we are using multiple chapa account there is no need to configure anything in .env file. But whenever you want to use a chapa account you need to set the api key using `setKey()` method.

```
use Chapa\Chapa\Facades\Chapa::setKey('CHAPA-SECK-xxxxxxxxxxxxxxxxxxxxx-X')->initializePayment($data);
```

> Storing the api key secure is your responsibility

Features
--------

[](#features)

The current features have been implemented

- Initiate Payment
- Payment verification
- Create a Transfer
- Verify a Transfer
- Validate a Webhook Request
- Bulk Transfer
- Create Subaccount

API Reference
-------------

[](#api-reference)

### Create Subaccount

[](#create-subaccount)

```
  GET https://api.chapa.dev/v1/transaction/sub-accounts

```

ParameterTypeRequiredDescription`business_name``string`**Yes**.The name of the business or vendor.`account_name``string`**Yes**.The name of the account holder, which must match the bank account details.`bank_code``integer`**Yes**.The ID of the bank where the subaccount is held. You can retrieve this from the "Get Banks" endpoint.`account_number``string`**Yes**.The bank account number for the subaccount`split_type``string`**Yes**.Defines how the payment will be split. Can be "percentage" or "flat".`split_value``float`**Yes**.The value of the split. If split\_type is percentage, this represents a percentage (e.g., 0.03 for 3%).If split\_type is flat, this represents a fixed amount in ETB (e.g., 25 for 25 Birr).### Collecting Customer Information

[](#collecting-customer-information)

```
  POST https://api.chapa.co/v1/transaction/initialize

```

ParameterTypeRequiredDescription`key``string`**Yes**.This will be your public key from Chapa. When on test mode use the test key, and when on live mode use the live key.`email``string`**No**.A customer’s email. address.`phone_number``numeric`**No**.A customer’s phone number. address.`amount``string`**Yes**.The amount you will be charging your customer.`first_name``string`**No**.A customer’s first name.`last_name``string`**No**.A customer’s last name.`tx_ref``string`**Yes**.A unique reference given to each transaction.`callback_url``string`**No**.Function that runs when payment is successful. This should ideally be a script that uses the verify endpoint on the Chapa API to check the status of the transaction.`return_url``string`**No**.A web address provided by the merchant to a payment gateway during payment integration. It serves as the destination where the payment gateway sends the customer after completing a payment transaction.`currency``string`**Yes**.The currency in which all the charges are made. Currency allowed is ETB.`customization[tiitle] ``string`**No**.The customizations field (optional) allows you to customize the look and feel of the payment modal. You can set a logo, the store name to be displayed (title), and a description for the payment.`customization[description]``string`**No**.The customizations field (optional) allows you to customize the look and feel of the payment modal.`customization[subaccounts][id] ``string`**Yes**.The customization field is optional. The subaccounts field within customization is also optional, but if provided, each subaccount must include an id (required). The payment will be split among the subaccounts based on the specified split\_type and split\_value.### Verify Payments

[](#verify-payments)

```
  GET https://api.chapa.dev/v1/transaction/verify/{tx-ref}

```

ParameterTypeRequiredDescription`key``string`**Yes**.This will be your public key from Chapa. When on test mode use the test key, and when on live mode use the live key.### Verify Transfers

[](#verify-transfers)

```
  GET https://api.chapa.dev/v1/transfers/verify/{tx-ref}

```

ParameterTypeRequiredDescription`key``string`**Yes**.This will be your public key from Chapa. When on test mode use the test key, and when on live mode use the live key.### Bulk Transfers

[](#bulk-transfers)

```
  GET https://api.chapa.dev/v1/bulk-transfers

```

ParameterTypeRequiredDescription`title``string`**Yes**.This will be your title or desciption for bulk transfer.`currency``string`**Yes**.The currency for the transfers (e.g., ETB for Ethiopian Birr).`bulk_data``array`**Yes**.An array of individual transfers containing the following fields:`bulk_data[].account_name``string`**Yes**.The name of the account holder for the transfer.`bulk_data[].account_number``string`**Yes**.The account number to which the transfer will be made.`bulk_data[].amount``integer`**Yes**.The amount to be transferred.`bulk_data[].reference``string`**Yes**.A unique reference for the individual transfer (used for tracking purposes).`bulk_data[].bank_code``integer`**Yes**.The bank code of the recipient's bank (get the code via Chapa’s banks API).### Get Banks

[](#get-banks)

The Get Banks API retrieves a list of banks available for transfers via the Chapa API. This is useful when you need to display a list of banks for users to select from or when you need bank codes for initiating transactions.

### Verify Webhooks

[](#verify-webhooks)

This function validates incoming webhook events from Chapa to ensure their authenticity. It checks the signature of the webhook against an expected signature, generated using the webhook payload and a secret key. If the signatures match, the webhook is considered valid.

#### Parameters:

[](#parameters)

- **`$request`** *(Illuminate\\Http\\Request)*: The incoming HTTP request containing the webhook payload and headers. The key header used for validation is:
    - **`x-chapa-signature`**: A header sent by Chapa containing the HMAC-SHA256 signature of the webhook payload. This signature is used to verify the authenticity of the webhook.

#### Returns:

[](#returns)

- **`boolean`**:
    - `true`: If the webhook is valid (i.e., the signature matches).
    - `false`: If the webhook is invalid (i.e., the signature does not match).

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance60

Regular maintenance activity

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

2

Last Release

256d ago

PHP version history (2 changes)v0.1PHP 7.2 - 8.3 || ^8.3

v0.2PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/966415dad8e8bfdd66ce330010a314fab0e00830b612bd85c1043595957bdc0e?d=identicon)[abduselam1](/maintainers/abduselam1)

---

Top Contributors

[![isrugeek](https://avatars.githubusercontent.com/u/25211725?v=4)](https://github.com/isrugeek "isrugeek (28 commits)")[![Kidus363](https://avatars.githubusercontent.com/u/59210866?v=4)](https://github.com/Kidus363 "Kidus363 (8 commits)")[![semernur](https://avatars.githubusercontent.com/u/85545098?v=4)](https://github.com/semernur "semernur (4 commits)")[![fikremariamF](https://avatars.githubusercontent.com/u/91600690?v=4)](https://github.com/fikremariamF "fikremariamF (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![abduselam1](https://avatars.githubusercontent.com/u/57281126?v=4)](https://github.com/abduselam1 "abduselam1 (2 commits)")[![Dagimassefa](https://avatars.githubusercontent.com/u/94830418?v=4)](https://github.com/Dagimassefa "Dagimassefa (1 commits)")[![abelwendmu](https://avatars.githubusercontent.com/u/93484932?v=4)](https://github.com/abelwendmu "abelwendmu (1 commits)")

---

Tags

chapachapa-laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abduselam-chapa-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/abduselam-chapa-laravel/health.svg)](https://phpackages.com/packages/abduselam-chapa-laravel)
```

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)[chapa/chapa-laravel

A Laravel Package to Accept Payment through Chapa

1410.7k](/packages/chapa-chapa-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
