> Source: https://developers.terrawallet.us/docs/reference/payment-links . Terra Wallet developer docs (early access).

<!-- GENERATED by apps/mcp/scripts/build-docs-index.mjs. Do not edit by hand. -->

# Payment links

> **Preview.** Generated from `docs/developers/openapi-v1.json` (the exported OpenAPI document, authoritative) and, for operations it does not contain yet, from the v1 build contract (`docs/platform/V1_CONTRACT.md`). Each contract-only operation is marked.

Reusable, no-code links with a fixed or customer-chosen amount.

**Authentication:** Secret key or dashboard session.

**Guide:** [Payment links](https://developers.terrawallet.us/docs/pay/payment-links.md)

| Method | Path | Summary |
|---|---|---|
| POST | `/v1/payment_links` | Create a payment link. |

## POST /v1/payment_links

Create a payment link.

- Operation id: `createPaymentLink`
- Authentication: Secret key or dashboard session
- `Idempotency-Key`: required
- Source: the v1 contract. This operation is not in the OpenAPI document yet.

### Request body

| Name | Type | Required | Notes |
|---|---|---|---|
| `name` | string | yes |  |
| `amount` | string (decimal) | no | Required unless customer_chooses is true. |
| `customer_chooses` | boolean | no | true lets the customer choose the amount. Send either amount or customer_chooses: true. |
| `currency` | string | yes | A fiat ISO code. |
| `accepted_assets` | array of asset | yes |  |
| `max_uses` | integer | no |  |
| `expires_at` | string (timestamp) | no |  |

### Response

```json
{
  "id": "plink_...",
  "url": "https://pay.terrawallet.us/l/plink_..."
}
```
