Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dubupay.com/llms.txt

Use this file to discover all available pages before exploring further.

Checkout links give you a hosted payment page that you can share with customers via email, SMS, or your website. When a customer clicks the link, they see a branded payment page and can complete their payment without you needing to build any frontend. Dubu automatically reconciles the payment against your account and, if the link is tied to an invoice, marks that invoice as paid. All routes require authentication.
id
string
Unique checkout link identifier (UUID).
title
string
Display title shown on the hosted payment page.
description
string
Optional description shown to the customer. null if not set.
url
string
The hosted checkout URL your customers visit to complete payment. Share this link directly.
slug
string
URL-friendly identifier used in the hosted page URL. Lowercase alphanumeric with dashes.
type
string
one_time for a standalone payment or invoice for a link tied to an existing invoice.
amount
number
Payment amount for one_time links.
currency
string
Payment currency: NGN or USD.
status
string
active or inactive. Inactive links cannot be used for new payments.
redirect_url
string
URL customers are redirected to after a successful payment. null if not set.
success_message
string
Custom message shown to customers after payment. null if not set.
invoice_id
string
UUID of the linked invoice, if type is invoice. null otherwise.
created_at
string
ISO 8601 creation timestamp.

POST /checkout-links
You can create three flavors of checkout link:
  • One-time amount — set type: "one_time" and provide amount and currency.
  • Invoice-linked — set type: "invoice" and provide invoice_id to link an existing invoice.
  • Inline invoice — provide customer_name, customer_email, and line_items to create a new invoice and checkout link in one call.

Request body

title
string
required
Title shown on the checkout page. Maximum 255 characters.
description
string
Optional description shown to the customer. Maximum 2,000 characters.
type
string
one_time or invoice. Defaults to one_time.
slug
string
Custom URL slug for the checkout page (e.g. my-product-payment). Must be lowercase alphanumeric with dashes, 3–100 characters. Auto-generated if omitted.
currency
string
NGN or USD. Defaults to your account currency.
redirect_url
string
URL to redirect the customer to after successful payment.
success_message
string
Custom message displayed after payment completes. Maximum 500 characters.
amount
number
Fixed payment amount. Required for one_time links without line_items.
invoice_id
string
UUID of an existing invoice to link. Use this for invoice type links.
customer_name
string
Customer name for inline invoice creation.
customer_email
string
Customer email for inline invoice creation.
line_items
array
Line items for inline invoice creation. Each item requires description, quantity, and unit_price. Optionally include product_id to link a catalog product.

Example — one-time payment

curl -X POST https://api.dubupay.com/api/v1/checkout-links \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Payment for Logo Design",
    "amount": 75000,
    "currency": "NGN",
    "redirect_url": "https://yoursite.com/thank-you"
  }'

Example response

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "title": "Payment for Logo Design",
    "url": "https://pay.dubupay.com/c/xk9p2mq3",
    "slug": "xk9p2mq3",
    "type": "one_time",
    "amount": 75000,
    "currency": "NGN",
    "status": "active",
    "redirect_url": "https://yoursite.com/thank-you",
    "success_message": null,
    "invoice_id": null,
    "created_at": "2024-01-15T10:00:00.000Z"
  }
}

GET /checkout-links
Returns a paginated list of your checkout links.

Query parameters

status
string
Filter by status: active or inactive.
page
number
Page number (1-indexed).
limit
number
Results per page. Maximum 100.

Example

curl "https://api.dubupay.com/api/v1/checkout-links?status=active" \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

GET /checkout-links/:id
Retrieve a single checkout link by its UUID.
id
string
required
UUID of the checkout link.
curl https://api.dubupay.com/api/v1/checkout-links/link_uuid_here \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

PATCH /checkout-links/:id
Update a checkout link’s display settings or status. You cannot change the amount, currency, or linked invoice after creation.
id
string
required
UUID of the checkout link to update.
title
string
New title.
description
string
New description. Pass null to clear.
redirect_url
string
New redirect URL. Pass null to remove.
success_message
string
New success message. Pass null to clear.
status
string
Set to inactive to disable the link, or active to re-enable it.

Example

curl -X PATCH https://api.dubupay.com/api/v1/checkout-links/link_uuid_here \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "inactive"}'

DELETE /checkout-links/:id
Permanently deletes a checkout link. The hosted URL immediately stops working. This action cannot be undone.
id
string
required
UUID of the checkout link to delete.
curl -X DELETE https://api.dubupay.com/api/v1/checkout-links/link_uuid_here \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"