Create links to receive payments and share them via email or SMS. Sell products, collect invoices, or raise funds without even having a website.
Pay By Link allows you to generate unique payment links that you can share with customers through any channel - email, SMS, social media, or messaging apps. Each link is created for a specific payment (single payment, subscription, or any other payment type) and is intended for one customer or transaction. When customers click the link, they're taken to a hosted payment page where they can complete their purchase.
- No website required: Accept payments without building a website
- Quick setup: Create payment links in seconds via API
- Share anywhere: Email, SMS, WhatsApp, social media, QR codes
- Mobile-optimized: Works seamlessly on all devices
- Track payments: Monitor link usage and payment status
- Customizable: Add product details, amounts, and customer information
- Invoice payments: Send unique payment links for each outstanding invoice
- Event tickets: Send individual payment links to customers for ticket purchases
- Donations: Send personalized payment links to donors
- Service payments: Send quick payment links for services rendered
- Product sales: Send payment links for individual product purchases
- Booking deposits: Send deposit payment links for appointments
- Remote sales: Sales reps can send personalized payment links to customers
- Subscription sign-ups: Send links for customers to start their subscriptions
POST https://api.prod.easypay.pt/2.0/link
{
"value": 50.00,
"currency": "EUR",
"description": "Invoice #12345",
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+351911234567"
},
"expiration_time": "2024-12-31 23:59",
"communication_channels": ["EMAIL", "SMS"]
}{
"id": "a1b2c3d4-e5f6-7890-g1h2-i3j4k5l6m7n8",
"url": "https://pay.easypay.pt/a1b2c3d4",
"qr_code": "https://cdn.easypay.pt/qrcodes/a1b2c3d4.png",
"status": "ACTIVE",
"value": 50.00,
"description": "Invoice #12345"
}The API can automatically send the payment link via the specified communication channels (EMAIL, SMS), or you can manually share it through:
- Email (automatically sent if specified in
communication_channels) - SMS (automatically sent if specified in
communication_channels) - Social media
- QR code (image URL provided in response)
Customer clicks the link and completes payment using their preferred method.
Get a webhook notification when the payment is completed.
Send payment links automatically to your customers via email or SMS:
{
"communication_channels": ["EMAIL", "SMS"],
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+351911234567"
}
}When you specify communication_channels, Easypay will automatically send the payment link to the customer through the selected channels. You can choose:
EMAIL- Send link via email to the customer's email addressSMS- Send link via SMS to the customer's phone number- Both - Include both values in the array to send via both channels
Set when links expire:
{
"expiration_time": "2024-12-31 23:59"
}Pre-fill customer information:
{
"customer": {
"name": "Jane Smith",
"email": "jane@example.com",
"phone": "+351912345678",
"fiscal_number": "PT123456789"
}
}Add meaningful descriptions:
{
"description": "Invoice #12345 - Website Design Services",
"key": "invoice-12345" // Your internal reference
}Support all Easypay payment methods:
- Credit/Debit Card
- MB WAY
- Multibanco
- Apple Pay
- Google Pay
- Samsung Pay
- Direct Debit
- Virtual IBAN
GET /link/{id}PATCH /link/{id}
{
"description": "Updated description",
"expiration_time": "2025-01-31 23:59"
}DELETE /link/{id}| Status | Description |
|---|---|
ACTIVE | Link is active and can be paid |
FINALIZED | The customer completed the payment page, so the link is closed. This doesn't mean the payment succeeded |
EXPIRED | Link has expired |
CANCELLED | Link was deleted and can no longer be paid |
Keep in mind that these statuses describe the link, not the payment made through it. Once the customer gets through the payment page the link turns FINALIZED, whether the payment ended up successful, still pending (an MB reference waiting to be paid, for example), or failed. To know if the money actually came in, rely on the notifications (webhooks) or check the payment's own status.
- Set Expiration Dates: Always set reasonable expiration times
- Use Unique References: Include your internal reference in the
keyfield - Pre-fill Customer Data: Reduces friction and errors
- Clear Descriptions: Help customers identify what they're paying for
- Track Link Status: Monitor which links are still open, finalized, or expired, and confirm payments through webhooks rather than the link status
- Use Webhooks: Get notified immediately when payments complete
- Secure Sharing: Only share links with intended recipients
async function sendPaymentLink(invoiceId, customer, amount) {
// Create payment link with automatic email and SMS delivery
const response = await fetch('https://api.prod.easypay.pt/2.0/link', {
method: 'POST',
headers: {
'AccountId': process.env.EASYPAY_ACCOUNT_ID,
'ApiKey': process.env.EASYPAY_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
value: amount,
currency: 'EUR',
description': `Invoice #${invoiceId}`,
key: `invoice-${invoiceId}`,
customer: {
name: customer.name,
email: customer.email,
phone: customer.phone
},
expiration_time: getExpirationDate(30), // 30 days from now
communication_channels: ['EMAIL', 'SMS'] // Automatically send via email and SMS
})
});
const paymentLink = await response.json();
// The link has been automatically sent to the customer via email and SMS
// You can also use the QR code image: paymentLink.qr_code
return paymentLink;
}app.post('/webhooks/easypay', async (req, res) => {
const notification = req.body;
// Acknowledge receipt
res.status(200).send('OK');
// Verify and process
if (notification.type === 'capture' && notification.status === 'success') {
await markInvoiceAsPaid(notification.key);
await sendPaymentConfirmation(notification.id);
}
});The API automatically generates a QR code image for every payment link. The QR code URL is included in the response:
{
"id": "a1b2c3d4-e5f6-7890-g1h2-i3j4k5l6m7n8",
"url": "https://pay.easypay.pt/a1b2c3d4",
"qr_code": "https://cdn.easypay.pt/qrcodes/a1b2c3d4.png"
}You can use this QR code image in:
- Printed invoices and receipts
- Email communications
- Physical store displays
- Marketing materials
- Mobile apps
Simply embed the QR code image URL in your HTML or display it to customers:
<img src="https://cdn.easypay.pt/qrcodes/a1b2c3d4.png" alt="Payment QR Code" />When you include communication_channels in your API request, Easypay automatically sends the payment link to your customer:
{
"communication_channels": ["EMAIL", "SMS"],
"customer": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+351911234567"
}
}The email and SMS are professionally formatted and include:
- Payment link URL
- Payment amount and description
- Expiration date
- Your business branding (if configured)
- One Link Per Transaction: Each payment link is created for one specific payment or subscription. Links should not be shared with multiple customers to create multiple separate transactions
- Expiration: Set appropriate expiration times
- HTTPS: All payment pages use HTTPS
- Verification: Always verify payments via API or webhooks
- Customer Validation: Links can optionally require specific customer details
Track payment link performance:
# Get all links
GET /link
# Links whose payment page was completed (check the payment status separately)
GET /link?status[]=FINALIZED
# Filter by date range
GET /link?created_after=2024-01-01&created_before=2024-01-31Create a unique link for each invoice, send to the specific customer, mark invoice as paid when webhook received.
Create a unique link for each customer purchasing a ticket, send via email or SMS, confirm ticket upon payment.
Create a unique link for each donor, send directly to them, track individual donations via webhooks.
Create a unique link for the deposit amount, send to the specific customer before appointment, confirm booking upon payment.
- Pay By Link API Reference - Complete API documentation
- Webhooks Guide - Receive payment notifications
- Quick Start - Get started with the API