Accept payments
Payment Links
Create shareable payment links to accept payments without building a checkout flow. Share via email, SMS, or embed on your site.
5 min read
Overview
Payment Links are reusable URLs that open a hosted payment page. Each link has a unique slug and can be shared anywhere. Customers visit /pay/:slug to complete payment.
Share anywhere
Email, SMS, social, QR codes
Usage tracking
Track how many times used
Expiration control
Set max uses or expiry date
Create a payment link
Create a payment link
curl -X POST https://paymenthooks.com/api/v1/payment-links \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{"name": "Pro Plan Monthly", "amount": 2990, "currency": "USD"}'Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Display name for the payment link (max 255 chars) |
| amount | integer | Yes | Amount in smallest currency unit (e.g. cents). Must be positive. |
| currency | string | Yes | Three-letter ISO 4217 currency code (e.g. USD, EUR) |
| description | string | No | Description shown to the customer (max 500 chars) |
Endpoints & Responses
Complete payload and response examples for every payment links endpoint. Click the copy button on any block to copy the JSON.
POST
/v1/payment-linksCreate a payment linkRequest Payload
{
"name": "Pro Plan Monthly",
"amount": 2990,
"currency": "USD",
"description": "Monthly subscription to Pro Plan"
}Response
{
"data": {
"id": "pl_7f3a9b2c1d4e",
"name": "Pro Plan Monthly",
"slug": "pro-plan-monthly-x7k2",
"amount": 2990,
"currency": "USD",
"description": "Monthly subscription to Pro Plan",
"status": "active",
"url": "https://paymenthooks.com/pay/pro-plan-monthly-x7k2",
"usageCount": 0,
"merchantId": "mer_abc123",
"createdAt": "2026-05-16T10:30:00.000Z",
"updatedAt": "2026-05-16T10:30:00.000Z"
},
"error": null
}GET
/v1/payment-links?page=1&pageSize=10List payment linksResponse
{
"data": [
{
"id": "pl_7f3a9b2c1d4e",
"name": "Pro Plan Monthly",
"slug": "pro-plan-monthly-x7k2",
"amount": 2990,
"currency": "USD",
"status": "active",
"url": "https://paymenthooks.com/pay/pro-plan-monthly-x7k2",
"usageCount": 12,
"createdAt": "2026-05-16T10:30:00.000Z"
}
],
"meta": { "total": 1, "page": 1, "pageSize": 10 },
"error": null
}GET
/v1/payment-links/:idRetrieve a payment linkResponse
{
"data": {
"id": "pl_7f3a9b2c1d4e",
"name": "Pro Plan Monthly",
"slug": "pro-plan-monthly-x7k2",
"amount": 2990,
"currency": "USD",
"description": "Monthly subscription to Pro Plan",
"status": "active",
"url": "https://paymenthooks.com/pay/pro-plan-monthly-x7k2",
"usageCount": 12,
"merchantId": "mer_abc123",
"createdAt": "2026-05-16T10:30:00.000Z",
"updatedAt": "2026-05-16T10:30:00.000Z"
},
"error": null
}PUT
/v1/payment-links/:idUpdate a payment linkRequest Payload
{
"name": "Pro Plan Yearly",
"amount": 29900,
"description": "Annual subscription to Pro Plan",
"status": "inactive"
}Response
{
"data": {
"id": "pl_7f3a9b2c1d4e",
"name": "Pro Plan Yearly",
"slug": "pro-plan-monthly-x7k2",
"amount": 29900,
"currency": "USD",
"description": "Annual subscription to Pro Plan",
"status": "inactive",
"url": "https://paymenthooks.com/pay/pro-plan-monthly-x7k2",
"usageCount": 12,
"merchantId": "mer_abc123",
"createdAt": "2026-05-16T10:30:00.000Z",
"updatedAt": "2026-05-16T11:00:00.000Z"
},
"error": null
}GET
/v1/payment-links/resolve?slug=pro-plan-monthly-x7k2Resolve by slug (public, no auth)Response
{
"data": {
"id": "pl_7f3a9b2c1d4e",
"name": "Pro Plan Monthly",
"slug": "pro-plan-monthly-x7k2",
"amount": 2990,
"currency": "USD",
"description": "Monthly subscription to Pro Plan",
"status": "active",
"merchantName": "Acme Corp",
"merchantLogo": "https://paymenthooks.com/logos/acme.svg"
},
"error": null
}POST
/v1/payment-links/:id/payProcess payment (public)Request Payload
{
"email": "[email protected]",
"cardNumber": "4242424242424242",
"cardExpiry": "12/28",
"cardCvc": "123",
"cardholderName": "Jane Doe"
}Response
{
"data": {
"paymentId": "pay_9k2m4n6p8r0t",
"status": "succeeded",
"amount": 2990,
"currency": "USD",
"receiptUrl": "https://paymenthooks.com/receipts/pay_9k2m4n6p8r0t"
},
"error": null
}Link statuses
activeLive and accepting paymentsinactiveManually deactivatedexpiredPast expiration dateEmbed on your website
Use the SDK to embed a payment link form on your page.
Embed snippethtml
<script src="https://paymenthooks.com/sdk/paymenthooks.js"></script><div id="pay-widget"></div><script>PaymentHooks.init({ publishableKey: "pk_live_..." });PaymentHooks.paymentLink({ slug: "pro-plan-monthly", container: "#pay-widget" });</script>