Zenso Docs
Payment links
Create a shareable Zenso-hosted payment URL for invoices, messages, or manual sales workflows.
Create a payment link
curl
bash
curl -X POST "$ZENSO_API_BASE/api/v1/payment_links/" \
-H "Authorization: Bearer $ZENSO_SECRET_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: payment_link_order_123" \
-d '{
"amount": 3000,
"currency": "LKR",
"description": "Invoice 1001",
"metadata": {
"order_id": "order_123"
}
}'Response
json
{
"id": "plink_...",
"object": "payment_link",
"status": "active",
"url": "https://pay.zenso.lk/pl/plink_..."
}When to use payment links
- Use payment links when you want a payable URL without building a checkout initiation flow.
- Use checkout sessions when your app needs to create payments dynamically during a customer journey.
- Both flows should still use webhooks for fulfillment.