Web Rabbit MediaDocs
Collect

Hosted Checkout

Create a hosted payment page that accepts card and Mobile Money.

Hosted Checkout is the fastest way to accept Mobile Money (and bank transfer in Nigeria). You create a session, we return a secure payment page URL, and you redirect the customer to it.

!Card payments are currently unavailable
Card payments are switched off. Sessions created with channel: "CARD" or via the legacy card path open with Mobile Money instead. Card details on this page are kept for reference.
!Requires write access
The API key must have write access. Read-only keys receive 403 insufficient_scope.

Endpoint

POST/v1/checkout/session

The legacy path /v1/collect/card is an alias for this endpoint. Raw card (PAN) charges are no longer accepted.

!Payout endpoints are retired
POST /v1/payout/momo and POST /v1/payout/bank now return 501 provider_unsupported. Payouts are initiated manually from Payouts in the dashboard.

Request

FieldTypeDescription
amountrequirednumberTotal to charge, in GHS.
customer_emailstringOptional payer email (and customer_name). Mobile Money and bank transfer never ask for contact details; card asks for name and email only if you didn't send them. Send them to pre-fill.
channelenumANY (default), MOMO, or CARD — recorded on the transaction.
networkenumOptional MTN, TELECEL, AT or GMONEY — preselects the wallet on the page.
subscriber_numberstringOptional payer phone number, prefilled on the page.
descstringOrder description shown in your dashboard. Max 100 chars.
referencestringYour order or player reference. Returned on the session, the transaction and every collection.* webhook. Max 120 chars.
metadataobjectUp to 20 flat string/number/boolean keys (2 KB). Returned in collection.* webhooks with checkout_session_id.
currency / countrystringOptional. Must match your business's registered country (see GET /v1/me → enabled). Anything else returns 422 currency_not_enabled.
shell
curl -X POST https://api.webrabbitmedia.com/v1/checkout/session \
  -H "Authorization: Bearer wr_test_..." \
  -H "Content-Type: application/json" \
  -H "HTTP-Referer: https://your-app-site.com" \
  -H "X-Webrabbitmedia-Title: Your App Name" \
  -d '{
    "amount": 170.00,
    "customer_email": "customer@example.com",
    "channel": "ANY",
    "network": "MTN",
    "subscriber_number": "0240000000",
    "desc": "Order 1042"
  }'

Response

Response · 201 Created
{
  "id": "cs_7Qk2mXv9Lp",
  "status": "open",
  "checkout_url": "https://webrabbitmedia.com/pay/cs_7Qk2mXv9Lp",
  "access_code": "cs_7Qk2mXv9Lp",
  "gross_amount": 170,
  "currency": "GHS",
  "expires_at": "2026-08-24T21:26:00.000Z",
  "mode": "test"
}
FieldTypeDescription
idstringCheckout session id — also the token in the checkout URL.
checkout_urlstringWeb Rabbit branded checkout page. Redirect the customer here.
access_codestringSame value as id, kept for backwards compatibility.
gross_amountnumberAmount the customer is charged, in GHS.
expires_atstringISO timestamp. Sessions expire 15 minutes after creation.
modeenumtest or live — taken from the API key used to create the session.
statusenumopen at creation, then processing, paid, failed, expired or cancelled.

Session lifecycle

The page is hosted by Web Rabbit, not by the processor. The customer goes straight to choosing a payment method. Mobile Money (charged natively on the page) and bank transfer need only the wallet number; name, email and billing address are optional receipt details. Card asks for name and email (unless pre-filled) and then opens the processor's PCI DSS certified page in a new tab. Sessions in a currency that isn't open for your account are refused at creation with 422 currency_<status>. Check enabled.countries[].provider_status on GET /v1/me: enabled, opens_later (with provider_opens_at), pending_provider, blocked_high_risk (the provider doesn't accept betting/gaming in that currency) or pending_onboarding (Web Rabbit is finishing provider onboarding for your business). Some currencies have a minimum amount, shown as min_amount per country on GET /v1/me (for example NGN 500). Smaller sessions are refused with 422 amount_below_minimum. When the payment settles, the customer lands on the branded result page and is redirected to your success_url after a short countdown.

FieldTypeDescription
Expiry15 minutesA countdown runs on the page; an expired link cannot be paid and must be re-created.
Test modewr_test_ keysThe page shows a Test mode badge. Both Mobile Money and card are answered by our built-in simulator — nothing reaches the processor, no money moves, and the GHS 10 test cap applies.
RetrieveGETGET /v1/checkout/session?id=<session id> returns the current session and its transaction.
›Confirm before fulfilling
Never fulfil an order on the redirect alone. Confirm with GET /v1/transactions/{id} and check resolved_status === "approved". The platform fee is applied at settlement.