Public Checkout
Public endpoints for the checkout flow. No authentication required.
These endpoints power the public checkout page at https://paylinks.ro/p/{slug}.
GET /paylinks/public
List active public paylinks for sitemap/indexing.
curl https://api.paylinks.ro/api/v1/paylinks/public
Response (200):
{
"items": [
{
"slug": "premium-course",
"updatedAt": "2026-02-17T10:00:00.000Z"
}
]
}
GET /paylinks/public/:slug
Get a single public paylink by slug.
curl https://api.paylinks.ro/api/v1/paylinks/public/premium-course
Response (200): Full public paylink object.
Response (404): PayLink not found.
POST /paylinks/public/:slug/payment-intents
Create a Stripe payment intent for checkout.
curl -X POST https://api.paylinks.ro/api/v1/paylinks/public/premium-course/payment-intents \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"phone": "+40712345678",
"amount": 49.99
}'
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
email | string | No | Buyer's email (required if paylink collects email) |
phone | string | No | Buyer's phone |
amount | number | No | Amount in major units (required for FLEXIBLE) |
address | object | No | Billing address fields |
Response (200):
{
"client_secret": "pi_1234567890_secret_abc123",
"connectedAccountId": "acct_1234567890"
}
Use client_secret with Stripe.js to confirm the payment.
POST /paylinks/public/:slug/leads
Claim a free paylink (no payment required).
curl -X POST https://api.paylinks.ro/api/v1/paylinks/public/free-ebook/leads \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "name": "Maria"}'
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
email | string | No | Email address (email or phone is required) |
phone | string | No | Phone number (email or phone is required) |
name | string | No | Name |
Response (201):
{"success": true}
POST /paylinks/public/:slug/subscriptions
Create or confirm a subscription for a recurring paylink.
curl -X POST https://api.paylinks.ro/api/v1/paylinks/public/monthly-plan/subscriptions \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"name": "Ion",
"paymentMethodId": "pm_1234567890"
}'
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
email | string | No | Subscriber's email (required if paylink collects email) |
name | string | No | Subscriber's name |
paymentMethodId | string | No | Stripe payment method ID (step 2) |
customerId | string | No | Existing Stripe customer ID from step 1 |
phone | string | No | Subscriber phone |
address | object | No | Billing address fields |
Response (200, step 1):
{
"step": "setup",
"client_secret": "seti_1234567890_secret_abc123",
"customerId": "cus_1234567890",
"connectedAccountId": "acct_1234567890"
}
Response (200, step 2):
{
"step": "complete",
"subscriptionId": "sub_1234567890",
"status": "active",
"client_secret": null,
"paymentIntentStatus": null,
"connectedAccountId": "acct_1234567890"
}