Payments
Process unified payments with smart routing and automated failover
Unified Payments
Reevit Payments allows you to accept funds from customers globally via a single API. We abstract away the technical debt of integrating multiple Gateways, Mobile Money providers, and Bank Transfer systems into one standardized flow.
Snapshot
Payment overview for the last 30 days
Total Volume
+12.5%from last period
Transactions
+8.2%from last period
Success Rate
+0.3%from last period
Failed
transactions failed
Recent Payments
| Payment ID | Amount | Status | Provider | Method | Fee | Attempts | Created |
|---|---|---|---|---|---|---|---|
| pay_1a2b3c4d5e6... | GHS 150.00 | Succeeded | Paystack | CARD | GHS 4.65 | 1/1 | 5 minutes ago |
| pay_2b3c4d5e6f7... | GHS 500.00 | Pending | Hubtel | MOMO | GHS 7.50 | 0/1 | 15 minutes ago |
| pay_3c4d5e6f7g8... | NGN 250.00 | Failed | Flutterwave | CARD | NGN 0.00 | 0/2 | 30 minutes ago |
| pay_4d5e6f7g8h9... | NGN 899.00 | Succeeded | Monnify | CARD | NGN 22.47 | 1/2 | about 1 hour ago |
| pay_5e6f7g8h9i0... | NGN 1,200.00 | Requires Action | Paystack | BANK_TRANSFER | NGN 18.00 | 0/1 | about 1 hour ago |
🏆 The Reevit Advantage
🏢 For Business Growth
- Maximized Acceptance: If a card fails on one provider, we instantly retry on another. Never lose a sale to a gateway outage again.
- Optimized Fees: Route transactions to providers with the lowest processing fees based on the customer's region.
- Unified Reporting: View your consolidated revenue across Hubtel, Paystack, and Stripe in a single dashboard.
💻 For Engineering Velocity
- Standardized Lifecycle: No more mapping "Success" from paystack to "Completed" from Hubtel. Every transaction follows a unified state machine.
- Developer-First SDKs: Use our typed libraries to handle payment intents, idempotency, and error handling out of the box.
- One Integration: Add a new country or payment method by simply toggling a switch in the dashboard—no code changes required.
🔄 The Transaction Lifecycle
Every payment on Reevit follows a secure, 5-step lifecycle:
- Intent Created: Your server requests a Payment Intent.
- Smart Routing: Reevit selects the optimal connection based on your Routing Rules.
- Customer Action: The customer completes the required action (OTP, PIN, or 3DS).
- Transaction Finalized: The PSP confirms success to Reevit.
- Verified Webhook: Your application receives a standardized notification to fulfill the order.
🛠️ Implementation
Creating a Payment Intent
To start a transaction, use the create method in the SDK. This reserves the payment and returns a client_secret if frontend action is needed.
import { Reevit } from '@reevit/node';
const payment = await reevit.payments.create({
amount: 1000, // 10.00 GHS
currency: 'GHS',
method: 'card', // 'card', 'momo', or 'bank'
country: 'GH',
customer_id: 'user_1',
reference: 'ORD-12345',
metadata: {
cart_id: '99',
// Required for webhook routing - see below
org_id: process.env.REEVIT_ORG_ID,
connection_id: 'conn_xxx',
payment_id: 'order_12345'
}
});
// Response status: 'requires_action' | 'succeeded' | 'failed'Required Metadata for Webhook Routing
Critical: For payment provider webhooks (Paystack, Flutterwave, etc.) to route back to Reevit correctly, you must include specific fields in the metadata object. Without these, webhooks will fail with a 400 Bad Request error.
| Metadata Field | Required | Description |
|---|---|---|
org_id | ✅ Yes | Your organization ID (from Reevit Dashboard → Settings) |
connection_id | ✅ Yes | The connection ID for the payment provider |
payment_id | ✅ Yes | Your internal payment/order ID (Required for Stripe & Webhook routing) |
customer_email | Optional | Customer email for receipts |
Payment Links: If you're using Reevit Payment Links, these metadata fields are automatically included. You only need to set them manually when creating payments via API or SDK.
Handling Next Actions
If a payment requires user input (like a 3D Secure redirect or a Mobile Money prompt), the status will be requires_action.
- Redirect: For cards, the SDK provides a URL to redirect the user to finish the secure check.
- Asynchronous (MoMo): For mobile money, the payment stays in a
processingstate until the customer approves the prompt on their phone.
✅ Best Practices
- Always use Idempotency: Provide an
idempotency_key(like an Order ID) to prevent double-charging customers during network retries. - Fulfill on Webhooks: Never fulfill an order based solely on a frontend redirect. Wait for the
payment.succeededwebhook event. - Use Test Mode: Develop your integration using
pfk_test_keys to simulate different success and failure scenarios.