PHPackages                             webirr/webirr - 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. webirr/webirr

ActiveLibrary[Payment Processing](/categories/payments)

webirr/webirr
=============

Official PHP Client Library for WeBirr Payment Gateway APIs

3.2.0(yesterday)4147↓75%2MITPHPPHP &gt;=7.2.5

Since Aug 12Pushed yesterday1 watchersCompare

[ Source](https://github.com/webirr/webirr-api-php-client)[ Packagist](https://packagist.org/packages/webirr/webirr)[ Docs](https://github.com/webirr/webirr-api-php-client)[ RSS](/packages/webirr-webirr/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (9)Versions (18)Used By (0)

Official PHP Client Library for WeBirr Payment Gateway APIs

This Client Library provides convenient access to WeBirr Payment Gateway APIs from PHP Applications.

Install
-------

[](#install)

```
$ composer require webirr/webirr
```

Use the latest released PHP package unless your application needs to pin a specific version. WeBirr SDKs version independently by language, so the PHP package version may differ from Go, JavaScript, .NET, Python, Dart, Kotlin, Swift, or Ruby.

Usage
-----

[](#usage)

The library needs to be configured with a *merchant Id* &amp; *API key*. You can get it by contacting [webirr.com](https://webirr.net)

> You can use this library for production or test environments. you will need to set isTestEnv=true for test, and false for production apps when creating objects of class WeBirrClient

Examples assume the WeBirr TestEnv and read credentials from environment variables:

```
export WEBIRR_TEST_ENV_MERCHANT_ID="YOUR_TEST_MERCHANT_ID"
export WEBIRR_TEST_ENV_API_KEY="YOUR_TEST_API_KEY"
```

Create the client with merchant ID, API key, and environment once. The client automatically sets `Bill::$merchantID` before sending bill create/update requests, so application code and examples should not set `merchantID` on the bill object.

Example
-------

[](#example)

### Creating a new Bill / Updating an existing Bill on WeBirr Servers

[](#creating-a-new-bill--updating-an-existing-bill-on-webirr-servers)

```
