Send Payment Link Email
The Send Payment Link Email endpoint allows you to send an existing payment link to a customer via email. Use this when you have already created a payment link and want Urbo MIP to deliver it directly to the recipient's inbox, eliminating the need to manage email delivery infrastructure yourself.
Send Email
To send a payment link via email, send a POST request to the endpoint: POST /payment-links/send-email. Upon successful processing, the API will queue the email for delivery to the specified recipient.
Required Parameters
You should include these parameters in the JWT payload alongside other parameters required for authentication.
- Name
paymentLinkId- Type
- string
- Description
Unique identifier of the payment link to send. Must be a valid UUID that references an existing payment link.
- Name
email- Type
- string
- Description
Recipient email address. Must be a valid email address. Maximum 255 characters.
Optional Parameters
- Name
comment- Type
- string
- Description
Optional message to include with the email. This will be displayed to the recipient alongside the payment link. Maximum 100 characters.
Payload example in JSON
{
"jti": "e.g. 7a4f2c9d3b6e8a51",
"exp": 1718112345,
"accessKey": "your-access-key",
"paymentLinkId": "019744b8-33e1-7350-bef1-1be8b7bda7aa",
"email": "customer@example.com",
"comment": "Please use this link to complete your payment for order #12345."
}
Token generation examples
// Generate JWT token for authentication
const jwt = require('jsonwebtoken');
const crypto = require('crypto');
const sendPaymentLinkEmail = async () => {
const payload = {
jti: crypto.randomBytes(8).toString('hex'),
exp: Math.floor(Date.now() / 1000) + (5 * 60),
accessKey: 'your-access-key',
paymentLinkId: '019744b8-33e1-7350-bef1-1be8b7bda7aa',
email: 'customer@example.com',
comment: 'Please use this link to complete your payment for order #12345.'
};
const token = jwt.sign(payload, secret, { algorithm: 'HS256' });
};
Refer this guide on how to include token to request.
Response Format
The API returns a JSON response confirming the email has been queued for delivery:
{
"success": true,
"paymentLinkId": "019744b8-33e1-7350-bef1-1be8b7bda7aa",
"email": "customer@example.com"
}
Email Delivery Flow
Email Queueing
Upon successful request validation, the email is queued for delivery. The actual delivery happens asynchronously, ensuring fast API response times. You can check email delivery status in self service website.
Email Content
The email will contain:
- The payment link URL
- Your custom comment (if provided)
- Standard payment instructions
- Link expiration information
Use Cases
This endpoint is ideal for:
- Sending invoices to customers
- Distributing payment links after order confirmation
- Automated billing workflows
- Payment reminders