# Virtual PayID

Virtual PayIDs are payment addresses that customers can send money to. ZevPay Checkout supports two types: **Static** and **Dynamic**.

## Static PayID

A static PayID is a permanent, reusable payment address for your business. Think of it like a store's bank account number that never changes.

- **Format:** `yourname.spid` or `yourname.checkout`
- **Expiry:** Never expires (can be deactivated manually)
- **Settlement:** Payments settle directly to your business account
- **Use case:** Storefronts, recurring payment pages, donation links

::: warning Business accounts only
Static PayIDs can only be created by **business accounts**. API keys from personal accounts will receive a `403 Forbidden` error on all static PayID endpoints.
:::

### Creating via API

```bash
curl -X POST https://api.zevpaycheckout.com/v1/checkout/static-payid \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_test_your_secret_key" \
  -d '{
    "pay_id": "mystore",
    "suffix": ".spid",
    "name": "My Online Store"
  }'
```

See the full [Static PayID API reference](/api/static-payid).

## Dynamic PayID

A dynamic PayID is a temporary, auto-expiring payment address. It's generated on demand for specific transactions and expires after a set time.

- **Format:** `abcd.dypid` (auto-generated slug)
- **Expiry:** Configurable (default 24h, max 72h)
- **Settlement:** Payments settle directly to your account
- **Use case:** One-time invoices, payment requests, checkout flows

Both personal and business accounts can create dynamic PayIDs.

### Creating via API

```bash
curl -X POST https://api.zevpaycheckout.com/v1/checkout/dynamic-payid \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_test_your_secret_key" \
  -d '{
    "amount": 5000,
    "amount_validation": "A0",
    "name": "Invoice #1234",
    "expires_in_minutes": 1440
  }'
```

See the full [Dynamic PayID API reference](/api/dynamic-payid).

## Static vs Dynamic

| | Static PayID | Dynamic PayID |
|---|---|---|
| **Persistence** | Permanent | Temporary (1-72 hours) |
| **Format** | `yourname.spid` | `abcd.dypid` (auto-generated) |
| **Settlement** | Directly to business account | Directly to creator account |
| **Multiple payments** | Always | Configurable |
| **Amount validation** | Not supported | 6 rules (A0-A5) |
| **Account type** | Business only | Personal or business |
| **Use case** | Storefronts, recurring | Invoices, one-time payments |

## Amount Validation Rules

Dynamic PayIDs support configurable amount validation to control what payment amounts are accepted:

| Rule | Name | Description |
|------|------|-------------|
| `A0` | Exact match | Payment must equal the configured amount |
| `A1` | Less than | Payment must be less than the configured amount |
| `A2` | Greater than | Payment must be greater than the configured amount |
| `A3` | At most | Payment must be equal to or less than the configured amount |
| `A4` | At least | Payment must be equal to or greater than the configured amount |
| `A5` | Any amount | No amount validation (accepts anything) |

**Default:** `A4` (at least the configured amount).

If no `amount` is set on the dynamic PayID, all payments are accepted regardless of the validation rule.

## Settlement

Payments received through a PayID are automatically settled to a destination based on how the PayID was created:

- **API-created:** Settled to the API key's configured settlement ledger. To change where payments go, update your API key's settlement configuration in the [dashboard](https://business.zevpay.ng). If you need different products to settle to different destinations, create separate API keys with different settlement configurations.
- **Dashboard-created:** You can choose a specific settlement destination (your main account or a wallet) when creating the PayID.

::: tip Use wallets for separation
Create dedicated wallets for different revenue streams (e.g., "Online Store", "Invoices") and configure your API keys or dashboard products to settle to the appropriate wallet.
:::

## Payment Flow

1. **Create** a static or dynamic PayID via the [API](/api/static-payid) or [dashboard](https://business.zevpay.ng)
2. **Share** the PayID with your customer (e.g., display on your website, send in an invoice)
3. **Customer pays** by sending money to the PayID through the ZevPay app or any compatible payment method
4. **Payment is settled** to your configured settlement entity automatically
5. **Webhook notification** is sent to your configured webhook URL (if set up)

## Managing PayIDs

### Deactivation

You can deactivate a PayID to stop accepting payments:

- **Static PayIDs:** Can be deactivated and reactivated at any time
- **Dynamic PayIDs:** Can be deactivated before their natural expiry. Cannot be reactivated — create a new one instead

### Dashboard

All PayIDs (static and dynamic) can be managed from the [Virtual PayID](https://business.zevpay.ng/virtual-payid) section of your dashboard.
