# Payments

Learn how to create, track, and manage payments with HivePay.

---

## Overview

HivePay payment sessions provide a secure way to accept HIVE and HBD payments. The payment flow follows a familiar pattern:

1. **Create** a payment session with amount and currency
2. **Redirect** the customer to the checkout URL
3. **Customer pays** using their Hive wallet
4. **Receive** webhook notification of payment status
5. **Customer returns** to your success/cancel URL

---

## Payment Lifecycle

```mermaid
stateDiagram-v2
    [*] --> pending: Payment Created
    pending --> processing: Payment Initiated
    processing --> completed: Payment Confirmed
    processing --> failed: Payment Failed
    pending --> user_cancelled: User Cancelled
    pending --> system_cancelled: Timeout/Expired
    completed --> [*]
    failed --> [*]
    user_cancelled --> [*]
    system_cancelled --> [*]
```

---

## Payment Statuses

| Status | Description |
|--------|-------------|
| `pending` | Payment session created, waiting for customer action |
| `processing` | Payment initiated, waiting for blockchain confirmation |
| `completed` | Payment successfully received |
| `failed` | Payment failed (insufficient funds, network error, etc.) |
| `user_cancelled` | Customer cancelled the payment |
| `system_cancelled` | Payment expired or cancelled by system |

---

## AML Compliance

HivePay enforces anti-money laundering (AML) limits on all payment session creation. Merchants whose single transaction or cumulative volume within a short timeframe exceeds the configured thresholds are automatically flagged and must complete KYC verification before creating new sessions. See [Creating Payments](/payments/creating/) for details.

---

## Supported Currencies

| Currency | Description | Precision |
|----------|-------------|-----------|
| `HIVE` | Hive native token | 3 decimals |
| `HBD` | Hive Backed Dollars | 3 decimals |

---

## Guides

[!ref icon="plus" text="Creating Payments"](/payments/creating/)
[!ref icon="search" text="Tracking Payments"](/payments/tracking/)
[!ref icon="number" text="Fee Calculations"](/payments/fees/)
[!ref icon="webhook" text="Webhooks"](/payments/webhooks/)
