# Payment Link

### 📌 How a Payment Link Works

#### 1. Create a Payment Link

Use the **`POST /v1/paymentlink/create`** endpoint to generate a new payment link.

* Provide transaction details such as:
  * `amount` (e.g. 50.00)
  * `currency` (e.g. NGN, GHS, USD)
  * `merchant_reference` (your unique reference for reconciliation)

The API response will include a `link_url`.

***

#### 2. Share with Your Customer

* Send the `link_url` via email, SMS, or WhatsApp.
* Or embed it in your website/app as a button.

***

#### 3. Customer Pays in Crypto

* Customer opens the link, chooses their preferred asset (e.g. USDC, USDT, SOL).
* A one-time wallet address/QR code is displayed.
* Our system monitors the blockchain and confirms payment automatically.

***

#### 4. Settlement in Fiat

* Once funds are received and confirmed, Kazza converts to fiat instantly.
* Settlement is sent to your linked  account (e.g. NGN, GHS etc.).
* You’ll also receive a **webhook notification** with the final status.

### 🧑‍💻 Developer Notes

* **Verification:** Always rely on webhooks for final settlement status. You can also poll using **`GET /v1/payment/{id}`**.
* **Payment Scope:** Payment links only support **crypto-to-fiat** (no crypto-to-crypto).
* **Error Handling:** Implement flows for:
  * `cancelled` – customer closed link without paying.
  * `expired` – session timed out.
  * `underpaid` – customer sent less than required.
* **Idempotency:** Use your `merchant_reference` to avoid duplicate processing.
