NetConnect API
Data Bundles

Buy Single Data Bundle

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

live·playground

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,
    "status": "processing",
    "walletBalanceBefore": 250.00,
    "walletBalanceAfter": 237.50
  }
}

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
statusstringInitial order status — "processing" for data bundle purchases. Use the order status endpoint to track progression to completed or failed.
walletBalanceBeforenumberWallet GHS balance immediately before this order was charged
walletBalanceAfternumberWallet GHS balance after this order was charged (before - amountCharged)

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

POST/api/v1/data-bundles/buy-singletry·it·live
request body · json
✓ valid
⚠ no api key set — request will use placeholder
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