Create Payment Link
Generate shareable payment links programmatically using BudPay's Payment Link API.
Endpoint
POST https://api.budpay.com/api/v2/create_payment_linkRequest Parameters
| Parameter | Description | Required |
|---|---|---|
name | Customer or payment recipient name | Yes |
amount | Amount to be paid | Yes |
currency | Currency code (NGN, USD, GHS, KES) | Yes |
description | Description of what the payment is for | Yes |
redirect | URL to redirect customer after payment | No |
type | onetime or recurring | No (default: onetime) |
interval | Billing interval: daily, weekly, monthly, yearly | Required if type is recurring |
times | Number of charges for recurring payments | Required if type is recurring |
custom_url | Custom slug for the payment link URL | No |
paycode | Custom payment code/reference | No |
One-Time Payment Link
curl https://api.budpay.com/api/v2/create_payment_link \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"amount": "5000",
"currency": "NGN",
"description": "Payment for Premium Package",
"redirect": "https://yourwebsite.com/thank-you"
}' \
-X POSTResponse:
{
"success": true,
"message": "Payment Link created successfully",
"data": [{
"ref_id": "ovgelkfsdjfdsfss",
"paycode": "P323543943593858",
"payment_link": "https://app.budpay.com/pay/ovgelkfsdjfdsfss"
}]
}Try it out
Recurring Payment Link
For subscriptions, set type to recurring with interval and times:
curl https://api.budpay.com/api/v2/create_payment_link \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"amount": "2500",
"currency": "NGN",
"description": "Monthly Subscription",
"type": "recurring",
"interval": "monthly",
"times": 12
}' \
-X POST| Interval | Description |
|---|---|
daily | Charge every day |
weekly | Charge every week |
monthly | Charge every month |
yearly | Charge every year |
Custom URL
Create branded URLs using custom_url:
{
"custom_url": "summer-sale-2024"
}
// Results in: https://app.budpay.com/pay/summer-sale-2024