Skip to content

Payment links

Create a payment link

Creates a payment link for one payment. The payment goes to your own Stripe account.

POST /v1/payment-links

Your customer can pay by card or Apple Pay. Send the same request again with the same Idempotency-Key, and you get the same link back instead of a second one.

Authorization string header required

Your API key as a bearer token: Bearer cyan_test_.... See Authentication.

Idempotency-Key string header required

A key you choose for this payment, up to 255 characters, such as your order’s ID. Retrying with the same key and body returns the link the first request made. See Retries.

amount integer required

The amount to charge, in the currency’s smallest unit: 4950 is $49.50, and 500 is ¥500. From 1 to 99999999.

description string required

What the payment is for. Your customer sees it on the checkout. Up to 200 characters.

currency string default: USD

A three-letter ISO 4217 currency code, such as EUR.

customer_name string

Your customer’s name. The payment page shows “Payment request for” with this name.

Any other field is refused with a validation_error.

Returns 201 with the new payment link. A retry with the same Idempotency-Key also returns 201, with the same link. Any other status comes with an error: see Errors.

id string

The link’s ID, such as pl_019d0a1b2c3d4e5f60718293a4b5c6d7.

amount integer

The amount in the currency’s smallest unit.

currency string

A three-letter ISO 4217 currency code, in uppercase.

description string

What the payment is for.

customer_name string or null

Your customer’s name, or null when you didn’t set one.

status string

Where the payment stands. A new link is pending.

url string

The payment page. Send it to your customer, or pass it to Cyan.mount to show the checkout in your chat. Use it as it is, query string included.

created_at string

When the link was created, as an ISO 8601 timestamp in UTC.

Create a payment link
const response = await fetch(
"https://api.cyan.cash/v1/payment-links",
{
method: "POST",
headers: {
Authorization: "Bearer cyan_test_...",
"Idempotency-Key": "order-8412",
"Content-Type": "application/json",
},
body: JSON.stringify({
amount: 4900,
description: "Logo design",
}),
},
);
const link = await response.json();
{
"id": "pl_019d0a1b2c3d4e5f60718293a4b5c6d7",
"amount": 4900,
"currency": "USD",
"description": "Logo design",
"customer_name": null,
"status": "pending",
"url": "https://pay.cyan.cash/pl_019d0a1b2c3d4e5f60718293a4b5c6d7",
"created_at": "2026-12-05T17:40:12.000Z"
}