Ponkan
Education

Selling Digital Products with License Keys

Learn how to sell software, plugins, and digital goods with automatic license key delivery using Ponkan.

SC

Sarah Chen

March 18, 2026

Selling Digital Products with License Keys

Selling digital products is different from physical goods. There's no shipping, no inventory to manage — but you still need a way to deliver what the customer bought. For software, plugins, themes, and other digital goods, that usually means license keys.

Ponkan handles this natively. When a customer purchases a digital product, license keys are assigned and delivered automatically — no manual work, no custom code.

How it works

The flow is straightforward:

  1. You create a product and set its type to digital_license
  2. You upload license keys to that product (or let Ponkan auto-generate them)
  3. A customer purchases the product through a checkout link or invoice
  4. Ponkan assigns available license keys to the order and emails them to the customer

Everything happens in the background. The customer gets their keys within seconds of payment.

Setting up a digital product

Step 1: Create the product

Create a product with the digital_license type:

curl -X POST https://yourapp.com/api/v1/products \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Pro Plugin License", "description": "Lifetime license for the Pro Plugin", "price_cents": 4900, "product_type": "digital_license" }'

The product_type field is what tells Ponkan to trigger license key delivery on purchase.

Step 2: Add license keys

You can pre-load license keys for your product. In the Ponkan dashboard, go to your product and paste keys one per line. The system deduplicates them automatically.

If you don't pre-load keys, Ponkan auto-generates UUID-based license keys when a customer purchases. This is useful for products where you don't need custom key formats.

Bundle the product into a checkout link like any other product:

curl -X POST https://yourapp.com/api/v1/checkout_links \ -H "Authorization: Bearer YOUR_TOKEN" \ -d label="Pro Plugin" \ -d 'product_ids[]=PRODUCT_ID'

Share the checkout URL and you're selling.

What happens at purchase

When a customer completes payment:

  1. An order is created with the purchased items
  2. Ponkan checks if the order contains digital_license products
  3. For each digital product, it grabs available license keys from your pool
  4. If no pre-loaded keys are available, it auto-generates new ones
  5. Keys are assigned to the order items with an assigned_at timestamp
  6. The customer receives an email with all their license keys, grouped by product

For orders with quantity greater than 1, multiple keys are assigned — one per unit purchased.

Validating license keys

Your application needs to verify that a license key is legitimate. Ponkan provides a validation endpoint for this:

curl -X POST https://yourapp.com/api/v1/license_keys/validate \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "key": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }'

The response tells you everything you need:

{ "data": { "valid": true, "status": "assigned", "product": { "id": "prod-uuid", "name": "Pro Plugin License" }, "assigned_at": "2026-03-18T14:30:00.000Z" } }

The valid field is true only when the key has been properly assigned to a customer. An available key that hasn't been purchased yet returns valid: false.

If the key doesn't exist at all, you get a 404.

Building license validation into your app

Here's a simple example of checking a license key in your software:

async function validateLicense(key: string): Promise<boolean> { const res = await fetch("https://yourapp.com/api/v1/license_keys/validate", { method: "POST", headers: { Authorization: `Bearer ${API_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ key }), }); if (!res.ok) return false; const { data } = await res.json(); return data.valid; }

License key states

Each license key has one of three statuses:

StatusMeaning
availableIn the pool, not yet purchased
assignedPurchased and delivered to a customer
revokedManually revoked by you

You can revoke a key if a customer requests a refund or if you detect abuse. Revoked keys fail validation.

Customer access to license keys

Customers can retrieve their license keys through two channels:

Email delivery

Immediately after purchase, Ponkan sends an email with all assigned keys grouped by product. The email includes the product name, the license key, and the assignment date.

Customer portal

If you've built a customer-facing account area using the customer session API, customers can look up their keys anytime:

# List all license keys for the authenticated customer curl https://yourapp.com/api/v1/customer/license_keys \ -H "Authorization: Bearer CUSTOMER_SESSION_TOKEN"

They can also see keys attached to specific orders:

# Get order details including license keys curl https://yourapp.com/api/v1/customer/orders/ORDER_ID \ -H "Authorization: Bearer CUSTOMER_SESSION_TOKEN"

The response includes a license_keys array with the product name, key, and assignment timestamp.

Invoices with license keys

License keys aren't limited to checkout links. When you create an invoice with digital_license products and the customer pays, the same automatic delivery kicks in:

curl -X POST https://yourapp.com/api/v1/invoices \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "customer_id": "CUSTOMER_UUID", "due_date": "2026-04-01", "items": [ { "product_id": "DIGITAL_PRODUCT_UUID", "quantity": 5, "unit_price_cents": 4900 } ] }'

When this invoice is paid, 5 license keys are assigned and emailed to the customer.

Managing your key inventory

In the Ponkan dashboard, each digital product shows:

  • Available keys — keys in the pool, ready to be assigned
  • Total keys — all keys across all statuses

If your available count drops to zero, Ponkan auto-generates keys for new purchases so you never miss a sale. But if you need specific key formats (e.g., keys from a third-party service), keep your pool stocked.

Use cases

  • Software licenses — Sell desktop apps, CLI tools, or IDE plugins with per-seat licensing
  • Game keys — Distribute Steam, Epic, or custom game activation codes
  • SaaS access — Provide API keys or activation tokens for your service
  • Course access — Deliver enrollment codes for online learning platforms
  • Themes and plugins — Sell WordPress themes, Figma plugins, or browser extensions

What's next

License keys are just one part of selling digital products with Ponkan. Combine them with checkout links for instant storefronts, or use the invoicing API for B2B software licensing. If you're building a full storefront, check out our guide on building with the Ponkan API.

Education