Skip to Content

Payments

End‑to‑end flows for collecting payments with Paystack using the SDK.

Transaction Flow (Available)

Use the hosted checkout flow for secure payment collection:

final transaction = await MindPaystack.instance.transaction.initialize( InitializeTransactionOptions( amount: Money.fromCents(150000, Currency.ngn), // ₦1,500.00 email: 'user@example.com', ), ); // Open transaction.data.authorizationUrl in browser/webview

Direct Card Charging (Coming Soon)

Direct card charging APIs will be available in a future release:

// Coming Soon - Direct card charging final charge = await MindPaystack.instance.charge.chargeCard( ChargeCardOptions( amount: Money.fromCents(150000, Currency.ngn), email: 'user@example.com', cardNumber: '4084084084084081', cvv: '408', expiryMonth: '12', expiryYear: '30', ), );

Verify Payments (Available)

final verification = await MindPaystack.instance.transaction.verify( VerifyTransactionOptions(reference: transaction.data.reference), ); if (verification.data.status == 'success') { // Payment successful - fulfill the order print('Payment confirmed: ₦${verification.data.amount / 100}'); }

Partial Debit (Coming Soon)

Partial debit functionality will be available in a future release:

// Coming Soon - Partial debit final result = await MindPaystack.instance.charge.createPartialDebit( PartialDebitOptions( amount: Money.fromCents(50000, Currency.ngn), email: 'user@example.com', authorizationCode: 'AUTH_XXXX', ), ); currency: 'NGN', );
Last updated on