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'
})
});
curl https://api.paymentlink.io/v1/payment-links \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"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.
Popular Integrations
Connect Payment Link to your e-commerce platform for automated order processing and inventory sync.
Shopify
Sync payments and orders directly from your Shopify store.
WooCommerce
WordPress plugin available for one-click setup.
BigCommerce
Native app in the BigCommerce marketplace.
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.
Amount in cents (e.g., 2999 for $29.99).
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');
});
Fires on successful payment.
if (event.type === 'payment.completed') {
// Update order status
// Fulfill digital product
console.log('Payment completed:', event.data.id);
}
Handle declines and retries.
if (event.type === 'payment.failed') {
// Notify customer
// Log for review
}
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.
Last updated today
Built with Documentation.AI