> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bouclay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment links

> Sell a plan with a link, and take payments at the front desk

A payment link is a checkout page for one price. Share it anywhere: a WhatsApp message, an Instagram bio, a QR code at the front desk. The buyer enters their email and pays, and Bouclay creates the customer and, for a recurring price, starts the subscription. No code needed.

## Make a link

In the dashboard, open a price and choose **Payment link**. Or use the API:

```bash theme={null}
curl https://bouclay.com/api/v1/payment-links \
  -H "Authorization: Bearer $BOUCLAY_KEY" \
  -H "Idempotency-Key: plink-price-123" \
  -H "Content-Type: application/json" \
  -d '{"priceId": "price_…"}'
```

A price has one link, so asking again returns the same one. Share its `url`. Add `?email=` and `?name=` to fill them in for the buyer:

```text theme={null}
https://bouclay.com/…?email=ada%40example.com&name=Ada%20Obi
```

A free trial on the price works through the link too. A price with a quantity range lets the buyer choose how many.

Some prices can't be sold through a link: archived or free ones, ones billed at the end of the period, and ones that step up on a schedule.

## Switch a link off, or give it a last day

```bash theme={null}
curl -X PATCH https://bouclay.com/api/v1/payment-links/plink_… \
  -H "Authorization: Bearer $BOUCLAY_KEY" \
  -H "Idempotency-Key: plink-123-off" \
  -H "Content-Type: application/json" \
  -d '{"active": false}'
```

Set `expiresAt` instead to stop it selling on a date. After either, the page says "This link is no longer active" and takes no payment.

## Buying twice

A subscription link refuses an email that already has a live subscription to its plan (trialing, active, past due or paused) and points the buyer to their billing portal instead. To allow it, for gifts or family memberships, set `allowMultiplePerCustomer: true`.

## Joining fees

A `setupFee` on the price is charged once with the first payment. With `setupFeeAgainAfterMonths`, a member who comes back within that many months rejoins without paying it again. See [Catalog](https://docs.bouclay.com/billing/catalog.md#setup-and-joining-fees).

## Payments taken at the desk

When a customer pays cash, by bank transfer or on a POS terminal, record it against their open invoice:

```bash theme={null}
curl https://bouclay.com/api/v1/invoices/inv_…/payments \
  -H "Authorization: Bearer $BOUCLAY_KEY" \
  -H "Idempotency-Key: cash-inv-123" \
  -H "Content-Type: application/json" \
  -d '{"amount": 15000, "method": "cash", "reference": "Receipt 0042"}'
```

`method` is `cash`, `bank_transfer` or `pos`, and `amount` must be the whole amount left to pay. It pays the invoice like any payment: the customer gets a receipt naming how they paid, and a past-due or suspended subscription is active again. Nothing goes through your gateway, so to give it back, issue a credit note settled `outside`. See [Refunds](https://docs.bouclay.com/billing/refunds-and-chargebacks.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.