# PSE payment links

> Create fixed or open-amount PSE payment links, share them and hear about every payment by webhook.

[Sandbox · coming soon]

A payment link is a checkout page you share with whoever is going to pay you. Your customer picks their bank, pays with PSE and the money lands in your COP balance as a deposit.

## Create a link

**POST** `/v1/recharge-links` — Create a PSE payment link · [Sandbox · coming soon] · [See the reference](https://developers.zulu.com.co/en/reference/create-recharge-link.md)

**POST /v1/recharge-links**

```bash
curl https://sandbox.zulu.com.co/v1/recharge-links \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": 250000,
  "concept": "Cuota de noviembre",
  "reference": "FAC-2026-0042",
  "paymentMethod": "PSE",
  "expiresInHours": 72
}'
```

```javascript
const response = await fetch('https://sandbox.zulu.com.co/v1/recharge-links', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ZULU_ACCESS_TOKEN}`,
    'X-API-Key': process.env.ZULU_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "amount": 250000,
    "concept": "Cuota de noviembre",
    "reference": "FAC-2026-0042",
    "paymentMethod": "PSE",
    "expiresInHours": 72
  }),
});

console.log(response.status, await response.json());
```

```python
import os

import requests

response = requests.post(
    "https://sandbox.zulu.com.co/v1/recharge-links",
    headers={
        "Authorization": f"Bearer {os.environ['ZULU_ACCESS_TOKEN']}",
        "X-API-Key": os.environ["ZULU_API_KEY"],
    },
    json={
        "amount": 250000,
        "concept": "Cuota de noviembre",
        "reference": "FAC-2026-0042",
        "paymentMethod": "PSE",
        "expiresInHours": 72,
    },
    timeout=30,
)
print(response.status_code, response.json())
```

- **`amount`** fixes the amount, in whole pesos. Without it the link has an open amount and the payer types how much they pay.
- **`reference`** is your identifier (up to 25 characters): the deposit the link produces carries it, so you reconcile without searching. Without it, the reference is the link's `slug`.
- **`concept`** is what the payer sees (up to 60 characters).
- **`expiresInHours`** (1 to 720) makes the link expire. Without it, it does not expire.

The response carries `checkoutUrl`: share it by e-mail, WhatsApp or wherever you collect. In the sandbox it is a fake checkout that never charges.

## Statuses

| Status             | What it means                                                                                                              |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| `CREATED`          | Created; nobody opened it yet.                                                                                             |
| `AWAITING_PAYMENT` | The payer opened the checkout; the payment is in progress.                                                                 |
| `PAID`             | Paid: the deposit is in your balance.                                                                                      |
| `REFUSED`          | The bank refused the payment (`failureReason` says why); the payer may retry and the link goes back to `AWAITING_PAYMENT`. |
| `EXPIRED`          | Expired unpaid.                                                                                                            |
| `CANCELLED`        | You cancelled it.                                                                                                          |

Every status change sends the `RECHARGE_LINKS` webhook, and the payment also sends the `DEPOSITS` webhook.

## Cancel a link

**DELETE** `/v1/recharge-links/{slug}` — Cancel a payment link · [Sandbox · coming soon] · [See the reference](https://developers.zulu.com.co/en/reference/cancel-recharge-link.md)

A `CREATED`, `AWAITING_PAYMENT` or `REFUSED` link is cancelled with a `DELETE` (it answers 204; cancelling one already cancelled does too). A payment already in flight at the bank is credited anyway: do not cancel to reverse a charge.

## Simulate the payment

**POST** `/v1/sandbox/recharge-links/{slug}/pay` — Simulate a PSE link payment · [Sandbox only] · [See the reference](https://developers.zulu.com.co/en/reference/simulate-recharge-link-payment.md)

**POST /v1/sandbox/recharge-links/\{slug}/pay**

```bash
curl https://sandbox.zulu.com.co/v1/sandbox/recharge-links/7QmVt3KpXz/pay \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "outcome": "PAID",
  "payer": {
    "fullName": "Marta Ruiz",
    "documentType": "CC",
    "documentNumber": "52123456",
    "bankName": "Banco Davivienda"
  }
}'
```

```javascript
const response = await fetch('https://sandbox.zulu.com.co/v1/sandbox/recharge-links/7QmVt3KpXz/pay', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ZULU_ACCESS_TOKEN}`,
    'X-API-Key': process.env.ZULU_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "outcome": "PAID",
    "payer": {
      "fullName": "Marta Ruiz",
      "documentType": "CC",
      "documentNumber": "52123456",
      "bankName": "Banco Davivienda"
    }
  }),
});

console.log(response.status, await response.json());
```

```python
import os

import requests

response = requests.post(
    "https://sandbox.zulu.com.co/v1/sandbox/recharge-links/7QmVt3KpXz/pay",
    headers={
        "Authorization": f"Bearer {os.environ['ZULU_ACCESS_TOKEN']}",
        "X-API-Key": os.environ["ZULU_API_KEY"],
    },
    json={
        "outcome": "PAID",
        "payer": {
            "fullName": "Marta Ruiz",
            "documentType": "CC",
            "documentNumber": "52123456",
            "bankName": "Banco Davivienda",
        },
    },
    timeout=30,
)
print(response.status_code, response.json())
```

With `"outcome": "REFUSED"` and a `failureReason` you simulate the bank's refusal. On an open-amount link, send the `amount` the payer "typed".

## Limits

| Limit | Value |
| --- | --- |
| PSE links active at once | 15 |
| Amount of a PSE link | 100,000 – 1,000,000,000 COP |
| Concept of a PSE link | 60 characters |

## Errors

| HTTP | error | cause | Description |
| --- | --- | --- | --- |
| 404 | `NotFoundApiError` | `recharge link "%s" not found` | No link with that slug exists in your workspace. |
| 422 | `UnprocessableEntityApiError` | `the workspace already has %d active recharge links` | You already hold the maximum of active links (`CREATED` or `AWAITING_PAYMENT`). Cancel one or wait until it is paid or expires. |
| 422 | `UnprocessableEntityApiError` | `amount %d is outside the allowed range of %d to %d` | The amount is outside the range allowed for PSE links. |
| 422 | `UnprocessableEntityApiError` | `recharge link "%s" is %s` | The link's status does not allow the operation (a `PAID` or `EXPIRED` link can no longer be cancelled or paid). |
| 422 | `UnprocessableEntityApiError` | `recharge link "%s" has no fixed amount: amount is required` | The link has an open amount: the simulator needs the `amount` the payer "typed". |
| 422 | `UnprocessableEntityApiError` | `amount %d does not match the amount of recharge link "%s"` | The link has a fixed amount and the `amount` sent differs. Omit it or send the same one. |
