APICheckout

Create a session

Create a Checkout session and get the payment link to send to the customer.

POST https://business.novasend.app/v2/payin/sessions

Creates a payment session and returns the checkoutUrl link to the hosted page. No debit happens until the customer pays on that page.

Call this endpoint from your server only: it uses your API credentials, which must never be exposed in a browser or mobile app.

Request headers

ValueDescriptionRequired
AuthorizationAPI authentication, Basic base64(api_key:api_client)✅
X-Idempotency-KeyPrevents the same session from being created twice when you retry. Must be a UUID✅
Content-Typeapplication/json✅
Accept-LanguageLanguage of error messages: en, fr

Request

FieldTypeDescriptionRequired
referencestringUnique merchant-side payment identifier (UUID recommended).✅
amountnumberAmount to collect, as a whole number with no decimals.✅
currencystringISO currency: XAF or XOF.✅
countrystringISO country code (CM, CI). Sets the Mobile Money operators and dialling code offered.✅
flowstringAlways checkout.✅
allowedPaymentMethodsstring[]Methods offered to the customer: mobile_money, card, or both.✅
returnUrls.successurlPage on your site the customer returns to after a successful payment (HTTPS).✅
returnUrls.failureurlPage on your site the customer returns to after a failure (HTTPS).✅
{
  "reference": "0f3fed58-0590-434e-8a00-5d6cd3560382",
  "amount": 12500,
  "currency": "XAF",
  "country": "CM",
  "flow": "checkout",
  "allowedPaymentMethods": ["mobile_money", "card"],
  "returnUrls": {
    "success": "https://your-site.com/order/success",
    "failure": "https://your-site.com/order/failure"
  }
}

Example

curl -X POST https://business.novasend.app/v2/payin/sessions \
  -H "Authorization: Basic $(printf '%s' "$API_KEY:$API_SECRET" | base64)" \
  -H "X-Idempotency-Key: $(uuidgen | tr 'A-Z' 'a-z')" \
  -H "Content-Type: application/json" \
  -d '{"reference":"0f3fed58-0590-434e-8a00-5d6cd3560382","amount":12500,"currency":"XAF","country":"CM","flow":"checkout","allowedPaymentMethods":["mobile_money","card"],"returnUrls":{"success":"https://your-site.com/order/success","failure":"https://your-site.com/order/failure"}}'

Response

{
  "id": "tr_bbodj27lqhckrc7yomyjlo",
  "reference": "0f3fed58-0590-434e-8a00-5d6cd3560382",
  "status": "created",
  "amount": 12500,
  "fee": 150,
  "chargedAmount": 12650,
  "currency": "XAF",
  "country": "CM",
  "phoneCode": "+237",
  "allowedPaymentMethods": ["mobile_money", "card"],
  "selectedPaymentMethod": null,
  "expiresAt": "2026-10-27T10:30:00.000Z",
  "checkoutUrl": "https://pay.novasend.app/checkout?session=<token>",
  "returnUrls": {
    "success": "https://your-site.com/order/success",
    "failure": "https://your-site.com/order/failure"
  }
}

Response fields

FieldDescription
idUnique Novasend transaction identifier.
referenceReference provided by the merchant.
statusSession status: created, processing, pending, completed, failed, expired.
amountRequested amount.
feeFees applied.
chargedAmountTotal amount paid by the customer, shown on the Checkout page.
currencySession currency.
country / phoneCodeSession country and dialling code offered for the Mobile Money number.
allowedPaymentMethodsPayment methods offered to the customer.
selectedPaymentMethodMethod chosen by the customer (mobile_money, card), null until a payment starts.
expiresAtDeadline to start the payment. After it, the session becomes expired.
checkoutUrlPayment page link to redirect the customer to.
returnUrlsSession return URLs.

After the redirect

  1. Redirect the customer to checkoutUrl (HTTP 303 redirect or link).
  2. Wait for the webhook: verify the HMAC signature, then update the order from status and reference.
  3. On your returnUrls pages, show a waiting message if the webhook has not arrived yet: the status can stay processing for a few seconds after the redirect.

If a network error occurs while creating the session, retry with the same X-Idempotency-Key to avoid creating a second session.