Payment Links API

Create shareable payment links for customers to complete payments.

Create Payment Link

POST/api/v1/payment-link
Requires 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

ParameterTypeRequiredDescription
orderIdstringYesUnique order identifier
amountnumberYesPayment amount (minimum 0.01)
currencystringYesCurrency code (3 letters)
merchantProfileIdnumberNoMerchant Profile ID. Defaults to PRIMARY if not provided
descriptionstringNoPayment description
customerEmailstringNoCustomer email address
returnUrlstringNoURL to redirect after payment
webhookUrlstringNoWebhook URL for transaction notifications
expiresInnumberNoExpiration 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-templates
Requires 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"
      }
    ]
  }
}