---
updatedAt: 2025-11-10T23:43:58.000Z
agentTools:
  projectIndex: https://docs.interswitchgroup.com/llms.txt
---

# Pay Bill

This feature enables business owners to create a link that is tied to a transaction that can then be shared for a customer to make a one-time payment. It is best used for use cases around reservations, invoices, paying bills, and any other use case that requires a link to be generated that is tied to a customer and certain transaction details.

<Image align="center" src="https://files.readme.io/511fded-Screenshot_2023-10-25_at_18.19.25.png" />

## Benefits of using one-time payment links:

* **Convenient for customers:** Customers can pay for goods and services with a few clicks without creating an account or entering their payment information multiple times.
* **Secure:** One-time payment links are generated using secure encryption so customers can be confident that their payment information is safe.

## Getting started

1. Obtain your integration credentials [Getting Integration Credentials](https://docs.interswitchgroup.com/docs/getting-integration-credentials).
2. Send a request to this API [Create Bill](https://docs.interswitchgroup.com/reference/create-bill)

**Sample Request**

```curl
{
  "merchantCode": "MX6072",
  "payableCode": "9405967",
  "amount": "5000",
  "redirectUrl": "https://webpay-ui.k8.isw.la/demo-response",
  "customerId": "johndoe@gmail.com",
  "currencyCode": "566",
  "customerEmail": "johndoe@gmail.com"
}
```

| Field Name           | Data Type | Required | Description                                                                     |
| :------------------- | :-------- | :------- | :------------------------------------------------------------------------------ |
| merchantCode         | String    | true     | The Merchant's code                                                             |
| payableCode          | String    | true     | The merchant's payment item/payable code                                        |
| amount               | Int       | true     | Cost of the item you want your customer to pay in minor                         |
| redirectUrl          | String    | true     | URL you want our gateway to redirect to when customer has completed transaction |
| customerId           | String    | true     | The unique ID of the customer on merchant's system                              |
| currencyCode         | Int       | true     | ISO currency code e.g Naira is 566                                              |
| customerEmail        | String    | true     | Email Address of Customer                                                       |
| transactionReference | String    | false    | Transaction Reference of the transaction from the merchant's system             |

**Sample Response**

```curl
{
  "id": 21067,
  "merchantCode": "MX6072",
  "payableCode": "9405967",
  "amount": 5000,
  "code": "200",
  "redirectUrl": "https://webpay-ui.k8.isw.la/demo-response",
  "customerId": "johndoe@gmail.com",
  "reference": "3WuIKFZFvGWra4e",
  "customerEmail": "johndoe@gmail.com",
  "currencyCode": "566",
  "paymentUrl": "https://project-x-merchant.k8.isw.la/paymentgateway/paybill/3WuIKFZFvGWra4e"
}
```

| Field Name     | Data Type | Description                                                                     |
| :------------- | :-------- | :------------------------------------------------------------------------------ |
| id             | Long      | ID of the created bill                                                          |
| payableCode    | String    | The merchant's payment item/payable code                                        |
| amount         | Int       | Cost of the item you want your customer to pay in minor                         |
| **paymentUrl** | String    | URL of the created bill to be shared to customer to click and pay               |
| reference      | String    | Unique reference on our system tied to the bill                                 |
| redirectUrl    | String    | URL you want our gateway to redirect to when customer has completed transaction |
| customerId     | String    | The unique ID of the customer on merchant's system                              |
| currencyCode   | Int       | ISO currency code e.g Naira is 566                                              |
| customerEmail  | String    | Email Address of Customer                                                       |

> 🚧 How to know when a customer has paid
>
> We redirect the customer back to the **redirectUrl** provided in the payment request. But you can also  integrate to [Webhooks](https://docs.interswitchgroup.com/docs/webhooks) so we notify you instantly any payment is made into the account

## Confirming Transaction Status

When using the redirect to confirm a transaction, you **MUST** make a server-side request to get the transaction status and amount that was paid before giving value. You make the request using your merchantCode, the relevant transaction reference and amount. **Please confirm the amount returned by our server matches your original transaction amount before giving value**.

**Sample Request**

```curl
curl https://qa.interswitchng.com/collections/api/v1/gettransaction.json?merchantcode={merchantcode}&transactionreference={reference}&amount={amount} 
# LIVE BASE URL: https://webpay.interswitchng.com
-H "Content-Type: application/json" \
-X GET
```

> 👍 Response Codes
>
> You can view the list of [response codes and their meaning here](https://docs.interswitchgroup.com/docs/payment-response-codes).

> 📘 Test Cards
>
> Click [here](https://docs.interswitchgroup.com/docs/test-cards) to get test cards to test your transactions.