Blacklivery payment integration guide. Use before writing any payment-related code: Paystack rider charges, Flutterwave payouts, Monnify driver withdrawals, Stripe for Chicago, wallet top-up flows, commission deduction logic, refund handling, promo code application, or webhook verification. Also use when debugging payment failures or building the earnings withdrawal screen. Covers both Nigeria (NGN) and Chicago (USD) payment flows.
| Purpose | Nigeria | Chicago |
|---|---|---|
| Rider charges (card/bank) | Paystack | Stripe |
| Driver payouts | Flutterwave + Monnify | Stripe Connect |
| Wallet top-up | Paystack | Stripe |
| Refunds | Paystack (reverse) | Stripe (refund) |
The Flutter apps currently call the backend REST API for all payment operations — no native SDK for Paystack or Stripe is installed yet. The backend (backend/src/services/payment/) handles provider selection, charge creation, and webhook verification.
// Current PaymentService in rider app (lib/core/services/payment_service.dart)
Future<Map<String, dynamic>> initiatePayment({
required String tripId,
required double amount,
required String provider, // 'paystack' | 'stripe'
}) async {
final response = await _apiClient.dio.post('/api/v1/payments/initiate', data: {
'tripId': tripId,
'amount': amount,
'provider': provider,
});
return response.data['data'];
// Returns { authorizationUrl, reference } — open in WebView or browser
}
Future<Map<String, dynamic>> verifyPayment(String reference) async {
final response = await _apiClient.dio.post('/api/v1/payments/verify', data: {
'reference': reference,
});
return response.data['data'];
}
The native SDK patterns below (flutter_paystack, stripe_flutter) describe the target in-app checkout experience for smoother UX.
flutter_paystack: ^1.0.5 # Paystack — Nigeria rider payments
stripe_flutter: ^9.0.0 # Stripe — Chicago