Download the PHP package bekambeyene/telebirr without Composer

On this page you can find all versions of the php package bekambeyene/telebirr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package telebirr

Telebirr PHP SDK # Telebirr PHP & Laravel SDK *A Laravel and PHP SDK for Telebirr H5/SuperApp integration with webhook verification, RSA signing, and production-ready interoperability support.* [![Latest Stable Version](https://img.shields.io/packagist/v/bekambeyene/telebirr?style=for-the-badge&color=blue)](https://packagist.org/packages/bekambeyene/telebirr) [![Total Downloads](https://img.shields.io/packagist/dt/bekambeyene/telebirr?style=for-the-badge&color=success)](https://packagist.org/packages/bekambeyene/telebirr) [![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](https://packagist.org/packages/bekambeyene/telebirr) [![PHP Version Compatibility](https://img.shields.io/packagist/php-v/bekambeyene/telebirr?style=for-the-badge)](https://packagist.org/packages/bekambeyene/telebirr)


This package solves the complex implementation details of Ethiopia's payment gateway. It prioritizes exact interoperability, determinism, and maintainability to guarantee seamless operation in both Telebirr sandbox and production environments. It supports Laravel 12 and 13, alongside Vanilla PHP environments.


๐ŸŽจ Features

โœจ Production-Grade Webhook Handling

๐Ÿš€ Configurable Cryptography & Padding

๐Ÿ›  Robust Canonicalization & Smart Keys


๐Ÿ“ฆ Installation

Install the package into your project using Composer:

Publish the configuration file (Laravel):


โšก Quick Start

Add your credentials to your .env file:

[!TIP] ๐Ÿ’ก Smart Key Storage Flexibility To avoid multiline .env string issues, the SDK supports three ways to load keys:

  • Raw Base64: Paste just the raw string! The SDK automatically calculates chunking and injects -----BEGIN PRIVATE KEY----- boundaries for you.
  • File Path: TELEBIRR_PRIVATE_KEY="file:///var/www/keys/private_key.pem"
  • Base64 Strict: TELEBIRR_PRIVATE_KEY="base64:LS0tLS1CRUdJ..."

[!TIP] ๐Ÿ’ก Sandbox SSL Issue Adding TELEBIRR_SSL_VERIFY=false to your .env file resolves the "unable to get local issuer certificate" error when connecting to the Telebirr sandbox API.


๐Ÿ“ฑ H5 Payment Controller Example

Below is the recommended controller code you should use when integrating our package.


๐Ÿ›ก๏ธ Webhook Verification

[!CAUTION] ๐Ÿšจ CSRF Middleware Exception Required! Telebirr sends webhooks directly from its servers via a POST request. It does not carry a Laravel CSRF token. If you place your webhook route in routes/web.php without an exception, Laravel will instantly block it with a 419 Page Expired error.

For Laravel 12+: In bootstrap/app.php: $middleware->validateCsrfTokens(except: ['payment/notification']);

For older projects (Laravel 11 and lower): In app/Http/Middleware/VerifyCsrfToken.php: protected $except = ['payment/notification'];


๐Ÿ” Signature Troubleshooting

Different Telebirr endpoints use different signature generation rules:

1. Preorder Request Signing

Preorder requests (payment.preorder) compile top-level properties and recursively sort all parameters. Signatures use the configured padding (pss by default).

2. H5 Web Checkout Checkout URL Signing

When launching H5 web checkout redirects, Telebirr expects the URL signature to be calculated on EXACTLY 5 fields:

[!WARNING] โš ๏ธ Do NOT sign version, trade_type, sign_type, or redirect_url. These optional query parameters must be appended to the redirect URL after generating the signature. Adding them to the signed payload will cause intermittent signature failures (error 60200099).


โŒ Common Errors

60200099 Verify the sign field failed

This error means the public key on Telebirr's server cannot verify the signature generated by your private key.

60200087 Organization does not exist

This status indicates the Telebirr gateway/merchant sync services are busy, down, or undergoing synchronization. Always catch TelebirrServerException and prompt users to retry.


โœ… Production Best Practices


๐Ÿงช Testing

Run the tests with:


โ“ FAQ

Does Telebirr use RSA-PSS or PKCS1?

By default, recent Telebirr implementations use RSA-PSS. You can switch to PKCS1 by setting TELEBIRR_SIGNATURE_PADDING=pkcs1.

Why am I getting 60200099?

This signature verification failure is commonly caused by including wrong fields in the signed payload, padding mode mismatch, or wrong keys. See # Common Errors.

How do I verify webhooks?

Use the Telebirr::handleWebhook($request) method. It automatically performs deterministic canonicalization, RSA signature verification, nonce replay checking, and timestamp validation.

How do I use Telebirr H5 in Laravel?

Generate the checkout URL using Telebirr::createOrder('Title', $amount) and simply redirect the user using return redirect()->away($url).

Can I use this package without Laravel?

Yes, the core SDK services (SignatureService, TelebirrHttpClient) are framework-agnostic and can be instantiated directly.


๐Ÿ“„ License

This SDK is open-sourced software licensed under the MIT License.


All versions of telebirr with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.8
phpseclib/phpseclib Version ^3.0
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^10.0 || ^11.0 || ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bekambeyene/telebirr contains the following files

Loading the files please wait ...