API reference

Get a payment link

A fresh hosted checkout page for a delivery nobody has paid for yet. Booking already returns one; this is for everything that happens afterwards.

POST/api/v1/dispatch/deliveries/{id}/pay

When you need it#

Booking hands you a checkout_url already, so most integrations never call this. Call it when:

SituationWhy
The customer left and came back laterHosted links do not last forever.
The first payment attempt failedA declined card leaves the delivery unpaid; the link may be spent.
The booking came back with no checkout_urlFlutterwave was unreachable when you booked. The delivery still exists; only the link was missed.
You want to send the link somewhere elseA reminder email, a WhatsApp message, a second device.

The price does not move underneath the customer

The amount is read back from what the booking quoted, not recalculated. Someone returning tomorrow owes what they were told today, even if surge or a promo has changed the price in between.

Parameters#

Path
idstringrequired
The delivery id or its tracking_code.
Body (optional)
redirect_urlstringoptional
Where Flutterwave returns the customer after paying. Must be https — anything else is ignored rather than followed, because an open redirect on a payment page is a phishing primitive. Omit it and they land on the RheoChat tracking page for the delivery.

Request#

curl -X POST "https://api.rheochat.com/api/v1/dispatch/deliveries/DCAB12CD34/pay" \
  -H "Authorization: Bearer rk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "redirect_url": "https://yourshop.com/orders/4821" }'

The SDK does not wrap this call yet — it is a plain POST with your bearer token.

Response#

200
{
  "id": "0f9a1c8e-…",
  "tracking_code": "DCAB12CD34",
  "environment": "live",
  "livemode": true,
  "currency": "NGN",
  "amount": 1840,
  "tx_ref": "disp-DCAB12CD34",
  "checkout_url": "https://checkout.flutterwave.com/v3/hosted/pay/a1b2c3d4e5f6",
  "request_id": "b6d3f7c2-…"
}
FieldMeaning
checkout_urlThe hosted payment page. Redirect the customer here, or send them the link.
amountWhat they will be charged — the grossed-up total, in naira.
tx_refThe payment reference this delivery is matched by. Unchanged between attempts.

Errors#

StatusCodeWhen
404not_foundNo such delivery in this environment.
422unprocessableThe delivery is cash on delivery, already paid, cancelled, has no online payment to complete, or your company has no payout account connected. details says which.
422unprocessableThe key is a test key. Test deliveries are never charged, so a payment link for one would lead to a charge that must not happen.
500internal_errorFlutterwave would not mint a link just now. Retry shortly — the delivery is unaffected.

Why we create the link, not you#

The charge has to live on RheoChat's Flutterwave account: that is what carries the flat split to your subaccount, and what the webhook that marks a delivery paid listens to. A charge created on your own account would be invisible to us — the delivery would sit at unpaid and never reach a rider. So rather than hand out a publishable key, we create the charge with our secret key and give you a URL. See Payments.