https://github.com/gerencianet/gn-api-sdk-python
SDK em Python integrada a API Gerencianet. Esta SDK está preparada para integração à API Pix e API Boletos da Gerencianet, que lhe permite realizar o gerenciamento de cobranças Pix com QR Code e Pix Copia e Cola, boleto/Bolix, carnê, cartão de crédito e muito mais.
https://github.com/gerencianet/gn-api-sdk-python
assinatura billet boleto bolix card carne carnet cartao-de-credito link-de-pagamento marketplace pix pix-copia-e-cola python qrcode sdk sdk-python split subscription
Last synced: 16 days ago
JSON representation
SDK em Python integrada a API Gerencianet. Esta SDK está preparada para integração à API Pix e API Boletos da Gerencianet, que lhe permite realizar o gerenciamento de cobranças Pix com QR Code e Pix Copia e Cola, boleto/Bolix, carnê, cartão de crédito e muito mais.
- Host: GitHub
- URL: https://github.com/gerencianet/gn-api-sdk-python
- Owner: gerencianet
- License: mit
- Created: 2016-01-11T13:07:20.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-07-13T15:05:26.000Z (over 3 years ago)
- Last Synced: 2025-09-17T18:07:49.508Z (5 months ago)
- Topics: assinatura, billet, boleto, bolix, card, carne, carnet, cartao-de-credito, link-de-pagamento, marketplace, pix, pix-copia-e-cola, python, qrcode, sdk, sdk-python, split, subscription
- Language: Python
- Homepage: https://dev.gerencianet.com.br/docs/instalacao-sdk-python
- Size: 93.8 KB
- Stars: 40
- Watchers: 12
- Forks: 17
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gn-api-sdk-python
> A python library for integration of your backend with the payment services
provided by [Gerencianet](http://gerencianet.com.br).
[](https://travis-ci.org/gerencianet/gn-api-sdk-python)
[](https://coveralls.io/github/gerencianet/gn-api-sdk-python?branch=master)
[](https://codeclimate.com/github/gerencianet/gn-api-sdk-python)
## Installation
Install with Pip:
```bash
$ pip install gerencianet
```
## Tested with
```
python 2.7, 3.3, 3.4, 3.5 and 3.9
```
## Atenção
```
A Gerencianet está disponibilizando um novo endpoint para requisitar o envio de Pix, este endpoint passará a ter um idEnvio como parâmetro na requisição, além disso o método passa a ser o PUT ao invés do POST para fins de idempotência.
```
## Basic usage
```python
# encoding: utf-8
from gerencianet import Gerencianet
credentials = {
'client_id': 'client_id',
'client_secret': 'client_secret',
'sandbox': True,
'certificate': 'insira-o-caminho-completo-do-certificado'
}
gn = Gerencianet(credentials)
body = {
'calendario': {
'expiracao': 3600
},
'devedor': {
'cpf': '12345678909',
'nome': 'Francisco da Silva'
},
'valor': {
'original': '123.45'
},
'chave': '71cdf9ba-c695-4e3c-b010-abb521a3f1be',
'solicitacaoPagador': 'Cobrança dos serviços prestados.'
}
response = gn.pix_create_immediate_charge(body=body)
print(response)
```
## Examples
You can run the examples inside `examples` with
`$ python examples/example.py`:
```bash
$ python examples/create_charge.py
```
Just remember to set the correct credentials inside `examples/credentials.py` before running.
## Tests
To run the tests, just run *pytest*:
```bash
$ py.test
```
## Additional documentation
The full documentation with all available endpoints is in https://dev.gerencianet.com.br/.
## Changelog
[CHANGELOG](CHANGELOG.md)
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/gerencianet/gn-api-sdk-python. This project is intended to be a safe, welcoming space for collaboration.
## License
The library is available as open source under the terms of the [MIT License](LICENSE).