Skip to main content

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:

FieldTypeRequiredDescription
emailstringNoBuyer's email (required if paylink collects email)
phonestringNoBuyer's phone
amountnumberNoAmount in major units (required for FLEXIBLE)
addressobjectNoBilling 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:

FieldTypeRequiredDescription
emailstringNoEmail address (email or phone is required)
phonestringNoPhone number (email or phone is required)
namestringNoName

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:

FieldTypeRequiredDescription
emailstringNoSubscriber's email (required if paylink collects email)
namestringNoSubscriber's name
paymentMethodIdstringNoStripe payment method ID (step 2)
customerIdstringNoExisting Stripe customer ID from step 1
phonestringNoSubscriber phone
addressobjectNoBilling 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"
}