Command Palette

Search for a command to run...

Skip to content

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 min

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

  1. Get your API key

    Navigate to the Developers → API Keys tab in your dashboard. Copy your sandbox secret key. It starts with pfk_test_.

    Keep keys secret. Never expose your secret key in client-side code. All API calls should be made from your backend server.

  2. Create a payment

    Make a POST request to create a payment intent:

    POST/v1/payments

    Requestcurl
    curl -X POST https://api.reevit.io/v1/payments \  -H "Authorization: Bearer pfk_test_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.

  3. 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:

    Response200 · JSON
    {  "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.

  4. Receive the webhook

    Once the payment succeeds (or fails), Reevit sends a unified webhook to your configured endpoint:

    Webhookpayment.succeeded
    {  "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.

  5. 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. Click a number to copy it.

ProviderCard numberExpiryCVV
PaystackAny futureAny 3 digits
Flutterwave09/32564
StripeAny futureAny 3 digits

Next steps

Stop losing payments to provider downtime.

Free for your first 1,000 payments a month, and failed payments are never billed. Connect a provider and take your first payment before the coffee gets cold.