eNaira payments

Heyđź‘‹. We recommend checking out the overview to understand the basics of direct charge first. This guide assumes you've read that.

eNaira is a digital currency issued and regulated by the Central bank of Nigeria (CBN). With this method, Customers can make payments with eNaira wallets linked to their bank accounts.

Adding eNaira to your account

Before starting your integration, you should ensure that your Flutterwave account is live and eNaira is enabled on your account. To activate eNaira payments on your account:

  1. Log into your dashboard and navigate to your settings.
  2. Select Business Preferences and click on the Payment Methods tab.
  3. Click on the “Enable” button next to the eNaira option.

Payment flow

Charging your customer with eNaira is quite similar to other wallet payments(ApplePay, GooglePay). There are three ways to make a successful eNaira payment.

  1. Redirect
  2. QR code payments
  3. Charging with tokens.

The difference between these methods is how the payments are initiated and authorized with them.

Initiating the payment

When initiating an eNaira payment, You'll need to collect customer information like email, fullname and phone_number. Pass this information along with the transaction amount, currency, transaction reference (tx_ref) and redirect_url in your API request. Your request should be authorized properly before sending it to the charge endpoint.

{
    "tx_ref":"YOUR_PAYMENT_REFERENCE",
   "amount":"100",
   "currency":"NGN",
   "email":"user@example.com",
   "fullname":"Yemi Desola",
   "phone_number":"09000000000",
   "redirect_url":"https://example_company.com/success"
}

To initiate QR or token payments, set is_qr or is_token to 1 respectively in your request.

{
   "tx_ref":"YOUR_PAYMENT_REFERENCE",
+  "is_qr":1,
   "amount":"100",
   "currency":"NGN",
   "email":"user@example.com",
   "fullname":"Yemi Desola",
   "phone_number":"09000000000",
   "redirect_url":"https://example_company.com/success"
}
{
   "tx_ref":"YOUR_PAYMENT_REFERENCE",
+  "is_token":1,
   "amount":"100",
   "currency":"NGN",
   "email":"user@example.com",
   "fullname":"Yemi Desola",
   "phone_number":"09000000000",
   "redirect_url":"https://example_company.com/success"
}

Authorizing the payment

After initiating the payment, users are expected to authorize the payment for it to be successful. Here are the steps required to authorize eNaira payments.

Authorize via redirect

For default payments, users should be redirected to the URL returned in the initial payment response as meta.authorization.redirect. Once this is done, the user would be directed to a modal that looks like this.

on completion, they are redirected to your success page. A webhook is triggered once the user completes the flow.

{
  "event": "charge.completed",
  "data": {
    "id": 810864722,
    "tx_ref": "eNaira06",
    "flw_ref": "SNGP18101673875124956187",
    "device_fingerprint": "N/A",
    "amount": 10,
    "currency": "NGN",
    "charged_amount": 10.14,
    "app_fee": 0.14,
    "merchant_fee": 0,
    "processor_response": "Successful",
    "auth_model": "ENAIRA",
    "ip": "52.18.161.235",
    "narration": "Flutterwave Developers",
    "status": "successful",
    "payment_type": "enaira",
    "created_at": "2023-01-16T13:18:44.000Z",
    "account_id": 35308,
    "customer": {
      "id": 255554119,
      "name": "Cornelius Ashley",
      "phone_number": "08xxxxxxx88",
      "email": "co****@example.com",
      "created_at": "2021-04-19T16:07:57.000Z"
    }
  },
  "meta_data": {},
  "event.type": "ENAIRA_TRANSACTION"
}

Authorize payments with tokens

For token payments, We return a pending status after the initial charge attempt.

{
    "status": "success",
    "message": "Charge initiated",
    "data": {
       ...
        "processor_response": "pending",
        "auth_model": "ENAIRA",
        ...
        "meta": {
            "authorization": {
                ...
                "validate_instructions": "Please enter the token generated on your eNaira app."
            }
        }
    }
}

To complete the charge, call the validate endpoint and pass the token (OTP generated from the user's speed wallet).

{
    "status": "success",
    "message": "Charge validated",
    "data": {
        "id": 810867524,
        "txRef": "eNaira06",
        "orderRef": "URF_1673875429427_11873",
        "flwRef": "LUQV65391673875429802159",
        "redirectUrl": "http://flutterwave.com/",
        "device_fingerprint": "N/A",
        "settlement_token": null,
        "cycle": "one-time",
        "amount": 10,
        "charged_amount": 10.14,
        "appfee": 0.14,
        "merchantfee": 0,
        "merchantbearsfee": 0,
        "chargeResponseCode": "00",
        "raveRef": null,
        "chargeResponseMessage": "pending",
        "authModelUsed": "ENAIRA",
        "currency": "NGN",
        "IP": "54.154.184.168",
        "narration": "Flutterwave Developers",
        "status": "successful",
        "modalauditid": "c89ec5a2106d1b171a8867461162caf0",
        "vbvrespmessage": "Successful",
        "authurl": "NO-URL",
        "vbvrespcode": "00",
        "acctvalrespmsg": null,
        "acctvalrespcode": null,
        "paymentType": "enaira",
        "paymentPlan": null,
        "paymentPage": null,
        "paymentId": "N/A",
        "fraud_status": "ok",
        "charge_type": "normal",
        "is_live": 0,
        "retry_attempt": null,
        "getpaidBatchId": null,
        "createdAt": "2023-01-16T13:23:49.000Z",
        "updatedAt": "2023-01-16T13:27:32.000Z",
        "deletedAt": null,
        "customerId": 255554119,
        "AccountId": 35308,
        "customer": {
            "id": 255554119,
            "phone_number": "08xxxxxxx88",
            "name": "Cornelius Ashley",
            "email": "c*****@gmail.com",
            "created_at": "2021-04-19T16:07:57.000Z"
        }
    }
}
{
    "status": "error",
    "message": "No transaction found",
    "data": null
}

Verifying the transaction

When the payment is completed by the customer, we'll send you a webhook notification. In your webhook handler, you can then verify the payment and credit your customer with whatever they paid for. See our guide to transaction verification for details.

Loading...