Payment links
Create a payment link
Creates a payment link for one payment. The payment goes to your own Stripe account.
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.
Headers
Section titled “Headers”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: USDA 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.
Response
Section titled “Response”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.
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"}{ "error": { "code": "validation_error", "message": "Check the request's fields and try again.", "params": [ { "name": "amount", "message": "Must be at least 1" } ] }}{ "error": { "code": "invalid_api_key", "message": "This API key isn't valid." }}{ "error": { "code": "provider_not_connected", "message": "This business hasn't connected a payment provider. Connect one in the Cyan app." }}{ "error": { "code": "idempotency_key_mismatch", "message": "This Idempotency-Key was already used for a different request." }}{ "error": { "code": "provider_unavailable", "message": "The payment provider couldn't handle the request. Try again." }}