---
title: Sell by plan code
description: Sell any phone plan by its code, for callers that already send a plan id.
group: api
order: 9
method: POST
path: /api/v1/vend
---

Sells a plan to a phone number. The plan decides the service, so one call covers airtime and data. Use the [electricity](/docs/api/pay-electricity) and [cable](/docs/api/pay-cable) calls for bills.

## Body

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `product_code` | string | yes | A plan's `product_code`, its plan number sent as a string, or a `vendor:` code. `serviceid` and `service_id` are aliases |
| `phone_number` | string | yes | Nigerian number. `receiver_phone_number`, `destination` and `phone` are aliases |
| `amount` | number | airtime | Naira, at most two decimal places. A fixed plan takes no amount, or exactly its face value |
| `network` | string | no | A network code, checked against the plan. `network_id` is an alias |
| `client_reference` | string | no | Your own reference, 1 to 128 characters, unique per mode |
| `metadata` | object | no | String values only, at most 20 keys. Returned on reads and in webhooks |

Send an `Idempotency-Key` header with every request. The call waits for the final state; add `?wait=0` to get `202` at once.

## Request

```bash
curl https://api.simconnectng.com/api/v1/vend \
  -H "Authorization: Bearer $SIMCONNECT_KEY" \
  -H "Idempotency-Key: order_1044" \
  -H "Content-Type: application/json" \
  -d '{ "product_code": "MTN-SHARE-1GB-30D", "phone_number": "08012345678", "client_reference": "order_1044" }'
```

## Response

The same sale as [Buy data](/docs/api/buy-data).

## Error

```json
{ "success": false, "data": null, "message": "Insufficient wallet balance", "code": "WALLET_INSUFFICIENT_FUNDS" }
```
