Pix BB - Easy to use interface for integrating with Banco do Brasil's Pix API in your Flutter Apps.
This package offers an easy-to-use interface for integrating with Banco do Brasil's Pix API. With this package, you can get transaction information quickly and efficiently in your Flutter apps.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
About The Project
This package offers an easy-to-use interface for integrating with Banco do Brasil's Pix API. With this package, you can get transaction information quickly and efficiently in your Flutter apps.
Pre Requirements
- Key Pix registered with Banco do Brasil
- Exclusive for legal entities
- Registration on the BB Developers Portal
Getting Started
To install This package in your project you can follow the instructions below:
a) Add in your pubspec.yaml:
dependencies:
pix_bb: <last-version>
b) or use:
dart pub add pix_bb
How To Use
This package is ready for get transactions information quickly!
First instantiate the class passing the appropriate parameters
final pixBB = PixBB(
ambiente: Ambiente.homologacao,
// Optional, By default, the initial environment is defined as the production
basicKey:'BASIC_KEY',
appDevKey: 'APP_DEV_KEY',
);
Make a request to the API with request a list of transactions received from the last 4 days
await pixBB.getToken().then((token) {
pixBB
.getRecentReceivedTransactions(accessToken: token.accessToken)
.then((response) {
print(response); // it's a List<Pix>.
}).catchError((e) {
print('${e.errorCode} , ${e.errorMessage} , ${e.errorData}'); // It's a PixError.
});
});
Make a request for a list of transactions as of a specific date
//Attention!, the maximum difference in days between the start and end date must be 4 days
await pixBB.getToken().then((token) {
pixBB
.getTransactionsByDate(
accessToken: token.accessToken,
initialDate: DateTime.now().subtract(const Duration(days: 4)),
finalDate: DateTime.now(),
)
.then((response) {
print(response);// it's a List<Pix>.
}).catchError((e) {
print('${e.errorCode} , ${e.errorMessage} , ${e.errorData}'); // It's a PixError.
});
});
For more examples, please refer to the Documentation
Features
- ✅ Queries
- ✅ Get Recent Transactions
- ✅ Get Transactions By Date
- 🚧 Dynamic QR Code configuration: Creation of Pix billing with unique identification;
- 🚧 Receipt Verification: Status verification of generated charges;
- 🚧 Review: Allows you to change the generated billing data;
- 🚧 Return (request and consultation): Allows Pix to be returned to the payer in partial or full amount and that returns can be consulted.
Use cases
Request an access token
Request a token
accessToken = await pixBB.getToken();
Get recent trasactions
Request a list of transactions received from the last 4 days
await getRecentReceivedTransactions(accessToken: ccessToken);
Get transactions by date
Request a list of transactions as of a specific date
⚠️ Attention the maximum difference in days between the start and end date must be 4 days ⚠️
await getTransactionsByDate(
accessToken: accessToken,
initialDate: DateTime.now().subtract(const Duration(days: 4)),
finalDate: DateTime.now(),
);
Contributing
🚧 Contributing Guidelines - Currently being updated 🚧
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the appropriate tag. Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Remember to include a tag, and to follow Conventional Commits and Semantic Versioning when uploading your commit and/or creating the issue.
License
Distributed under the MIT LICENSE.txt
for more information.
Aknowledgements
Thank you to all the people who contributed to this project, whithout you this project would not be here today.
Maintaned by
Built and maintained by AcxTech Sistemas.
Libraries
- pix_bb
- This library provides a Flutter API for accessing the BB PIX API.