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

ActiveLibrary[API Development](/categories/api)

matfatjoe/sicredi-api
=====================

A PHP SDK for the Sicredi API

1.0.2(8mo ago)031MITPHP

Since Aug 13Pushed 8mo agoCompare

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

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

Sicredi API
===========

[](#sicredi-api)

[![Tests, PHP, PHP CS Fixer](https://github.com/BrunoPansani/sicredi-api/actions/workflows/ci.yml/badge.svg)](https://github.com/BrunoPansani/sicredi-api/actions/workflows/ci.yml/badge.svg)

This package provides a PHP client for interacting with the Sicredi API. It allows developers to easily integrate Sicredi into their PHP applications. The client supports a wide range of features inside the Charges API, including creating and querying boletos, generating boletos slips, and retrieving payment reports.

The package is built on top of the Guzzle HTTP client and provides a simple, object-oriented API for interacting with the Sicredi API. It also includes comprehensive documentation and examples to help developers get started quickly.

While the package currently only supports the API for Boletos, it is designed with extensibility in mind, and can easily be extended to support additional functionality as needed.

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

[](#installation)

First, you will need to install [Composer](http://getcomposer.org/) following the instructions on their site.

Then, simply run the following command:

```
composer require BrunoPansani/sicredi-api
```

Usage
-----

[](#usage)

Once you have installed it, you can use the following steps to create a new Boleto:

1. Create a new Client instance: Create a new Client instance by passing your SICREDI API key, cooperative number, post number, and beneficiary number as arguments. For example:

```
$client = new \SicrediAPI\Client(
    $_ENV['SICREDI_API_KEY'],
    $_ENV['SICREDI_COOPERATIVE'],
    $_ENV['SICREDI_POST'],
    $_ENV['SICREDI_BENEFICIARY'],
    new \GuzzleHttp\Client(), true);
```

This example uses environment variables, but feel free to use any method you prefer to pass the parameters.

2. Call the authenticate() method on the Client instance to authenticate with the Sicredi API by passing your Sicredi API username and password as arguments.
3. Get the Boleto resource client from the Client instance by calling the boleto() method. For example:

```
$client->authenticate($_ENV['SICREDI_USERNAME'], $_ENV['SICREDI_PASSWORD']);

$boletoClient = $client->boleto();
```

4. Create a new Boleto instance by passing the necessary parameters, such as beneficiary information, payee information, amount, and due date. For example:

```
$boleto = new \SicrediAPI\Domain\Boleto\Boleto(
    (new Beneficiary(
        'Jose da Silva',
        '86049253099',
        'person'
    )),
    (new Payee(
        'Maria de Lurdes',
        '50581718054',
        'person'
    )),
    100.00,
    'DM',
    12345,
    'RECIBO',
    '999999',
    new DateTime('2023-12-31')
);
```

5. Call the create() method on the Boleto resource client to create the Boleto. For example:

```
$boletoClient->create($boleto);
```

6. Store and/or do anything else you need to do with the Boleto information returned by the create() method.

Validation and Production
-------------------------

[](#validation-and-production)

Before using the Cobrança API friom Sicredi, please follow the sequential steps for validation and production contained in the attached manual, [available at docs/](https://github.com/BrunoPansani/sicredi-api/tree/main/docs).

In summary, the process for validation includes the following steps:

1. Access the Developer Portal
2. Create an APP for Sandbox
3. Request the Sandbox API Token
4. Test the URLs available in the Homologation environment
5. Create an APP for Production
6. Request the Production API Token
7. Test the URLs available in the Production environment
8. Deploy your solution

To create the Sandbox APP, the developer must access the [Sicredi Developer Portal](https://developer.sicredi.com.br/), create an account or log in, and create a new application with the prefix "API Cobrança Sandbox".

After creating the Sandbox APP, the developer should request the Sandbox API Token through the menu 'Suporte' &gt; 'Abrir Chamado' in the Developer Portal. Select the appropriate option and fill in the name of the APP created previously. The API Token will be generated within a few days and can be found in the 'Minhas Apps' menu, under the details of the respective application.

The URLs available for testing can be found in the API manual.

For the production process, repeat the same steps for creating the APP, but with a different name, such as "API Cobrança Production". After creating the APP, request the API Token for Production, following the same steps as for Sandbox.

Remember that, in all operations, the authentication token received must be informed in the `x-api-key` header of the request. This token is different for each environment.

If you have any doubts, please contact the support channels listed in the attached manual, or visit the [Developer Portal](https://developer.sicredi.com.br/).

Contributing
------------

[](#contributing)

We welcome contributions to this package! If you would like to contribute, please follow these guidelines:

1. Fork the repository and make your changes.
2. Submit a pull request with a clear explanation of your changes and why they are necessary.
3. Be responsive to feedback and open to making changes to your pull request.

Remember you can always check Sicredi's documentation [available at docs/](https://github.com/BrunoPansani/sicredi-api/tree/main/docs).

Thank you for your interest in contributing to this package!

License
-------

[](#license)

This package is released under the [MIT License](https://github.com/BrunoPansani/sicredi-api/tree/main/LICENSE).

Contact
-------

[](#contact)

If you have any questions or issues, please contact me at .

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance58

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 86.1% 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 ~1 days

Total

3

Last Release

267d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/35349edc0be58383ba4e73e66262342586bcfbecdf38bc40fe8ae8cf860e3e03?d=identicon)[matfatjoe](/maintainers/matfatjoe)

---

Top Contributors

[![BrunoPansani](https://avatars.githubusercontent.com/u/5013503?v=4)](https://github.com/BrunoPansani "BrunoPansani (31 commits)")[![matfatjoe](https://avatars.githubusercontent.com/u/38146311?v=4)](https://github.com/matfatjoe "matfatjoe (5 commits)")

---

Tags

phpapisdksicredi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matfatjoe-sicredi-api/health.svg)

```
[![Health](https://phpackages.com/badges/matfatjoe-sicredi-api/health.svg)](https://phpackages.com/packages/matfatjoe-sicredi-api)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)

PHPackages © 2026

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