Create and manage payment links programmatically with our REST API.
https://api.payflow.com/v1/payment_links/v1/payment_linkscurl -X POST https://api.payflow.com/v1/payment_links \
-H "Authorization: Bearer pk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Premium Course Access",
"description": "Get access to our premium course content",
"amount": 2500,
"currency": "PKR",
"expires_at": "2024-12-31T23:59:59Z"
}'titlestringamountintegercurrencystringdescriptionstringexpires_atdatetimesuccess_urlstringcancel_urlstring{
"id": "pl_1234567890",
"title": "Premium Course Access",
"description": "Get access to our premium course content",
"amount": 2500,
"currency": "PKR",
"status": "active",
"url": "https://payflow.com/pay/premium-course-123",
"expires_at": "2024-12-31T23:59:59Z",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}/v1/payment_linkslimitDefault: 10, Max: 100starting_afterCursor for paginationstatusFilter by statuscurl -X GET "https://api.payflow.com/v1/payment_links?limit=20&status=active" \ -H "Authorization: Bearer pk_live_YOUR_API_KEY"
{
"data": [
{
"id": "pl_1234567890",
"title": "Premium Course Access",
"amount": 2500,
"currency": "PKR",
"status": "active",
"url": "https://payflow.com/pay/premium-course-123",
"created_at": "2024-01-15T10:30:00Z"
}
],
"has_more": false,
"total_count": 1
}/v1/payment_links/:idcurl -X GET https://api.payflow.com/v1/payment_links/pl_1234567890 \ -H "Authorization: Bearer pk_live_YOUR_API_KEY"
{
"id": "pl_1234567890",
"title": "Premium Course Access",
"description": "Get access to our premium course content",
"amount": 2500,
"currency": "PKR",
"status": "active",
"url": "https://payflow.com/pay/premium-course-123",
"clicks": 15,
"conversion_rate": 0.33,
"total_revenue": 7500,
"expires_at": "2024-12-31T23:59:59Z",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}/v1/payment_links/:idcurl -X PATCH https://api.payflow.com/v1/payment_links/pl_1234567890 \
-H "Authorization: Bearer pk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated Course Title",
"amount": 3000
}'title - Product titledescription - Product descriptionamount - Price amountexpires_at - Expiration datesuccess_url - Success redirect URLcancel_url - Cancel redirect URLInvalid parameters or missing required fields
Check your request body and ensure all required fields are presentInvalid or missing API key
Verify your API key is correct and included in the Authorization headerPayment link not found
Check the payment link ID in your request URLStandard rate limit
Hourly limit
Daily limit
Rate Limit Headers: The API includes X-RateLimit-* headers in responses to help you track your usage and stay within limits.