PaymonetraDocs

Start a payment

Opens a checkout session and returns the URL to send your customer to.

POSThttps://api.paymonetra.com/v1/paymentsSecret key

Send your secret key: Authorization: Bearer sk_live_…. See authentication.

Starts a checkout and returns a URL to send the customer to.

Terminal
curl https://api.paymonetra.com/v1/payments \
  -H "Authorization: Bearer sk_live_..." \
  -d amount=45000 \
  -d reference=SF-10482 \
  -d customer_reference=cus_9f52 \
  -d customer_name="Ngozi Nwosu" \
  -d description="Ankara bundle"
JSON
{
  "reference": "ef8e7ff7078b893d03",
  "merchant_reference": "SF-10482",
  "status": "pending",
  "amount": 45000.70,
  "amount_requested": 45000,
  "account_number": "8021234701",
  "account_name": "MONETRA - Ngozi Nwosu",
  "checkout_url": "https://pay.paymonetra.com/ef8e7ff7078b893d03",
  "collects": ["bank_transfer"]
}

amount is not amount_requested. We add a kobo suffix, and the payer must send the exact figure. See below for why.

reference is the merchant's own order id and makes this idempotent: calling it again with the same one returns the same session rather than quoting a second amount for one order. Sending it is strongly recommended.

Sending customer_reference changes which account the payer sees. They get that customer's own permanent number, so their bank statement says the same thing every time they pay you. Without it they get your collection account. A reference we have not seen issues a new account on the spot, so no separate call is needed first; customer_name is required that first time.

Without any customer details, the checkout page collects a name and email before it shows an account, because a receipt has to go somewhere. Send them and the payer is never asked.

amount_over_limit is refused here rather than at the payer's bank, so the merchant finds out instead of the customer watching a transfer bounce.

Payments has the context around this call.