Payments
Payment Links API
Create shareable payment links for customers to complete payments.
Create Payment Link
POST
API Key
Creates a shareable payment link that can be sent to customers via email, SMS, or any other channel.
Request Body
json
{
"orderId": "ORD-12345",
"amount": 100.50,
"currency": "USD"
}Request Parameters
| Parameter | Type | Description |
|---|---|---|
orderIdrequired | string | Unique order identifier |
amountrequired | number | Payment amount (minimum 0.01) |
currencyrequired | string | Currency code (3 letters) |
merchantProfileIdoptional | number | Merchant Profile ID. Defaults to PRIMARY if not provided |
descriptionoptional | string | Payment description |
customerNameoptional | string | Customer name |
customerEmailoptional | string | Customer email address |
sendEmailoptional | string | send address |
returnUrloptional | string | URL to redirect after payment |
webhookUrloptional | string | Webhook URL for transaction notifications |
cancelUrloptional | string | URL where the customer is sent if they cancel or abandon the payment |
expiresInoptional | number | Expiration in hours (default: 24) |
metadataoptional | object | Key-value data returned in webhooks and in the payment object (e.g. internal_ref) |
Success Response
200json
{
"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"
}
}Note
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 Key
Returns available payment link templates that can be used to customize the payment page appearance.
Success Response
200json
{
"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"
}
]
}
}