Quick Integration Guide
For developers to automatePayment Link actions
✅ Step 1: Add Webhook URL to Your Payment Link
When creating a Payment Link:
Go to Step 3: Advanced >> Select Webhook
Paste your backend URL (e.g.,
https://yourdomain.com/webhook)Choose which events you want to receive
✅ Step 2: Verify Signature of Incoming Webhook Request
When a payment occurred, Paymento sends a POST request to your endpoint with:
Content-Type: application/jsonx-signature: <HMAC signature>
To secure your endpoint:
Get your
webhook secretkeyfrom Paymento settingsGenerate HMAC-SHA256 hash of the raw body
Compare it to the
x-signatureheader
Node.js Example:
const crypto = require('crypto');
const signature = req.headers['x-paymento-signature'];
const secretKey = 'YOUR_MERCHANT_SECRET_KEY'; // From Paymento dashboard
const computed = crypto
.createHmac('sha256', secretKey)
.update(req.rawBody)
.digest('hex');
if (signature !== computed) {
return res.status(401).send('Invalid signature');
}✅ Step 3: Handle Events
Use Events to Automate Logic
Example use cases:
payment_link.paid: Subscribe user to your servicesubscription.renewed: Extend subscriptionsubscription.grace_expired: Revoke accesspayment_link.failed: Alert user or retry flow
Node.js Example:
Checklist ✅
Before going live, Make sure:
Headers Reference
Body Structure
🔍 Available Events
payment_link.paid
Payment completed
payment_link.failed
Payment failed
payment_link.expired
Link expired without payment
subscription.renewed
Subscription renewed by user
subscription.reminder_sent
Reminder sent (email or Telegram)
subscription.grace_expired
User did not pay, grace ended
Signature Verification (Code Samples)
Node.js
Python
PHP
C#
Ruby
Go
Java
Last updated