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.
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
- Obtain your integration credentials Getting Integration Credentials.
- Send a request to this API Create Bill
Sample Request
{
"merchantCode": "MX6072",
"payableCode": "9405967",
"amount": "5000",
"redirectUrl": "https://webpay-ui.k8.isw.la/demo-response",
"customerId": "[email protected]",
"currencyCode": "566",
"customerEmail": "[email protected]"
}
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 | false | Email Address of Customer |
transactionReference | String | false | Transaction Reference of the transaction from the merchant's system |
Sample Response
{
"id": 21067,
"merchantCode": "MX6072",
"payableCode": "9405967",
"amount": 5000,
"code": "200",
"redirectUrl": "https://webpay-ui.k8.isw.la/demo-response",
"customerId": "[email protected]",
"reference": "3WuIKFZFvGWra4e",
"customerEmail": "[email protected]",
"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 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 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.
Test Cards
Click here to get test cards to test your transactions.
Updated about 1 year ago