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. Payments lifecycle

🏆 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:
  1. Intent Created: Your server requests a Payment Intent.
  2. Smart Routing: Reevit selects the optimal connection based on your Routing Rules.
  3. Customer Action: The customer completes the required action (OTP, PIN, or 3DS).
  4. Transaction Finalized: The PSP confirms success to Reevit.
  5. Verified Webhook: Your application receives a standardized notification to fulfill the order.

🛠️ Implementation

Creating a Payment Intent

To start a transaction, use the createIntent method in the SDK. This reserves the payment and returns a client_secret if frontend action is needed.
import { Reevit } from '@reevit/node';

const reevit = new Reevit(
  process.env.REEVIT_API_KEY!,
  process.env.REEVIT_ORG_ID!
);

const payment = await reevit.payments.createIntent({
  amount: 1000,           // 10.00 GHS
  currency: 'GHS',
  method: 'card',         // 'card', 'mobile_money', or 'bank_transfer'
  country: 'GH',
  customer_id: 'user_1',
  reference: 'ORD-12345',
  metadata: {
    cart_id: '99',
    order_id: 'order_12345'
  }
});

// Response status: 'requires_action' | 'succeeded' | 'failed'
Reevit automatically injects the correlation metadata needed for PSP webhooks. Use metadata for your own fields like order IDs or cart IDs.

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 processing state until the customer approves the prompt on their phone.

✅ Best Practices

  1. Always use Idempotency: Provide an idempotency_key (like an Order ID) to prevent double-charging customers during network retries.
  2. Fulfill on Webhooks: Never fulfill an order based solely on a frontend redirect. Wait for the payment.succeeded webhook event.
  3. Use Test Mode: Develop your integration using pfk_test_...secret keys to simulate different success and failure scenarios.