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.

The products API lets you build a catalog of the goods and services you sell. Once you create a product, you can reference it by ID when adding line items to invoices or building checkout links — saving you from re-entering details each time. Products support physical goods, digital downloads, and services, with optional tax and discount configuration. All routes require authentication.

Product object

id
string
Unique product identifier (UUID).
name
string
Product name.
description
string
Optional description of the product (up to 2,000 characters).
type
string
Product type. One of physical, digital, or service.
price
number
Unit price in the product’s currency.
currency
string
Currency of the price. One of NGN or USD. Defaults to your account’s default currency.
status
string
One of active, inactive, or archived. Only active products can be used in new invoices and checkout links.
stock_quantity
number
Optional stock count. null means unlimited stock.
image_urls
array
Up to 10 image URLs associated with this product.
tax_type
string
How tax is applied: none, percentage, or fixed.
tax_rate
number
Tax amount. Interpreted as a percentage when tax_type is percentage, or as a fixed currency amount when fixed.
discount_type
string
How discounts are applied: none, percentage, or fixed.
discount
number
Discount amount. Interpreted as a percentage or fixed amount depending on discount_type.
created_at
string
ISO 8601 creation timestamp.
updated_at
string
ISO 8601 last-updated timestamp.

Create a product

POST /products

Request body

name
string
required
Product name. Maximum 255 characters.
description
string
Optional product description. Maximum 2,000 characters.
type
string
Product type: physical, digital, or service.
price
number
required
Unit price. Must be a positive number.
currency
string
NGN or USD. Defaults to your account currency.
stock_quantity
number
Stock count. Omit for unlimited stock.
image_urls
array
Array of image URLs. Maximum 10 items.
tax_type
string
none, percentage, or fixed. Defaults to none.
tax_rate
number
Tax amount. Required when tax_type is not none.
discount_type
string
none, percentage, or fixed. Defaults to none.
discount
number
Discount amount. Required when discount_type is not none.

Example

curl -X POST https://api.dubupay.com/api/v1/products \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Annual SaaS Subscription",
    "description": "Access to all premium features for one year.",
    "type": "digital",
    "price": 120000,
    "currency": "NGN"
  }'
Returns 201 Created with the new product object.

List products

GET /products
Returns a paginated list of your products.

Query parameters

status
string
Filter by status: active, inactive, or archived.
Full-text search across product names.
page
number
Page number (1-indexed). Defaults to 1.
limit
number
Results per page. Maximum 100.

Example

curl "https://api.dubupay.com/api/v1/products?status=active&page=1&limit=20" \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

Get a product

GET /products/:id
Retrieve a single product by its UUID.

Path parameters

id
string
required
UUID of the product.

Example

curl https://api.dubupay.com/api/v1/products/prod_uuid_here \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

Update a product

PATCH /products/:id
Update one or more fields on an existing product. Only the fields you include in the request body are modified.

Path parameters

id
string
required
UUID of the product to update.

Request body

All fields are optional. You can update status to archived to retire a product without deleting it.
name
string
New product name.
description
string
New description. Pass null to clear it.
type
string
physical, digital, or service.
status
string
active, inactive, or archived.
price
number
New unit price.
currency
string
NGN or USD.
stock_quantity
number
Updated stock count. Pass null for unlimited.

Example

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

Delete a product

DELETE /products/:id
Permanently deletes a product. This action cannot be undone. Consider setting status to archived instead if you want to retain historical data.

Path parameters

id
string
required
UUID of the product to delete.

Example

curl -X DELETE https://api.dubupay.com/api/v1/products/prod_uuid_here \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"
Returns 200 OK on success.