Accept Your First Payment

Process a test payment end-to-end using the Reevit API — from creating a payment intent to receiving a webhook confirmation.

WrittenBeginner10 min2026-02-01

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:

POST/v1/payments
code
curl -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:

code
{
  "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:

code
{
  "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:

ProviderCard NumberExpiryCVV
Paystack4084 0840 8408 4081Any futureAny 3 digits
Flutterwave5531 8866 5214 295009/32564
Stripe4242 4242 4242 4242Any futureAny 3 digits

More from Payments

Continue learning with related guides

Stop losing revenue to payment failures

Connect your existing PSP accounts in minutes. Get automatic failover, unified webhooks, and cross-provider analytics — without changing how you handle funds.

No credit card required
Connect in under 5 minutes
Your keys, your funds — always

Need a custom solution? Talk to our team