ReportsOverview
Reports

Integrations and Webhooks

Connect Payment Link with third-party services and set up webhooks to automate and extend your payment workflows.

const response = await fetch('https://api.paymentlink.io/v1/payment-links', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    amount: 2999,
    currency: 'usd',
    description: 'Pro Subscription'
  })
});
{
  "id": "plink_abc123",
  "url": "https://pay.paymentlink.io/plink_abc123",
  "status": "active"
}

Overview

Payment Link integrates seamlessly with popular e-commerce platforms and third-party services. You receive real-time notifications through webhooks and access our API for custom solutions. This guide covers popular integrations, webhook setup, API usage, and event handling.

All integrations use secure HTTPS endpoints. Verify webhook signatures to prevent unauthorized access.

Connect Payment Link to your e-commerce platform for automated order processing and inventory sync.

Setting Up Webhooks

Follow these steps to configure webhooks for real-time payment updates.

Create Webhook

Log in to your Payment Link dashboard. Navigate to Settings > Webhooks and click "New Webhook".

Add Endpoint URL

Enter your webhook URL, such as https://your-webhook-url.com/paymentlink.

Select events like payment.created or payment.completed.

Verify and Test

Payment Link sends a challenge request. Respond with the challenge token to verify.

app.post('/webhook', (req, res) => {
  const challenge = req.query['paymentlink_challenge'];
  if (challenge) {
    res.send(challenge);
    return;
  }
  // Handle events
});

API Access for Custom Integrations

Use our REST API to create payment links programmatically.

path
amountinteger
Required

Amount in cents (e.g., 2999 for $29.99).

header
Authorizationstring
Required

Bearer token: Bearer YOUR_API_KEY.

Handling Payment Events

Process webhook payloads for different events using your server.

Triggered when a customer starts a payment.

app.post('/webhook', (req, res) => {
  const event = req.body;
  if (event.type === 'payment.created') {
    console.log('New payment:', event.data.id);
    // Send welcome email
  }
  res.status(200).send('OK');
});

Webhook Flow

Always respond with HTTP 200 within 5 seconds. Use idempotency keys for retries.

Your integrations now automate workflows across platforms. Explore the dashboard for more options.