Skip to main content

Payment Links

Create payment links that you can share anywhere - email, social media, messaging apps, or embed on your website. No coding required!

Quick Start

curl -X POST https://api.zendfi.tech/api/v1/payment-links \
-H "Authorization: Bearer zfi_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Pro Plan Upgrade",
"amount": 99,
"currency": "USD"
}'

Response:

{
"id": "plink_abc123",
"url": "https://zendfi.tech/pay/plink_abc123",
"name": "Pro Plan Upgrade",
"amount": 99,
"currency": "USD"
}

Share https://zendfi.tech/pay/plink_abc123 and start collecting payments! 🎉


Features

  • No-Code - Create links from dashboard or API
  • Shareable - Works on any platform
  • Customizable - Add metadata, limits, expiration
  • Reusable - One link for multiple payments
  • Analytics - Track views, conversions, revenue

Use Cases

Use CaseDescription
DonationsAccept tips, donations, or support payments
Quick SalesSell products without a full checkout
Event TicketsSell tickets via social media
Freelance BillingSend payment links instead of invoices
Pre-OrdersCollect payments before launch

Create a new shareable payment link.

Endpoint

POST /api/v1/payment-links

Request Parameters

ParameterTypeRequiredDescription
namestringYesLink name/description shown to payer
amountnumberConditionalFixed amount (omit for PWYW)
currencystringYesCurrency code ("USD" only)
descriptionstringNoLonger description
image_urlstringNoProduct/service image URL
allow_custom_amountbooleanNoAllow payer to enter custom amount
min_amountnumberNoMinimum amount (for PWYW)
max_amountnumberNoMaximum amount
suggested_amountsarrayNoSuggested amounts to display
quantity_enabledbooleanNoAllow quantity selection
max_quantitynumberNoMaximum quantity per payment
collect_emailbooleanNoRequire email (default: false)
collect_namebooleanNoRequire name (default: false)
collect_phonebooleanNoRequire phone (default: false)
collect_addressbooleanNoRequire shipping address (default: false)
success_urlstringNoRedirect URL after payment
expires_atstringNoLink expiration (ISO 8601)
max_usesnumberNoMaximum times link can be used
metadataobjectNoCustom key-value pairs

Example: Fixed Amount Product

curl -X POST https://api.zendfi.tech/api/v1/payment-links \
-H "Authorization: Bearer zfi_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "ZendFi Pro License",
"description": "Lifetime access to ZendFi Pro features",
"amount": 299,
"currency": "USD",
"image_url": "https://zendfi.tech/images/pro-license.png",
"collect_email": true,
"success_url": "https://myapp.com/thank-you",
"metadata": {
"product_id": "pro_license",
"sku": "ZFPRO001"
}
}'

Example: Pay What You Want (Tips/Donations)

curl -X POST https://api.zendfi.tech/api/v1/payment-links \
-H "Authorization: Bearer zfi_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Support My Work",
"description": "Buy me a coffee or support my open source work!",
"currency": "USD",
"allow_custom_amount": true,
"min_amount": 1,
"suggested_amounts": [5, 10, 25, 50],
"image_url": "https://example.com/coffee.png",
"collect_name": true,
"metadata": {
"type": "donation",
"campaign": "open_source_2025"
}
}'

Example: Event Tickets with Quantity

curl -X POST https://api.zendfi.tech/api/v1/payment-links \
-H "Authorization: Bearer zfi_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Web3 Conference 2025 - General Admission",
"description": "Full day access to all sessions and networking",
"amount": 149,
"currency": "USD",
"image_url": "https://example.com/conference-banner.jpg",
"quantity_enabled": true,
"max_quantity": 10,
"collect_email": true,
"collect_name": true,
"expires_at": "2025-03-01T00:00:00Z",
"max_uses": 500,
"success_url": "https://myconference.com/tickets/confirmation",
"metadata": {
"event_id": "web3conf2025",
"ticket_type": "general"
}
}'

Example: Limited Time Offer

curl -X POST https://api.zendfi.tech/api/v1/payment-links \
-H "Authorization: Bearer zfi_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Black Friday Deal - 50% Off!",
"description": "Limited time offer - ends Monday!",
"amount": 49.50,
"currency": "USD",
"expires_at": "2025-12-02T00:00:00Z",
"max_uses": 100,
"metadata": {
"campaign": "black_friday_2025",
"original_price": 99
}
}'

Retrieve payment link details.

Endpoint

GET /api/v1/payment-links/:id

Example

curl -X GET https://api.zendfi.tech/api/v1/payment-links/plink_abc123 \
-H "Authorization: Bearer zfi_live_abc123..."

Response:

{
"id": "plink_abc123",
"merchant_id": "merchant_xyz789",
"name": "ZendFi Pro License",
"description": "Lifetime access to ZendFi Pro features",
"amount": 299,
"currency": "USD",
"image_url": "https://zendfi.tech/images/pro-license.png",
"url": "https://zendfi.tech/pay/plink_abc123",
"active": true,
"collect_email": true,
"collect_name": false,
"success_url": "https://myapp.com/thank-you",
"expires_at": null,
"max_uses": null,
"times_used": 47,
"total_revenue": 14053,
"created_at": "2025-10-01T12:00:00Z",
"metadata": {
"product_id": "pro_license",
"sku": "ZFPRO001"
}
}

Get all payment links for your merchant account.

Endpoint

GET /api/v1/payment-links

Query Parameters

ParameterTypeDescription
activebooleanFilter by active status
limitnumberNumber of results (default: 20, max: 100)
offsetnumberPagination offset

Example

curl -X GET "https://api.zendfi.tech/api/v1/payment-links?active=true&limit=10" \
-H "Authorization: Bearer zfi_live_abc123..."

Update an existing payment link.

Endpoint

PATCH /api/v1/payment-links/:id

Example: Update Price

curl -X PATCH https://api.zendfi.tech/api/v1/payment-links/plink_abc123 \
-H "Authorization: Bearer zfi_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"amount": 249,
"description": "Holiday Sale - $50 off!"
}'

Deactivate a payment link so it can no longer accept payments.

Endpoint

POST /api/v1/payment-links/:id/deactivate

Example

curl -X POST https://api.zendfi.tech/api/v1/payment-links/plink_abc123/deactivate \
-H "Authorization: Bearer zfi_live_abc123..."

Reactivate a previously deactivated payment link.

Endpoint

POST /api/v1/payment-links/:id/activate

Example

curl -X POST https://api.zendfi.tech/api/v1/payment-links/plink_abc123/activate \
-H "Authorization: Bearer zfi_live_abc123..."

Get analytics for a specific payment link.

Endpoint

GET /api/v1/payment-links/:id/analytics

Example

curl -X GET https://api.zendfi.tech/api/v1/payment-links/plink_abc123/analytics \
-H "Authorization: Bearer zfi_live_abc123..."

Response:

{
"payment_link_id": "plink_abc123",
"views": 1250,
"unique_visitors": 980,
"payments_started": 120,
"payments_completed": 47,
"conversion_rate": 4.8,
"total_revenue": 14053,
"average_payment": 299,
"payments_by_day": [
{ "date": "2025-10-25", "count": 5, "revenue": 1495 },
{ "date": "2025-10-26", "count": 8, "revenue": 2392 }
]
}

<a href="https://zendfi.tech/pay/plink_abc123">Pay Now</a>

Button

<a href="https://zendfi.tech/pay/plink_abc123" 
style="background: #6366f1; color: white; padding: 12px 24px;
border-radius: 8px; text-decoration: none; display: inline-block;">
Pay $299 with Crypto
</a>

QR Code

Generate a QR code for your payment link:

https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://zendfi.tech/pay/plink_abc123

Or use the built-in QR endpoint:

GET /api/v1/payment-links/:id/qr

Webhook Events

EventDescription
payment_link.createdPayment link created
payment_link.payment_completedPayment made via link
payment_link.deactivatedLink deactivated
payment_link.expiredLink reached expiration
payment_link.limit_reachedLink reached max_uses

Example Webhook Payload

{
"event": "payment_link.payment_completed",
"timestamp": "2025-10-26T15:30:00Z",
"data": {
"payment_link_id": "plink_abc123",
"payment_link_name": "ZendFi Pro License",
"payment_id": "pay_xyz789",
"amount": 299,
"currency": "USD",
"payer_wallet": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"payer_email": "customer@example.com",
"quantity": 1,
"transaction_signature": "5K2Nz...abc123",
"metadata": {
"product_id": "pro_license"
}
}
}

Best Practices

  1. Clear Names - Use descriptive names that explain what the payment is for
  2. Add Images - Visual products convert better
  3. Set Expectations - Include descriptions of what payer receives
  4. Success URLs - Redirect to a thank-you page with next steps
  1. Use Metadata - Track campaigns, products, and sources
  2. Set Limits - Use max_uses for limited offers
  3. Expiration - Set expires_at for time-sensitive offers
  4. Monitor Analytics - Track conversion rates and optimize

Next Steps

Ask AI about the docs...