rasedi_flutter_sdk 1.0.1 copy "rasedi_flutter_sdk: ^1.0.1" to clipboard
rasedi_flutter_sdk: ^1.0.1 copied to clipboard

A new Flutter package for Rasedi Payment Gateway.

Rasedi Flutter SDK #

The official Flutter SDK for Rasedi Payment Gateway. This library provides a simple way to integrate Rasedi payments into your Flutter/Dart applications.

Features #

  • Cross-Platform: Works on Android, iOS, Web, macOS, Windows, and Linux.
  • Secure: Built-in authentication and request signing.
  • Easy Integration: Simple key-based initialization and typed response models.

Installation #

Add the package to your pubspec.yaml:

dependencies:
  rasedi_flutter_sdk:
    git:
      url: https://github.com/MirotechTeam/rasedi-flutter-sdk.git
      ref: main

Note: Once published to pub.dev, you can use rasedi_flutter_sdk: ^0.0.1.

Quick Start #

1. Initialize the Client #

import 'package:rasedi_flutter_sdk/rasedi_flutter_sdk.dart';

void main() async {
  // Your credentials
  const secretKey = "live_...";
  const privateKey = """-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----""";

  // Initialize client
  // The environment (Test/Live) is automatically detected from the secret key.
  final client = RasediClient(privateKey, secretKey);
}

2. Create a Payment #

final payload = CreatePaymentPayload(
  amount: "10000",
  title: "Order #123",
  description: "Payment description",
  gateways: [Gateway.CREDIT_CARD],
  redirectUrl: "https://your-site.com/callback",
  callbackUrl: "https://your-site.com/webhook",
  collectFeeFromCustomer: true,
  collectCustomerEmail: true,
  collectCustomerPhoneNumber: false,
);

try {
  final response = await client.createPayment(payload);
  print("Payment created: ${response.body.referenceCode}");
  print("Redirect user to: ${response.body.redirectUrl}");
} catch (e) {
  print("Error creating payment: $e");
}

3. Check Payment Status #

try {
  final response = await client.getPaymentByReference("reference-code");
  print("Status: ${response.body.status}");
} catch (e) {
  print("Error fetching status: $e");
}

4. Cancel a Payment #

try {
  final response = await client.cancelPayment("reference-code");
  print("Payment cancelled: ${response.body.status}");
} catch (e) {
  print("Error cancelling payment: $e");
}

Requirements #

  • Flutter >=3.0.0
  • Dart >=3.0.0

License #

This project is licensed under the MIT License.

1
likes
130
points
14
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A new Flutter package for Rasedi Payment Gateway.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

basic_utils, cryptography, flutter, http, pointycastle

More

Packages that depend on rasedi_flutter_sdk