PHPackages                             chapa/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. [API Development](/categories/api)
4. /
5. chapa/chapa-laravel

ActiveLibrary[API Development](/categories/api)

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

A Laravel Package to Accept Payment through Chapa

1.0.2(1y ago)1410.7k↓25.9%17[2 PRs](https://github.com/Chapa-Et/chapa-laravel/pulls)MITPHPPHP ^7.2|^8.0|^8.1CI failing

Since May 22Pushed 6mo agoCompare

[ Source](https://github.com/Chapa-Et/chapa-laravel)[ Packagist](https://packagist.org/packages/chapa/chapa-laravel)[ Docs](https://github.com/chapa-et/chapa-laravel)[ RSS](/packages/chapa-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,12)

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

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

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)

Open your .env file and add your public key, secret keys, and other environment variables like this:

```
CHAPA_SECRET_KEY=CHAPA-SECK-xxxxxxxxxxxxxxxxxxxxx-X

```

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

43

—

FairBetter than 91% of packages

Maintenance53

Moderate activity, may be stable

Popularity36

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.9% 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 ~429 days

Total

2

Last Release

663d ago

PHP version history (2 changes)1.0.1PHP ^7.4|^8.0|^8.1

1.0.2PHP ^7.2|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/e0fe8ff05d50fe56cec533d73152af3c3ca40e1d39cf3aa24affd32e2fe0c207?d=identicon)[isrugeek](/maintainers/isrugeek)

---

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 (5 commits)")[![hi-mulugeta](https://avatars.githubusercontent.com/u/134504620?v=4)](https://github.com/hi-mulugeta "hi-mulugeta (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![fikremariamF](https://avatars.githubusercontent.com/u/91600690?v=4)](https://github.com/fikremariamF "fikremariamF (2 commits)")[![abelwendmu](https://avatars.githubusercontent.com/u/93484932?v=4)](https://github.com/abelwendmu "abelwendmu (1 commits)")[![fikremariam-chapa](https://avatars.githubusercontent.com/u/221964208?v=4)](https://github.com/fikremariam-chapa "fikremariam-chapa (1 commits)")[![matakltm-code](https://avatars.githubusercontent.com/u/65981238?v=4)](https://github.com/matakltm-code "matakltm-code (1 commits)")[![Dagimassefa](https://avatars.githubusercontent.com/u/94830418?v=4)](https://github.com/Dagimassefa "Dagimassefa (1 commits)")

---

Tags

apichapalaravelpaymentpayment-gatewayphp-librarychapachapa-laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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