Payment Links API
Create shareable payment links for customers to complete payments.
Create Payment Link
POST
/api/v1/payment-linkRequires API Key
Creates a shareable payment link that can be sent to customers via email, SMS, or any other channel.
Request Body
{
"orderId": "ORD-12345",
"amount": 100.50,
"currency": "USD"
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| orderId | string | Yes | Unique order identifier |
| amount | number | Yes | Payment amount (minimum 0.01) |
| currency | string | Yes | Currency code (3 letters) |
| merchantProfileId | number | No | Merchant Profile ID. Defaults to PRIMARY if not provided |
| description | string | No | Payment description |
| customerName | string | No | Customer name |
| customerEmail | string | No | Customer email address |
| sendEmail | string | No | send address |
| returnUrl | string | No | URL to redirect after payment |
| webhookUrl | string | No | Webhook URL for transaction notifications |
| cancelUrl | string | No | URL where the customer is sent if they cancel or abandon the payment |
| expiresIn | number | No | Expiration in hours (default: 24) |
| metadata | object | No | Key-value data returned in webhooks and in the payment object (e.g. internal_ref) |
Success Response
200{
"success": true,
"data": {
"paymentLinkId": "LINK-20240101-ABC123",
"paymentLink": "https://pay.finvypay.com/pay/LINK-20240101-ABC123",
"orderId": "ORD-12345",
"amount": 100.5,
"currency": "USD",
"expiresAt": "2024-01-02T12:00:00Z"
}
}Share the
paymentLink URL with your customer. They can complete the payment by visiting this link. The link will expire after the specified expiresIn hours.Get Payment Templates
GET
/api/v1/payment-templatesRequires API Key
Returns available payment link templates that can be used to customize the payment page appearance.
Success Response
200{
"success": true,
"data": {
"templates": [
{
"id": "template-1",
"name": "Default",
"description": "Default payment template",
"previewUrl": "https://pay.finvypay.com/templates/default"
},
{
"id": "template-2",
"name": "Minimal",
"description": "Minimal payment template",
"previewUrl": "https://pay.finvypay.com/templates/minimal"
}
]
}
}