> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datashop.africa/llms.txt
> Use this file to discover all available pages before exploring further.

# Data

> Buy a data product for a phone number.

Submit a data purchase with the recipient number, selected product, and reference from your system. Keep the reference; it is used for status checks, receipts, and reconciliation.

## Request body

<ParamField body="customer_id" type="string" required>
  Recipient phone number.
</ParamField>

<ParamField body="product_name" type="string" required>
  Data product selected from List products.
</ParamField>

<ParamField body="reference" type="string" required>
  Unique transaction reference from your system. Must be 15 to 40 characters.
</ParamField>

## Request

```json theme={null}
{
  "customer_id": "08030000000",
  "product_name": "mtn-share-weekly-1gb",
  "reference": "merchant-ref-20260812001"
}
```

## Successful response

```json theme={null}
{
  "status": true,
  "message": "Purchase processed successfully.",
  "data": {
    "reference": "merchant-ref-20260812001",
    "customer_id": "08030000000",
    "service": "data",
    "provider": "MTN",
    "product_name": "mtn-share-weekly-1gb",
    "quantity": "1GB",
    "paid_amount": 400,
    "transaction_status": "successful",
    "remark": "Purchase successful"
  }
}
```

## Processing response

```json theme={null}
{
  "status": true,
  "message": "Purchase is processing.",
  "data": {
    "reference": "merchant-ref-20260812001",
    "customer_id": "08030000000",
    "service": "data",
    "provider": "MTN",
    "product_name": "mtn-share-weekly-1gb",
    "quantity": "1GB",
    "paid_amount": 400,
    "transaction_status": "processing"
  }
}
```

## Failed response

```json theme={null}
{
  "status": false,
  "message": "Error message"
}
```
