PHPackages                             camoo/payment-api - 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. camoo/payment-api

ActiveLibrary[Payment Processing](/categories/payments)

camoo/payment-api
=================

CAMOO Payment API

1.0.3(5mo ago)0351MITPHPPHP &gt;=8.1CI passing

Since Jan 18Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/camoo/payment-api)[ Packagist](https://packagist.org/packages/camoo/payment-api)[ RSS](/packages/camoo-payment-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (6)Used By (1)

Below is an example **README.md** you could include in your project. It provides an **overview**, **installation** instructions, **usage examples**, **endpoint references**, and **credits**. Feel free to customize this to your specific needs (e.g., project naming, author info, licensing).

---

Camoo Payment API – PHP Library
===============================

[](#camoo-payment-api--php-library)

A simple, **PSR-4** compliant PHP library for accessing the Camoo Payment API. This library provides convenient classes for working with **Account** and **Payment** endpoints, while allowing you to inject your own HTTP client if desired.

---

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

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Getting Started](#getting-started)
    - [Configuration &amp; Client](#configuration--client)
    - [Working with Account API](#working-with-account-api)
    - [Working with Payment API](#working-with-payment-api)
- [Models](#models)
- [Error Handling](#error-handling)
- [Development &amp; Contributing](#development--contributing)
- [License](#license)

---

Requirements
------------

[](#requirements)

- **PHP 8.1+**
- Composer (for dependency management)
- [camoo/curl-http-client](https://github.com/camoo/curl-http-client) (already required in `composer.json`)

---

Developer Notes (Self-Implementation)
=====================================

[](#developer-notes-self-implementation)

- OpenAPI Documentation
    - For full endpoint definitions, schemas, and examples, see the Camoo Payment API OpenAPI documentation [Camoo Payment API documentation](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/camoo/payment-api/main/openapi.yaml).
- 📦 Postman Collection
    - Download the ready-to-use Postman collection: [Postman Collection](docs/postman/Camoo-Payment-API.postman_collection.json)

### Payment Notifications (Signed Callbacks)

[](#payment-notifications-signed-callbacks)

Camoo sends payment status notifications via **HTTP GET** requests to the merchant’s `notification_url`.

Each notification is **cryptographically signed** and includes a `sig` query parameter.

#### Signature details

[](#signature-details)

- **Algorithm:** HMAC-SHA256
- **Secret:** API Secret (`X-Api-Secret`)
- **Payload:** Canonical query string built from request parameters
- **Encoding:** RFC3986 (URL-encoded)

**Signature base string format:**

```
payment_id={value}&status={value}&status_time={value}[&trx={value}]

```

> Notes:
>
> - The `sig` parameter is **excluded** from the base string
> - The merchant endpoint **MUST be idempotent**
> - Camoo may retry notifications until **HTTP 200** is returned

Merchants **MUST verify the signature** before trusting or processing the callback.

---

#### Example notification request

[](#example-notification-request)

```
GET /callback?
payment_id=934ca3f6
&status=CONFIRMED
&status_time=2026-01-18T11:42:03+00:00
&trx=my-site-ref
&sig=7f9c8b8d1c0e9c...
```

Installation
------------

[](#installation)

Install the package via [Composer](https://getcomposer.org/):

```
composer require camoo/payment-api
```

If you are installing from a local copy or private repository, ensure your `composer.json` and `repositories` settings are correctly configured, then run `composer install`.

---

Getting Started
---------------

[](#getting-started)

### Configuration &amp; Client

[](#configuration--client)

1. **Instantiate** the main HTTP `Client`, providing your **API key** and **API secret**.
2. **Optionally** set `debug` to `true` if you want to see more verbose debugging info.
3. The **API version** defaults to `v1`.

```
