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!