Payment links are created in the dashboard under Payment Links → New Link, or via the API.

Via API

POST /api/v2/digital/links
Cookie: session={dashboard_session}
Content-Type: application/json
{
  "product_id": "prod_01j2k3m4n5p6",
  "slug": "my-python-course",
  "title": "Advanced Python Course",
  "payment_methods": "mobile_money,card",
  "max_uses": 100,
  "expires_at": "2025-12-31T23:59:59Z"
}

Response

{
  "success": true,
  "data": {
    "id": "lnk_01j2k3m4n5p6",
    "product_id": "prod_01j2k3m4n5p6",
    "slug": "my-python-course",
    "title": "Advanced Python Course",
    "payment_methods": "mobile_money,card",
    "is_active": true,
    "max_uses": 100,
    "use_count": 0,
    "expires_at": "2025-12-31T23:59:59Z",
    "created_at": "2024-07-15T10:00:00Z"
  }
}
The checkout page is immediately available at:
https://shop.yourdomain.com/checkout/my-python-course
Your digital products app serves checkout pages at {NEXT_PUBLIC_DIGITAL_URL}/checkout/{slug}.
slug
string
required
URL-safe string used as the link path. Must be unique. Accepts lowercase letters, numbers, and hyphens (a-z0-9-). Max 64 characters.
title
string
required
Display title for the checkout page. Can be different from the product name.
payment_methods
string
Comma-separated list of accepted methods. Options: mobile_money, card, or mobile_money,card. Defaults to all methods.
max_uses
integer
Maximum number of paid orders allowed on this link. 0 means unlimited.
expires_at
string
ISO 8601 timestamp after which the link becomes inactive. Omit for no expiry.

Checkout Page Experience

The link renders a mobile-optimized checkout page with:
  • Product name, description, and preview image
  • Price display
  • Payment method selector (if both mobile + card enabled)
  • Mobile: phone number input + operator auto-detection
  • Card: card number, expiry, CVV fields with brand detection (Visa/MC)
  • Submit button with loading states
After payment, buyers are taken to a success page showing their delivery content (file download, license key, or link).
GET /api/v2/digital/links
GET /api/v2/digital/links/{id}
PUT /api/v2/digital/links/{id}
{
  "is_active": false,
  "max_uses": 50
}
DELETE /api/v2/digital/links/{id}
Get aggregate revenue stats for a specific link:
GET /api/v2/digital/links/{id}/revenue
{
  "success": true,
  "data": {
    "total_revenue": 1500000,
    "paid_orders": 30,
    "currency": "UGX"
  }
}

Embedding in a Website

Add a payment button to your existing website that opens the checkout page:
<a
  href="https://shop.yourdomain.com/checkout/my-python-course"
  target="_blank"
  rel="noopener"
  class="rohopay-btn"
>
  Buy Now — UGX 50,000
</a>
Or redirect programmatically after adding to cart:
function checkout(slug: string) {
  window.location.href = `https://shop.yourdomain.com/checkout/${slug}`;
}
Replace shop.yourdomain.com with your digital products app URL (NEXT_PUBLIC_DIGITAL_URL). From your dashboard sidebar:
  1. Go to Payment Links (under Payments group)
  2. Click New Link or use an existing product link
  3. Configure slug, title, price, and accepted payment methods
  4. Share the generated link via WhatsApp, email, social media, or embed on your site
All links, orders, and revenue stats are viewable from the same dashboard page.

Best Practices

Good: advanced-react-course, ugandan-tax-guide-2024. Bad: link1, abc123. Descriptive slugs improve trust and SEO.
For early-bird pricing or limited editions, set max_uses to automatically deactivate the link when the quota is reached.
Open your link URL in an incognito window and complete a test payment to verify the full buyer experience before sharing publicly.