Skip to Content
FlowPayDocs

Quickstart

Your first test payment, from the first call to the webhook.

1. Get your test key

In the dashboard, open your application and create an API key. A test key starts with sk_test_.

2. Create a payment

curl -X POST "$FLOWPAY_URL/v1/payments" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_reference": "ORDER-2026-0001",
    "amount": 5000,
    "currency": "XOF",
    "description": "Monthly subscription",
    "return_url": "https://shop.example/return"
  }'

FLOWPAY_URL is the API address you are given when your access opens.

The response contains the payment, including checkout_url:

{
  "id": "6f1c2d3e-0000-4000-8000-000000000001",
  "state": "AWAITING_CUSTOMER",
  "mode": "TEST",
  "merchant_reference": "ORDER-2026-0001",
  "amount": "5000",
  "currency": "XOF",
  "checkout_url": "https://…/pay/6f1c2d3e-…",
  "expires_at": "2026-09-01T10:30:00Z"
}

3. Send the customer to pay

Redirect your customer to checkout_url, or share the link. The payment page shows the available networks and handles each one's flow.

To keep the flow inside your own interface, see Direct payment.

Test the outcomes

With an sk_test_… key no money moves, and the number you enter picks the outcome:

NumberOutcome
Ends in 0000Refused by the sandbox: the payment fails.
Any otherAccepted, then settled after a few seconds.

This lets you test payment.succeeded and payment.failed without charging anything.

4. Receive the outcome

Set your webhook address in the dashboard. You will receive payment.succeeded (or payment.failed, payment.expired, payment.canceled). See Webhooks.

You can also read the payment at any time:

curl "$FLOWPAY_URL/v1/payments/6f1c2d3e-..." \
  -H "Authorization: Bearer sk_test_..."

On this page