jio_payment_sdk 0.0.1
jio_payment_sdk: ^0.0.1 copied to clipboard
A Flutter package to integrate Jio Payment Gateway.
jio_payment_sdk #
A custom Flutter payment SDK that allows developers to easily integrate their own backend-based payment flow using Dio and Firebase or any backend system.
๐ง Features #
- ๐ Easy payment order creation
- ๐ Backend integration with secure verification
- ๐ Dio-powered async HTTP communication
- ๐ Fully customizable for any payment gateway
- ๐ Firebase-ready (compatible with Firestore)
๐ฆ Installation #
Add this to your pubspec.yaml:
dependencies:
jio_payment_sdk: ^1.0.0
Then run:
flutter pub get
โ Prerequisites #
Your backend must support:
createOrder endpoint โ returns a unique orderId
verifyPayment endpoint โ receives orderId + success flag
We recommend Firebase Functions, Node.js, or Express.
๐ป Usage #
import 'package:jio_payment_sdk/jio_payment_sdk.dart';
final service = PaymentService(
createOrderUrl: 'https://your-backend.cloudfunctions.net/createOrder',
verifyPaymentUrl: 'https://your-backend.cloudfunctions.net/verifyPayment',
);
final orderId = await service.createOrder(
amount: 499,
userId: 'abc123',
);
await service.verifyPayment(
orderId: orderId,
success: true,
);
๐งช Example #
Check the /example directory for a working demo.
To run the example:
cd example
flutter run
๐ License #
This project is licensed under the MIT License โ see the LICENSE file for details.
๐ Author #
Maintained by Piyush. Feel free to contribute, ask questions, or report issues!