dimepay_flutter_sdk 1.0.2 copy "dimepay_flutter_sdk: ^1.0.2" to clipboard
dimepay_flutter_sdk: ^1.0.2 copied to clipboard

Official Flutter SDK for integrating Dime Pay.

๐Ÿ’ณ Dime Pay Flutter SDK #

The official Flutter SDK for embedding the Dime Pay secure payment experience into native apps using WebView.

๐Ÿš€ Installation #

flutter pub add dimepay_flutter_sdk

๐Ÿงฉ Usage #

DimePayWebView(
  total: 5000,
  currency: "JMD",
  test: true,
  orderId: "ORDER-001",
  clientId: "ck_jtfEtqbrX2Nf7U_evqKVy",
  data: "<signed_jwt_token>",
  payment_methods: {
    apple_pay: true,
    google_pay: true,
    samsung_pay: true
  },
  styles: DimePayStyles(
    primaryColor: "#936c6c",
    buttonColor: "#936c6c",
    buttonTextColor: "#FFFFFF",
    backgroundColor: "#DDDDDD",
    noBorderRadius: false,
  ),
  onReady: (data) => print("โœ… Ready: \$data"),
  onSuccess: (data) => print("โœ… Success: \$data"),
  onFailed: (err) => print("โŒ Failed: \$err"),
  onError: (err) => print("โŒ Error: \$err"),
  onCancel: () => print("โš ๏ธ Cancelled"),
  onLoading: () => print("โณ Loading..."),
)

๐Ÿ” Secure JWT Flow #

You must pass a signed JWT to data prop containing transaction info. Sign this on your server.


๐Ÿ” Secure Payment Flow with JWT #

You must generate a signed JWT on your backend and pass it to the SDK via the data prop.

Example payload: #

{
  "id": "ORDER-001",
  "total": 5000,
  "subtotal": 5000,
  "description": "This is an order from the sdk",
  "tax": 0,
  "currency": "JMD",
  "fees": [],
  "items": [],
  "fulfilled": true,
  "shippingPerson": {
    "name": "Shamir Saddler",
    "street": "1 Test Ave",
    "city": "Kingston 6",
    "stateOrProvinceName": "Kingston",
    "postalCode": "00000",
    "countryName": "Jamaica"
  },
  "billingPerson": {
    "name": "Shamir Saddler",
    "street": "1 Test Ave",
    "city": "Kingston 6",
    "stateOrProvinceName": "Kingston",
    "postalCode": "00000",
    "countryName": "Jamaica"
  },
  "webhookUrl": "https://yourservice.com/webhook"
}

Use a backend library like jsonwebtoken to sign the payload with your secret key. Never expose your secret key in your app.


โš™๏ธ Configuration Options #

Prop Type Required Description
total number โœ… The total amount to charge
currency string โœ… The currency code (e.g. JMD, USD)
order_id string โœ… Your order reference
client_id string โœ… Client ID for your integration
data string โœ… Signed JWT with payment details
payment_methods object optional Defines payment methods to enable
styles object optional Customizes UI (colors, border radius, etc.)
test boolean optional Set true for sandbox environment
onReady func optional Called when payment page is ready
onSuccess func optional Called when payment completes successfully
onFailed func optional Called if payment fails
onError func optional Called on internal error
onCancel func optional Called when user cancels
onLoading func optional Called when payment widget begins loading

๐Ÿงพ Changelog #

[1.0.2] - 2025-06-26 #

  • Add support for Apple Pay, Google Pay, Samsung Pay

[1.0.0] - 2025-05-14 #

  • ๐Ÿš€ Initial release
  • โœ… Supports full payment flow with JWT + WebView
  • ๐Ÿ“ก Handles events: onReady, onSuccess, onError, onCancel, etc.

๐Ÿ›ก๏ธ License #

MIT License ยฉ Dime Pay

0
likes
0
points
102
downloads

Publisher

unverified uploader

Weekly Downloads

Official Flutter SDK for integrating Dime Pay.

Homepage

License

unknown (license)

Dependencies

flutter, webview_flutter

More

Packages that depend on dimepay_flutter_sdk