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

# Payment links

> Create a shareable payment URL and track the related payment.

A payment link lets you generate a public URL that you can send to a customer by email, SMS, WhatsApp, or display in your application.

## Use cases

* invoice payment;
* payment outside a cart;
* customer collection;
* manual payment from a back office;
* recurring payment triggered by a subscription.

## Create a link

```bash theme={null}
curl -X POST "https://api.mysoleas.com/payment-links" \
  -H "x-sp-auth-token: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 15000,
    "currency": "XAF",
    "provider": "mtn_cmr",
    "channel": "PROVIDER",
    "feeBearer": "CUSTOMER",
    "title": "Invoice INV-2026-001",
    "description": "Payment for invoice INV-2026-001",
    "expires_at": "2026-08-30T23:59:59+01:00",
    "max_usage": 1,
    "metadata": {
      "invoice_reference": "INV-2026-001"
    }
  }'
```

The response contains `payment_url`. Redirect the customer to that URL or share it.

```json theme={null}
{
  "reference": "PLK-20260728-000001",
  "short_code": "A1B2C3D4",
  "payment_url": "https://pay.soleaspay.com/link/A1B2C3D4",
  "status": "ACTIVE",
  "amount": 15000,
  "currency": "XAF"
}
```

## Manage the amount

The `amount` field is optional at creation time. If you do not set it, the payer can provide the amount at payment time, depending on your integration rules.

If `max_usage` is `1`, the link must be treated as single-use.

## Manage fees

A payment link can define who pays fees with `feeBearer`.

| Value      | Effect                                            |
| ---------- | ------------------------------------------------- |
| `CUSTOMER` | Fees are added to the amount paid by the customer |
| `MERCHANT` | Fees are paid by the merchant                     |

The historical aliases `customerPaysFees`, `customer_pays_fees`, `customerPaidFees`, and `customer_paid_fees` are accepted, but `feeBearer` remains the recommended form.

## Read a public link

```bash theme={null}
curl "https://pay.soleaspay.com/link/A1B2C3D4"
```

This route is public. It returns the information required to display the checkout.

## Pay a link

```bash theme={null}
curl -X POST "https://api.mysoleas.com/pay/A1B2C3D4/pay" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_phone": "237670000000",
    "customer_name": "Ada Client",
    "customer_email": "ada@example.com",
    "transaction_uuid": "65b0344e-0fc0-44f4-9f6f-ecdf6f41fbcb",
    "provider": "mtn_cmr",
    "channel": "PROVIDER"
  }'
```

The response contains the transaction reference to track with the corresponding status flow.

## List your links

```bash theme={null}
curl "https://api.mysoleas.com/payment-links?page=1&limit=25" \
  -H "x-sp-auth-token: Bearer YOUR_ACCESS_TOKEN"
```

Use `page` and `limit` pagination to load your links progressively in a back office.
