Data packages
Create a data purchase with productId and packageId from the catalog.
How to use
- GET /products → find rows with
type: "data". - Choose a
productId, then apackageId(orpackageCode) from that product’s packages. POST /transactionswith scopestransactions:createanddata:purchase, plus a uniqueidempotencyKey.
MTN may list several data products. Packages belong to one productId — mix-and-match will fail validation.
Create data purchase
Scopes: transactions:create, data:purchase
| Field | Required | Notes |
|---|---|---|
product | Yes | "data" |
productId | Yes | From catalog |
packageId | Typical | From that product |
packageCode | Alt | Code-based clients |
beneficiary | Yes | MSISDN |
amount | If required | soldByAmount only |
POST
https://confident-elephant-309.convex.site/v1/transactionsRequest
curl -sS https://confident-elephant-309.convex.site/v1/transactions \ -H "Authorization: Bearer $KEY" \ -H "Content-Type: application/json" \ -d '{ "idempotencyKey": "data-order-001", "product": "data", "productId": "data-mtn-up2u", "packageId": "<package-id>", "beneficiary": "0241234567" }'201 Created
{ "transaction": { "id": "511260", "reference": "511260", "status": "pending", "kind": "purchase", "environment": "sandbox" }}