intram_sdk_flutter 2.4.0 copy "intram_sdk_flutter: ^2.4.0" to clipboard
intram_sdk_flutter: ^2.4.0 copied to clipboard

We are accelerating the digitalization of businesses in Africa through digital solutions to sell, receive payments, issue payments and ensure better management.

intram_sdk_flutter #

pub package License: MIT Platform

Accept Intram mobile-money payments in your Flutter app. The SDK opens a secure payment screen, drives the flow to completion, and hands you back the result — you never touch card or wallet data yourself.

Android and iOS.

Features #

  • Mobile money — MTN, Moov, Wave, and every operator enabled on your account
  • Two flows — create a transaction on the fly (makePayment), or pay one your backend already created (payTransaction)
  • Works offline-of-the-CDN — the payment JS ships bundled inside the package, so the payment screen no longer depends on fetching a script from cdn.intram.org (this was the main cause of "Failed to load Intram SDK" on older Android System WebViews)
  • Polished by default — skeleton loader instead of a white flash, load progress, cancel confirmation, and error/timeout recovery with retry
  • 3-D Secure & operator redirects work — navigation is deliberately not blocked
  • No native code: webview_flutter is the only platform dependency

Requirements #

Dart SDK >=3.0.3 <4.0.0
Flutter >=1.17.0
Platforms Android, iOS

Installation #

dependencies:
  intram_sdk_flutter: ^2.4.0
flutter pub get
import 'package:intram_sdk_flutter/intram_sdk_flutter_webview.dart';

Getting your API keys #

  1. Create or log in to your Intram Business account
  2. Go to Developers → API in the left-hand menu
  3. Copy your PUBLIC_KEY
  4. Toggle between Sandbox and Live mode as needed

⚠️ Only the public key belongs in your app #

IntramSdkPayment historically took four keys. Only publicKey is ever used — the other three are now optional, deprecated, and ignored:

final intramSdk = IntramSdkPayment('YOUR_PUBLIC_KEY');

Never ship your PRIVATE_KEY, SECRET_KEY, or MERCHANT_KEY in a mobile binary — anyone can extract strings from a distributed app. Those keys belong on your server. Existing four-argument call sites still compile; the extra parameters will be removed in 3.0.0.

Usage #

Create and pay a transaction #

final intramSdk = IntramSdkPayment('YOUR_PUBLIC_KEY');

final result = await intramSdk.makePayment(
  context,
  5000,                            // amount in XOF
  true,                            // sandbox: true = test, false = live
  'My Store',                      // name shown on the payment screen
  '#29b3a6',                       // brand colour (hex)
  'https://example.com/logo.png',  // store logo URL
  callbackUrl: 'https://your-backend.com/webhook/payment',  // optional
);

if (result['success'] == true) {
  final transactionId = result['transaction_id'];
} else if (result['cancelled'] == true) {
  // user closed the payment screen
} else {
  final error = result['error'];
}
Key Type Description
success bool true if payment succeeded
cancelled bool? true if the user closed the payment screen
transaction_id String? Intram transaction ID
data Map? Full response object from the Intram JS SDK
timestamp String? ISO 8601 timestamp of the transaction
error String? Error message if the payment failed

Pay an existing transaction (by reference) #

When your backend has already created the transaction — an invoice, a payment link, a due to settle — don't create a new one. Pay it by its reference and the hosted gateway opens directly on it. Amount, currency, callback URL and environment already live on the transaction server-side, so none of them are passed here.

final result = await intramSdk.payTransaction(context, 'TRX-REFERENCE-123');

if (result['success'] == true) {
  // status == 'SUCCESS'
}
Key Type Description
success bool true when status == 'SUCCESS'
cancelled bool true if the user closed / cancelled
status String? 'SUCCESS' | 'FAILED' | 'CANCELLED'
reference String The transaction reference
transaction_id String? Transaction id/reference reported by the gateway
data Map? Full message from the gateway bridge
error String? Error message if the payment failed

Endpoints #

The SDK targets the hosted Intram platform — there is nothing to configure to go live.

Gateway https://gateway.intram.org
Webservices https://webservices.intram.org:4002/

A single call can override the gateway it opens:

await intramSdk.payTransaction(context, ref, gatewayBaseUrl: 'https://gateway.intram.org');

Use sandbox: true on makePayment for Intram's hosted test mode — real servers, fake money.

Test numbers #

Use these in sandbox mode:

Network Number
MTN 61000000
Moov 94000000

Platform setup #

Android — internet permission in AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

iOS — nothing to do; internet access is allowed by default.

Dependencies #

Package Version
webview_flutter ^4.5.0
webview_flutter_android ^3.16.0
webview_flutter_wkwebview ^3.13.0

Contributing #

Issues and pull requests are welcome on GitHub.

License #

MIT — see LICENSE.

1
likes
120
points
129
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

We are accelerating the digitalization of businesses in Africa through digital solutions to sell, receive payments, issue payments and ensure better management.

Homepage
Repository (GitHub)

License

MIT (license)

Dependencies

flutter, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on intram_sdk_flutter