Payment links

Shareable links that let customers pay a fixed amount, created from the dashboard or the API, with no checkout code on your side.

A payment link is a URL you can send by WhatsApp, SMS, email or social media, or print as a QR code. When a customer opens it, they see the amount, the description and your business name, then pay on the Teyra Pay checkout.

Payment links are ideal for invoices, deposits, consultations, donations and selling on social media without a website.

How it works

  1. You create a link with an amount, currency and description.
  2. You share its url, for example https://api.teyra.co/l/Xk29aQ.
  3. The customer opens the link and taps Pay. Teyra Pay creates a Payment with channel set to payment_link and payment_link_id set to the link's ID, then opens checkout.
  4. You get the usual payment.succeeded webhook for that payment. Link payments have no return_url: after paying, the customer sees the Teyra Pay result page.

A link can be paid many times (for example a fixed-price service) or only once with single_use.

Invoices for one customer

For an amount one customer owes you, create an invoice in Invoices → Create invoice instead of a link. An invoice is a single payment with the customer's details. When you enter the customer's email, Teyra Pay emails the invoice with a Pay now button, and the customer gets a receipt after paying. See Invoice and receipt emails.

Open Payment links → New link, enter the amount, currency and description, choose whether it is single use and whether it expires, and click Create. Copy the link or download its QR code.

POST /v1/payment-links

ParameterTypeRequiredDescription
amountintegerYesAmount in minor units.
currencystringYesISO currency code, such as KWD.
descriptionstringYesWhat the customer is paying for, up to 500 characters. Shown on the link page and at checkout.
single_usebooleanNotrue lets the link be paid only once: it is deactivated after its first successful payment. Default false. See Single-use links.
expires_atstringNoISO 8601 time with a timezone (for example Z) after which the link stops accepting payments. Must be in the future. Default: never.
curl https://api.teyra.co/v1/payment-links \
  -H "Authorization: Bearer $TEYRA_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: invoice-2026-118" \
  -d '{
    "amount": 5000,
    "currency": "KWD",
    "description": "Consultation",
    "single_use": true,
    "expires_at": "2026-11-30T21:00:00Z"
  }'
{
  "id": "plink_01JBX5R7DE",
  "object": "payment_link",
  "livemode": false,
  "url": "https://api.teyra.co/l/Xk29aQ",
  "amount": 5000,
  "currency": "KWD",
  "description": "Consultation",
  "single_use": true,
  "active": true,
  "expires_at": "2026-11-30T21:00:00.000Z",
  "payments_count": 3,
  "paid_count": 1,
  "created_at": "2026-10-28T14:07:00.000Z"
}

payments_count counts every payment started from the link; paid_count counts those that succeeded.

RequestPurpose
GET /v1/payment-linksList links (paginated).
GET /v1/payment-links/:idRetrieve one link.
POST /v1/payment-links/:id/deactivateStop accepting payments. active becomes false; existing payments are not affected.

To find the payments made through a link, list payments and match payment_link_id, or read it from the webhook payload.

A single-use link can be paid at most once, even when several people open it at the same time:

  • When a customer starts paying, their payment reserves the link. While that payment is succeeded, processing, or still payable (not yet expired), everyone else who opens the link sees "This payment link has already been used" instead of checkout. No money is taken from them.
  • If the customer cancels and the payment is canceled, or the payment expires, the link becomes available again.
  • After the first successful payment, the link is deactivated (active becomes false) and paid_count is 1.
Link statePage shown instead of checkout
Deactivated or expired (expires_at passed)"This payment link is no longer active"
Single use and already paid, or being paid by someone else"This payment link has already been used" (HTTP 409)
Your account is suspendedThe link is unavailable