Bill Payment
Bill payment endpoints for Switch
STAGING_URL: https://switch-api-staging.herokuapp.com
LIVE_URL: https://switchapi.azurewebsites.netGet vendor's plan
GET https://switch-api-staging.herokuapp.com/user/bills/vendors/:id/plans
This endpoint retrieves a particular vendor's plan
Path Parameters
id
string
the id of the vendor
Headers
SWI-CID
string
Client ID
{
"message": "Vendor plans retrieved successfully",
"data": [
{
"mandate_id": "SWV220200401122742464584041257",
"id": "01",
"name": "Premium",
"payment_code": "10401",
"item_fee": "80",
"vat": 4,
"category_id": "2",
"input_fields": [
{
"key": "consumer_id_field",
"value": "",
"text": "Decoder Number"
}
],
"additions": {
"amount": "14600.00",
"total": "14684.00"
}
},
{
"mandate_id": "SWV220200401122742464584041257",
"id": "28",
"name": "Access",
"payment_code": "10428",
"item_fee": "80",
"vat": 4,
"category_id": "2",
"input_fields": [
{
"key": "consumer_id_field",
"value": "",
"text": "Decoder Number"
}
],
"additions": {
"amount": "1800.00",
"total": "1884.00"
}
},
{
"mandate_id": "SWV220200401122742464584041257",
"id": "03",
"name": "Compact",
"payment_code": "10403",
"item_fee": "80",
"vat": 4,
"category_id": "2",
"input_fields": [
{
"key": "consumer_id_field",
"value": "",
"text": "Decoder Number"
}
],
"additions": {
"amount": "8500.00",
"total": "8584.00"
}
},
{
"mandate_id": "SWV220200401122742464584041257",
"id": "06",
"name": "Family",
"payment_code": "10406",
"item_fee": "80",
"vat": 4,
"category_id": "2",
"input_fields": [
{
"key": "consumer_id_field",
"value": "",
"text": "Decoder Number"
}
],
"additions": {
"amount": "3960.00",
"total": "4044.00"
}
}
]
}Make Payment
POST https://switch-api-staging.herokuapp.com/bills/pay
This endpoint makes payment to a particular vendor plan
Headers
SWI-CS
string
Payload checksum
SWI-CID
string
Client
Authorization
string
Format is Bearer token
Request Body
string
Required if user's 2fa is pin.
otp
string
Required if user's 2fa is phone or google_authenticator.
custom_cron
string
The number of days if the event_pattern is custom
event_pattern
string
The repeating pattern. Values can be monthly, weekly or custom
repeat
boolean
Shows if a scheduled bill should be repeatable
start_date
string
This is a date time parameter. It is the start date to schedule a bill payment
save_information
boolean
Boolean flag that determines if the bill information is to be saved
category_id
string
category id of the plan
mandate_id
string
mandate_id of the plan
item_fee
string
item fee of vendor, used to calculate the total amount
plan_name
string
name of plan
plan_id
string
id of the plan
vendor_id
string
id of the vendor
consumer_id_field
string
the customer's device number
amount
string
cost of plan in Naira
payment_code
string
code for making payment
total
string
total cost in Naira
vat
string
vat on the plan
Bills Payment Categories
GET https://switch-api-staging.herokuapp.com/user/bills/categories
Retrieves all available categories
Headers
SWI-CID
string
Client ID
Authorization
string
Format is Bearer token_string
Get vendors in a category
GET https://switch-api-staging.herokuapp.com/user/bills/categories/:id/vendors
This endpoint retrieves all the vendors in a category.
Path Parameters
id
number
The id of the category to filter its vendors
Query Parameters
short_name
string
The short name of the vendor.
Headers
SWI-CID
string
Client ID
Bill Payment Vendors
GET https://switch-api-staging.herokuapp.com/user/bills/vendors
This endpoint retrieves all bill payment vendors
Query Parameters
short_name
string
The short name of the vendor.
Headers
SWI-CID
string
Client ID
Authorization
string
Format is Bearer token
Saved Bill Payment Information
GET https://switch-api-staging.herokuapp.com/user/bills/saved_bills
This endpoint retrieves all the saved bill payment information.
Query Parameters
per_page
number
number of bill payment info per page
page
number
page number
Headers
SWI-CID
string
Client ID
Authorization
string
Format is Bearer token
Delete a saved bill
DELETE https://switch-api-staging.herokuapp.com/user/saved_bills/:id
This endpoint deletes a saved bill.
Path Parameters
id
number
the identifier of the saved bill
Headers
SWI-CID
string
Client ID
Last updated
Was this helpful?