Bills PaymentsDataInternet Order

Internet Order

This endpoint allows users to place an order to purchase mobile internet data from a specific provider.

Endpoint

POST https://backendapi.sayswitchgroup.com/api/v1/internet/data

cURL Request

curl -X POST https://backendapi.sayswitchgroup.com/api/v1/internet/data \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -d '{
    "provider": "MTN",
    "plan_id": 46,
    "number": "07066369927",
    "reference": "2024041521481039"
  }'

Notes

  • Ensure that the reference is unique for each request to avoid duplication.

  • The plan_id must be a valid ID obtained from the Internet Plans endpoint.

Sample Response

{
  "success": true,
  "code": "00000",
  "message": "SUCCESSFUL",
  "data": {
    "orderNo": "17485319933161880294374534",
    "reference": "2024041521481039",
    "status": "delivered",
    "errorMsg": "TRANSACTION SUCCESSFUL",
    "amount": 100,
    "discount": 0,
    "fee": 0,
    "totalDebited": 100
  }
}

Response Fields

FieldTypeDescription
successbooleanIndicates whether the request was successful (true or false).
codestringStatus code, where “00000” typically means success.
messagestringA brief message describing the result of the request.
dataobjectContains details about the transaction/order.
orderNostringUnique order number assigned to the transaction.
referencestringThe transaction reference ID sent in the request payload.
statusstringStatus of the order (e.g., “delivered”, “failed”, “pending”).
errorMsgstringA message describing the outcome of the transaction.
amountnumberPrice of the selected data plan.
discountnumberDiscount granted to the merchant.
feenumberBill-payment fee charged to the merchant.
totalDebitednumberAuthoritative amount removed from the NGN wallet: amount + fee - discount.

A pending purchase returns HTTP 202 with status: "pending". Do not submit it again; query the original reference using Status and reconciliation.