Data packages

Create a data purchase with productId and packageId from the catalog.

How to use

  1. GET /products → find rows with type: "data".
  2. Choose a productId, then a packageId (or packageCode) from that product’s packages.
  3. POST /transactions with scopes transactions:create and data:purchase, plus a unique idempotencyKey.

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

FieldRequiredNotes
productYes"data"
productIdYesFrom catalog
packageIdTypicalFrom that product
packageCodeAltCode-based clients
beneficiaryYesMSISDN
amountIf requiredsoldByAmount only
POSThttps://confident-elephant-309.convex.site/v1/transactions
Request
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"  }}