NetConnect API
Data Bundles

Buy Single Data Bundle

Create one wallet-funded data bundle order for a beneficiary number.

Endpoint

POST /api/v1/data-bundles/buy-single

Request body

FieldTypeRequiredNotes
packageIdpackages idYesSelected package
productIdproducts idYesParent product
operatorIdoperators idYesParent operator
beneficiaryMsisdnstringYesRecipient phone number
paymentReferencestringNoOptional offline-first reference
anonymousIdstringNoPresent in shared schema but not typically used in API-key flows

Behavior

  • validates operator, product, and package consistency
  • normalizes the beneficiary number
  • checks for blocking in-flight orders on the same number
  • applies role-aware pricing
  • checks wallet balance for agents and super agents
  • creates and submits an order through the shared internal purchase flow

Response

On success, returns result object:

{
  "success": true,
  "data": {
    "success": true,
    "orderId": "kr7...",
    "shortReference": "128304",
    "message": "Data bundle purchase submitted successfully",
    "amountCharged": 12.5
  }
}

Response fields

FieldTypeNotes
successbooleanAlways true on success
orderIdstringOrder database ID
shortReferencestringShort alphanumeric order reference for user-friendly sharing
messagestringSuccess message
amountChargednumberGHS amount deducted from wallet

Errors

Possible errors:

  • 403 - Invalid API key or insufficient permissions
  • 400 - Invalid request parameters or validation failed
  • 402 - Insufficient wallet balance
  • 409 - Duplicate order detected or conflicting in-flight order

Sample request

curl -X POST "https://api.netconnectgh.online/api/v1/data-bundles/buy-single" \
  -H "X-API-KEY: netconnect_live_your_secret_here" \
  -H "Content-Type: application/json" \
  -d '{
  "operatorId": "k57exampleoperator",
  "productId": "p22exampleproduct",
  "packageId": "q34examplepackage",
  "beneficiaryMsisdn": "233201234567"
}'

On this page