# Payment links and requests

## Payment links

A payment link is a reusable checkout URL (with a QR code) that you can share anywhere.

```bash
curl -X POST https://api.intasend.com/api/v1/paymentlinks/ \
  -H "Authorization: Bearer $INTASEND_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Donations", "currency": "KES", "amount": 0, "is_active": true, "redirect_url": "https://example.com/thanks"}'
```

| Field | Required | Description |
|---|---|---|
| `title` | Yes | Unique per account |
| `currency` | No | `KES`, `USD`, `EUR`, `GBP`, `UGX`, `TZS`, `RWF`, `CDF` |
| `amount` | No | Fixed amount. `0` lets the customer enter any amount |
| `usage_limit` | No | Maximum number of payments. `0` means unlimited |
| `is_active` | No | Enable or disable the link |
| `redirect_url` | No | Where customers go after paying |
| `mobile_tarrif`, `card_tarrif` | No | Who pays fees |

The response includes `url` and `qrcode_file`. Use `GET /paymentlinks/` to list links and `PUT /paymentlinks/{id}/` to update one.

## Payment requests

A payment request emails a customer a link to pay a specific amount.

```bash
curl -X POST https://api.intasend.com/api/v1/payment-requests/ \
  -H "Authorization: Bearer $INTASEND_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 2500, "currency": "KES", "first_name": "Jane", "last_name": "Doe", "email": "jane@example.com", "reason": "Invoice #42", "autosend_remider": 3}'
```

| Field | Required | Description |
|---|---|---|
| `amount`, `currency` | Yes | |
| `first_name`, `last_name`, `email` | Yes | Recipient |
| `reason` | Yes | Shown to the customer |
| `autosend_remider` | No | Reminder interval in days: `0`, `1`, `2`, `3` or `7` |
| `card_tarrif` | No | Who pays card fees |

Delivery is tracked in `sent_status`: `PENDING`, `SENT`, `DELIVERED`, `OPENED`, `CLICKED` or `FAILED`.
Archive a request with `POST /payment-requests/{id}/archive/`.
