https://github.com/marsadmaqsood/binance_pay
A Flutter package for integrating Binance Pay API into your mobile applications, enabling users to make payments with ease.
https://github.com/marsadmaqsood/binance_pay
binance binance-api binance-pay flutter flutter-package
Last synced: about 1 month ago
JSON representation
A Flutter package for integrating Binance Pay API into your mobile applications, enabling users to make payments with ease.
- Host: GitHub
- URL: https://github.com/marsadmaqsood/binance_pay
- Owner: MarsadMaqsood
- License: mit
- Created: 2023-05-03T10:03:54.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-28T10:47:26.000Z (about 2 years ago)
- Last Synced: 2025-10-23T03:57:32.034Z (8 months ago)
- Topics: binance, binance-api, binance-pay, flutter, flutter-package
- Language: Dart
- Homepage:
- Size: 273 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pub.dev/packages/binance_pay/install)
## ⭐ Installing
```yaml
dependencies:
binance_pay: ^0.0.3
```
## ⚡ Import
```dart
import 'package:binance_pay/binance_pay.dart';
```
## 📙 How To Use
```dart
BinancePay pay = BinancePay(
apiKey: apiKey,
apiSecretKey: apiSecret,
);
```
### Create an order
Returns OrderResponse
```dart
String merchantTradeNo = generateMerchantTradeNo();
//Create an order
OrderResponse response = await pay.createOrder(
body: RequestBody(
merchantTradeNo: merchantTradeNo,
orderAmount: '1.01',
currency: 'BUSD',
goodsType: '01',
goodsCategory: '1000',
referenceGoodsId: '1234567',
goodsName: 'Cup Cake',
goodsDetail: 'A Yummy cup cake.',
),
);
```
### Query the order
Returns QueryResponse
```dart
//Query the order
QueryResponse queryResponse = await pay.queryOrder(
merchantTradeNo: merchantTradeNo,
prepayId: response.data!.prepayId,
);
```
### Close the order
Returns CloseResponse
```dart
//Close the order
CloseResponse closeResponse = await pay.closeOrder(
merchantTradeNo: merchantTradeNo,
);
```