Overview
In this guide you'll process a complete test payment through Reevit's unified API. The flow works the same whether you're using Paystack, Flutterwave, Hubtel, or Stripe under the hood — Reevit normalizes everything into a single schema.
Prerequisites
- A Reevit account with at least one sandbox connection (see Connect Your First PSP)
- Your sandbox API key (find it in Dashboard → Developers → API Keys)
The payment flow
Get your API key
Navigate to Developers → API Keys tab in your dashboard. Copy your sandbox secret key — it starts with sk_sandbox_.
Keep keys secret
Never expose your secret key in client-side code. All API calls should be made from your backend server.
Create a payment
Make a POST request to create a payment intent:
/v1/paymentscurl -X POST https://sandbox-api.reevit.io/v1/payments \
-H "Authorization: Bearer sk_sandbox_your_key_here" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: unique-request-id" \
-d '{
"amount": 5000,
"currency": "GHS",
"customer_email": "test@example.com",
"description": "Test payment",
"metadata": {
"order_id": "ORD-001"
}
}'
The response includes a payment_id and, depending on your routing, a next_action object with checkout or redirect details.
Handle the response
The API returns a payment object with a status. For card and mobile money payments, you'll typically get a requires_action status with a next_action object:
{
"id": "pay_abc123",
"status": "requires_action",
"amount": 5000,
"currency": "GHS",
"next_action": {
"type": "redirect",
"redirect_url": "https://checkout.paystack.com/..."
},
"connection_label": "paystack-ghana-test",
"created_at": "2026-02-01T10:00:00Z"
}
Redirect your customer to the redirect_url to complete payment. After completion, they'll be sent back to your configured return URL.
Receive the webhook
Once the payment succeeds (or fails), Reevit sends a unified webhook to your configured endpoint:
{
"event": "payment.succeeded",
"data": {
"id": "pay_abc123",
"status": "succeeded",
"amount": 5000,
"currency": "GHS",
"provider": "paystack",
"provider_reference": "PSK_xyz789"
}
}
Unified webhooks
Regardless of which provider processed the payment, the webhook format is identical. No more parsing different provider schemas.
Verify in the dashboard
Go to Payments in your dashboard. You'll see the transaction with full details — status, provider used, timeline, amount, and customer info. Click on the payment to see the complete lifecycle.
Test card numbers
When testing in sandbox mode, use these test card numbers:
| Provider | Card Number | Expiry | CVV |
|---|---|---|---|
| Paystack | 4084 0840 8408 4081 | Any future | Any 3 digits |
| Flutterwave | 5531 8866 5214 2950 | 09/32 | 564 |
| Stripe | 4242 4242 4242 4242 | Any future | Any 3 digits |