> ## Documentation Index
> Fetch the complete documentation index at: https://developer.nomba.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pay for Electricity

> This describes the process of paying for electricity

<CardGroup cols={2}>
  <Card title="Pay for Electricity via the Parent Account" icon="link-simple" href="/nomba-api-reference/bills/pay-for-electricity-via-parent-account-v2" />
</CardGroup>

# `POST /v2/bill/electricity`

#### Request body

<ParamField body="amount" type="integer" required>
  Amount
</ParamField>

<ParamField body="disco" type="string" required>
  Electricity provider's id (e.g. phed, jed, ibedc etc) - This id can be gotten
  from doing a fetch of available providers
</ParamField>

<ParamField body="merchantTxRef" type="string" required>
  Merchant Transaction Reference (a unique reference to identify this
  transaction on your system)
</ParamField>

<ParamField body="payerName" type="string" required>
  The name of the person to be attached to this transaction
</ParamField>

<ParamField body="customerId" type="string" required>
  An unique id to identify the customer to which this payment belongs
</ParamField>

<ParamField body="meterType" type="string" required>
  The meter type to of the meter for which this payment is for. Usually PREPAID
  or POSTPAID
</ParamField>

#### Response body

<ResponseField name="code" type="string" required>
  Response code
</ResponseField>

<ResponseField name="description" type="string" required>
  Response description
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="object" defaultOpen="true">
    <ResponseField name="amount" type="string" required>
      Amount
    </ResponseField>

    <ResponseField name="meta" type="object">
      <Expandable title="object" defaultOpen="false">
        <ResponseField name="merchantTxRef" type="string">
          Merchant Transaction Reference
        </ResponseField>

        <ResponseField name="phcnVendUnits" type="string">
          Electricity Units
        </ResponseField>

        <ResponseField name="meterName" type="string">
          Meter Name
        </ResponseField>

        <ResponseField name="phcnCustomerAddress" type="string">
          Customer's Address
        </ResponseField>

        <ResponseField name="phcnVendToken" type="string">
          Meter Token
        </ResponseField>

        <ResponseField name="meterType" type="string">
          Prepaid or Postpaid
        </ResponseField>

        <ResponseField name="rrn" type="string">
          Retrieval Reference Number (RRN)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="timeCreated" type="string" required>
      Date and Time of the transaction
    </ResponseField>

    <ResponseField name="type" type="string" required>
      The type of this transaction. This is most probably phcn in this case
    </ResponseField>

    <ResponseField name="status" type="string" required>
      The status of this transaction
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Request theme={null}
  curl --location 'https://api.nomba.com/v2/bill/electricity' \
  --header 'accountId: <accountId>' \
  --header 'Authorization: Bearer <token>' \
  --data '{
      "disco": "phcn",
      "merchantTxRef": "c006475e-a76f-4533-b2ff-59a67d5e6241",
      "payerName": "John Doe",
      "amount": 2000,
      "customerId": "1234567890",
      "meterType": "PREPAID"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success response (200) theme={null}
  {
      "code": "200",
      "description": "SUCCESS",
      "message": "Transaction completed Successfully",
      "status": true,
      "data": {
          "id": "API-PHCN-28958-37da63af-8daa-4cb7-9070-e32920e38c12",
          "status": "SUCCESS",
          "type": "phcn",
          "amount": 1000,
          "source": "api",
          "sourceUserId": null,
          "customerBillerId": "12345678902",
          "productId": "benin",
          "meta": {
              "payment_type": "prepaid",
              "api_rrn": null,
              "biller_account_name": "John Doe",
              "rrn": null,
              "api_account_id": "0167288-d989-460a-bbde-9842f2b4320f",
              "api_client_id": "05cc8ef7-3aa6-408a-9cde-1a91fd20f592",
              "user_id": "0167288-d989-460a-bbde-9842f2b4320f",
              "merchantTxRef": "310120260017AM",
              "allowDuplicate": true,
              "sender_name": "Josh Doe",
              "idempotentKey": "0167288-d989-460a-bbde-9842f2b4320f_310120260017AM",
              "pos_withdrawal_id": "0167288-d989-460a-bbde-9842f2b4320f_310120260017AM",
              "userName": "John Doe",
              "isCorporate": "true",
              "currency": "NGN",
              "hooksEligible": "true",
              "isSubscribedToSavingsService": false,
              "isSubscribedToLoanService": false,
              "txnAlertEligible": false,
              "banking_entity_id": 189585760,
              "banking_entity_user_id": 188595905,
              "banking_entity_type": "CORPORATE",
              "transactionCategory": "Bills & Utility",
              "meterNumber": "12345678901",
              "amount_charged": "1000.0",
              "paymentVendor": "wallet",
              "wallet_balance": "3055.85",
              "wallet_currency": "NGN",
              "paymentVendorReference": "6ab8d20521deef068755e6a2",
              "gatewayMessage": "Token: 43557934939308375700",
              "billingServiceResponse": "Token: 43557934939308375700",
              "phcnToken": "43557934939308375700",
              "phcnCustomerName": "Mr Johnson",
              "phcnCustomerAddress": "29 Okabiri Street",
              "phcnCustomerPhone": "09012345678",
              "phcnVendToken": "14557934939308375701",
              "phcnVendUnits": "16.4",
              "meterDebt": "unknown",
              "units": "16.4",
              "income": "21.0",
              "paymentFee": 0,
              "tx_revenue": "21.0"
          },
          "userId": null,
          "timeCreated": "2026-09-27T08:21:25.582+00:00"
      }
  }
  ```

  ```json Processing response (201) theme={null}
  {
      "code": "201",
      "description": "PROCESSING",
      "message": "Processing",
      "status": true,
      "data": {
          "id": "API-PHCN-28958-37da63af-8daa-4cb7-9070-e32920e38c12",
          "status": "PENDING_BILLING",
          "type": "phcn",
          "amount": 1000,
          "source": "api",
          "sourceUserId": null,
          "customerBillerId": "12345678902",
          "productId": "benin",
          "meta": {
              "payment_type": "prepaid",
              "api_rrn": null,
              "biller_account_name": "John Doe",
              "rrn": null,
              "api_account_id": "0167288-d989-460a-bbde-9842f2b4320f",
              "api_client_id": "05cc8ef7-3aa6-408a-9cde-1a91fd20f592",
              "user_id": "0167288-d989-460a-bbde-9842f2b4320f",
              "merchantTxRef": "310120260017AM",
              "allowDuplicate": true,
              "sender_name": "Josh Doe",
              "idempotentKey": "0167288-d989-460a-bbde-9842f2b4320f_310120260017AM",
              "pos_withdrawal_id": "0167288-d989-460a-bbde-9842f2b4320f_310120260017AM",
              "userName": "John Doe",
              "isCorporate": "true",
              "currency": "NGN",
              "hooksEligible": "true",
              "isSubscribedToSavingsService": false,
              "isSubscribedToLoanService": false,
              "txnAlertEligible": false,
              "banking_entity_id": 189585760,
              "banking_entity_user_id": 188595905,
              "banking_entity_type": "CORPORATE",
              "transactionCategory": "Bills & Utility",
              "meterNumber": "12345678901",
              "amount_charged": "1000.0",
              "paymentVendor": "wallet",
              "wallet_balance": "3055.85",
              "wallet_currency": "NGN",
              "paymentVendorReference": "6ab8d20521deef068755e6a2",
              "gatewayMessage": "Token: 43557934939308375700",
              "billingServiceResponse": "Token: 43557934939308375700",
              "phcnToken": "43557934939308375700",
              "phcnCustomerName": "Mr Johnson",
              "phcnCustomerAddress": "29 Okabiri Street",
              "phcnCustomerPhone": "09012345678",
              "phcnVendToken": "14557934939308375701",
              "phcnVendUnits": "16.4",
              "meterDebt": "unknown",
              "units": "16.4",
              "income": "21.0",
              "paymentFee": 0,
              "tx_revenue": "21.0"
          },
          "userId": null,
          "timeCreated": "2026-09-27T08:21:25.582+00:00"
      }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.