---
title: "Create a payment link"
method: POST
path: "/api/v1/commerce/payment-links"
tags: ["commerce"]
---

# Create a payment link

`POST /api/v1/commerce/payment-links`

## Request

- Base URL: `https://app.blueticked.com`
- URL: `https://app.blueticked.com/api/v1/commerce/payment-links`
- Auth: HTTP bearer

Create a Paystack-hosted checkout link for one amount (or priced items) and send it over any channel.

Pass `amount` (rands) for a free-amount link, or `items` (`[{ product_id, quantity }]`) and the total is priced from the product rows; `amount` is ignored when items are present, so a request can never name its own total.

Requires a connected Paystack account (Selling settings). `mode: "test"` in the response means the merchant's keys are test keys: the link will look like it collects and no money will move.

Send the returned `checkout_url` over WhatsApp, SMS or email with the messages API; payment lands as a `commerce.order.paid` webhook.

## Request body

- object
  - `amount` number
  - `customer_email` string, email, required
  - `description` string

## Response `201`

Success

- object
  - `ok` boolean, required
  - `order` object, required
    - `id` string, uuid, required
    - `reference` string, required
    - `amount_cents` number, required
    - `checkout_url` string, required
  - `mode` string, required

## Other responses

- `400`: Validation failed
- `401`: Unauthorized: missing or invalid API key
- `402`: Insufficient wallet balance
- `403`: Forbidden: scope, plan limit, or suspension
- `404`: Not found
- `409`: Conflict (idempotency-key reuse or resource in use)
- `413`: Request body above the endpoint's size limit
- `422`: Understood but refused: the request is well-formed, the action is not permitted for this resource
- `429`: Rate limited
- `500`: Internal error
- `502`: An upstream provider refused or failed the request
- `503`: Channel or send queue unavailable

---

[API](https://skmtc.dev/blueticked/apis/blueticked-api.md) · [All operations](https://skmtc.dev/blueticked/apis/blueticked-api/llms.txt) · [OpenAPI document](https://skmtc.dev/blueticked/apis/blueticked-api/revisions/07132284f4ff?raw)
