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

# schemas

# Billing & Payment Schemas

API endpoints for processing payments and establishing billing agreements.

## Endpoints

| Method | Endpoint             | Description                                |
| ------ | -------------------- | ------------------------------------------ |
| POST   | `/v1/billing/intent` | Send billing intent to establish agreement |
| POST   | `/v1/customer/bill`  | Bill customer using payment id             |

## POST /v1/billing/intent

Send billing intent to customers via their banks to establish billing agreements.

### Request Body

```json theme={null}
{
  "lookupIDs": ["string"],
  "currency": "string",
  "description": "string"
}
```

### Request Schema

| Field         | Type      | Required | Description                      |
| ------------- | --------- | -------- | -------------------------------- |
| `lookupIDs`   | string\[] | Yes      | Customer lookup IDs              |
| `currency`    | string    | Yes      | Currency code (e.g., "NGN")      |
| `description` | string    | Yes      | Description of billing agreement |

### Response Schema

```json theme={null}
[
  {
    "statusCode": 200,
    "success": true,
    "message": "Billing intent sent successfully",
    "lookupID": "string",
    "entityId": "string"
  }
]
```

### Response Fields

| Field      | Type   | Description                |
| ---------- | ------ | -------------------------- |
| `lookupID` | string | Customer lookup ID used    |
| `entityId` | string | Merchant entity identifier |

## POST /v1/customer/bill

Bill customers using established payment ids.

### Request Body

```json theme={null}
{
  "paymentIDs": ["string"],
  "amount": 1500,
  "currency": "string",
  "description": "string"
}
```

### Request Schema

| Field         | Type      | Required | Description          |
| ------------- | --------- | -------- | -------------------- |
| `paymentIDs`  | string\[] | Yes      | Customer payment ids |
| `amount`      | number    | Yes      | Amount to bill       |
| `currency`    | string    | Yes      | Currency code        |
| `description` | string    | Yes      | Payment description  |

### Response Schema

```json theme={null}
[
  {
    "statusCode": 201,
    "success": true,
    "message": "Customer billed successfully",
    "reference": "string",
    "phrase": "string",
    "entityId": "string"
  }
]
```

### Response Fields

| Field       | Type   | Description                |
| ----------- | ------ | -------------------------- |
| `reference` | string | Transaction reference      |
| `phrase`    | string | Payment ID used            |
| `entityId`  | string | Merchant entity identifier |

## Error Responses

### 400 Bad Request

```json theme={null}
{
  "statusCode": 400,
  "success": false,
  "message": "Invalid request parameters"
}
```

### 403 Forbidden

```json theme={null}
{
  "statusCode": 403,
  "success": false,
  "message": "Customer has not approved billing"
}
```
