Accept Payment
Payment Link
Create Payment Link

Create Payment Link

Generate shareable payment links programmatically using BudPay's Payment Link API.


Endpoint

POST https://api.budpay.com/api/v2/create_payment_link

Request Parameters

ParameterDescriptionRequired
nameCustomer or payment recipient nameYes
amountAmount to be paidYes
currencyCurrency code (NGN, USD, GHS, KES)Yes
descriptionDescription of what the payment is forYes
redirectURL to redirect customer after paymentNo
typeonetime or recurringNo (default: onetime)
intervalBilling interval: daily, weekly, monthly, yearlyRequired if type is recurring
timesNumber of charges for recurring paymentsRequired if type is recurring
custom_urlCustom slug for the payment link URLNo
paycodeCustom payment code/referenceNo

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 POST

Response:

{
    "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
IntervalDescription
dailyCharge every day
weeklyCharge every week
monthlyCharge every month
yearlyCharge 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