cURL
curl --request POST \ --url https://pandabase.io/api/products/{productId}/licenses \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Storefront-Id: <x-storefront-id>' \ --data '{ "customer_id": "cust_123456", "key": "CUSTOM-KEY-HERE", "metadata": {}, "expires_at": "2023-11-07T05:31:56Z" }'
{ "ok": true, "data": { "id": "lic_abc123", "key": "XXXX-XXXX-XXXX-XXXX", "product_id": "prod_xyz789", "status": "active", "customer_id": "cust_123456", "metadata": {}, "expires_at": "2025-12-31T23:59:59Z", "activated_at": "2023-11-07T05:31:56Z", "created_at": "2023-11-07T05:31:56Z" } }
Create a new license for a product
V3 API key authentication. Format: sk_v3_xxxxx
sk_v3_xxxxx
Your storefront/shop ID
"cust_123456"
Custom license key (optional, will be auto-generated if not provided)
"CUSTOM-KEY-HERE"
Custom metadata
Expiration date (optional, null for permanent)
License created successfully
true
Show child attributes