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",
"merchantProfileId": 1,
"description": "Product purchase",
"customerEmail": "customer@example.com",
"returnUrl": "https://your-domain.com/return",
"webhookUrl": "https://your-domain.com/webhook",
"expiresIn": 24
}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 |
| customerEmail | string | No | Customer email address |
| returnUrl | string | No | URL to redirect after payment |
| webhookUrl | string | No | Webhook URL for transaction notifications |
| expiresIn | number | No | Expiration in hours (default: 24) |
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"
}
]
}
}