PHPackages                             kaiorocha/cambioreal - 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. kaiorocha/cambioreal

ActiveLibrary[API Development](/categories/api)

kaiorocha/cambioreal
====================

CambioReal PHP library

v2025.05.30.192653(1y ago)093MITPHPPHP &gt;=7.3

Since May 20Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (6)Used By (0)

CambioReal PHP Library
======================

[](#cambioreal-php-library)

This library enables you to integrate CambioReal with any PHP application.

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

[](#requirements)

- PHP &gt;= 5.3
- cURL

Usage
-----

[](#usage)

### Setup

[](#setup)

To use the CambioReal PHP library you need to setup your app id and app secret.

```
\CambioReal\Config::setAppId('your-app-id');
\CambioReal\Config::setAppSecret('your-app-secret');
```

If you need to change other settings, you can use the following function call:

```
\CambioReal\Config::set([
    'appId'      => 'your-app-id',
    'appSecret'  => 'your-app-secret',
    'testMode' => true,
]);
```

You can change the following settings:

- appId: your app id. It will be different in test and production modes.
- appSecret: your app secret. It will be different in test and production modes.
- testMode: enable or disable the test mode. The default value is *false*.

To create a new API request, just call one of the following methods on the \\CambioReal\\CambioReal class and supply it with the request parameters:

- \\CambioReal\\CambioReal::cancel
- \\CambioReal\\CambioReal::get
- \\CambioReal\\CambioReal::request

request command example:

```
require_once __DIR__ . 'vendor/autoload.php';

\CambioReal\Config::setAppId('11250214');
\CambioReal\Config::setAppSecret('6e556ff76e55...56ff7');

$request = \CambioReal\CambioReal::request([
    'client' => [
        'name'  => 'John Test',
        'email' => 'john@test.com',
    ],
    'currency'  => 'USD',
    'amount'    => 130.00,
    'order_id'  => '10000052',
    'duplicate' => false,
    'due_date'  => null,
    'products'  => [
        [
            'descricao'  => 'Laptop i7',
            'base_value' => 800.00,
            'valor'      => 1600.00,
            'qty'        => 2,
            'ref'        => 1,
        ],
        [
            'descricao'  => 'Frete',
            'base_value' => 5.00,
            'valor'      => 5.00,
            'ref'        => 'São Paulo - SP',
        ],
    ],
]);
```

Changelog
---------

[](#changelog)

- **1.0.0**: first release.
- **1.1.0**: get and print boleto.
- **1.2.0**: boleto returned in pdf.
- **1.2.1**: Added the amount simulator.
- **1.3.0**: removed the generation of boletos and the boleto endpoint.
- **1.4.0**: Added support for request V2 used in pix transparent payments.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance46

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~3 days

Total

4

Last Release

400d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2734872?v=4)[Kaio Rocha](/maintainers/kaiorocha)[@kaiorocha](https://github.com/kaiorocha)

---

Top Contributors

[![kaiorocha](https://avatars.githubusercontent.com/u/2734872?v=4)](https://github.com/kaiorocha "kaiorocha (12 commits)")

---

Tags

apipayment processingcambioreal

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kaiorocha-cambioreal/health.svg)

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

###  Alternatives

[ebanx/ebanx

EBANX PHP library

24669.0k](/packages/ebanx-ebanx)[pay-now/paynow-php-sdk

PHP client library for accessing Paynow API

19214.3k3](/packages/pay-now-paynow-php-sdk)[everypay/everypay-php

1743.5k](/packages/everypay-everypay-php)

PHPackages © 2026

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