# 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

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

# Supported Currencies

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

# Guides

Creating Payments
creating/
Tracking Payments
tracking/
Fee Calculations
fees/
Webhooks
webhooks/