# Utility Payment

## Scope

This applies to scenarios where end users are making:

1. Utility bill payments
2. Airtime purchases

## Steps - Airtime Purchase

{% stepper %}
{% step %}

### Initiate Airtime Purchase Request

Call endpoint `/utilityPayment/v2/airtimePayment` to initiate an airtime purchase request

Status: `1-Waiting`
{% endstep %}

{% step %}

### Confirm OTP

Call endpoint `/common/sendOtp` to request for OTP, filling the value of `paymentId` to `businessId` parameter. Call endpoint `/common/confirmOperation` to confirm the OTP code received.

Status: `2-PROCESSING`

{% hint style="info" %}
The endpoint `/common/sendOtp` can also be used to resend OTP.
{% endhint %}
{% endstep %}

{% step %}

### Payment Processing

Status: `2-PROCESSING`&#x20;
{% endstep %}

{% step %}

### Get Payment Result

* Get it from `0007 - Utility Payment Result Notification`
* Query transaction status by calling the endpoint `/utilityPayment/paymentQuery`
  {% endstep %}
  {% endstepper %}

## Steps - Bulk Airtime Purchase

{% stepper %}
{% step %}

### Initiate Bulk Airtime Purchase Request

Call endpoint `/utilityPayment/v2/airtimeBulkPayment` to initiate an airtime purchase request

Status: `1-Waiting`
{% endstep %}

{% step %}

### Confirm OTP

Call endpoint `/common/sendOtp` to request for OTP, filling the value of `bulkPaymentOrderId` to `businessId` parameter. Call endpoint `/common/confirmOperation` to confirm the OTP code received.

Status: `2-PROCESSING`

{% hint style="info" %}
The endpoint `/common/sendOtp` can also be used to resend OTP.
{% endhint %}
{% endstep %}

{% step %}

### Payment Processing

Status: `2-PROCESSING`&#x20;
{% endstep %}

{% step %}

### Get Payment Result

* Get it from `0014 - Bulk Airtime Purchase Notification`
* Query transaction status by calling the endpoint `/utilityPayment/bulkPaymentQuery`
  {% endstep %}
  {% endstepper %}

## Steps - Utility Bill

{% stepper %}
{% step %}

### Query Utility Bill Due Information

Call endpoint `/utilityPayment/billQuery` to initiate an airtime purchase request
{% endstep %}

{% step %}

### Initiate Utility Bill Payment Request

Call endpoint `/utilityPayment/v2/billPayment` to initiate an airtime purchase request

Status: `1-Waiting`
{% endstep %}

{% step %}

### Confirm OTP

Call endpoint `/common/sendOtp` to request for OTP, filling the value of `paymentId` to `businessId` parameter. Call endpoint `/common/confirmOperation` to confirm the OTP code received.

Status: `2-PROCESSING`

{% hint style="info" %}
The endpoint `/common/sendOtp` can also be used to resend OTP.
{% endhint %}
{% endstep %}

{% step %}

### Payment Processing

Status: `2-PROCESSING`&#x20;
{% endstep %}

{% step %}

### Get Payment Result

* Get it from `0007 - Utility Payment Result Notification`
* Query transaction status by calling the endpoint `/utilityPayment/paymentQuery`
  {% endstep %}
  {% endstepper %}

## Status

<figure><img src="https://1067423352-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZSBJA1E616k4RwaGxuZ2%2Fuploads%2F9eIVYZwTbhNpW7jZgDhL%2FUTILITY.jpg?alt=media&#x26;token=e2528d54-714e-44bd-8ab2-b1ae885bf16d" alt=""><figcaption></figcaption></figure>
