Partner API
The Partner API lets you programmatically manage referrals, track commissions, and automate payouts. Authenticate with your partner API key and integrate our partner services into your own systems.
Authentication
Partner API keys use the prefix qapi_pa_. Create one in the Partner Portal under Settings → API Keys. Pass it in the X-Api-Key header:
X-Api-Key: qapi_pa_your_api_key_hereKey endpoints
Referrals
curl -H "X-Api-Key: qapi_pa_..." \
"https://api.quantumapi.eu/api/v1/partner/referrals?page=1&pageSize=20"
# Response
{
"data": [
{
"id": "8f3c2a1e-5b7d-4e9a-9c61-2d4f8b0a7e13",
"referralCodeId": "c41e9b72-0a3f-4d85-b6e2-7f19a5c3d840",
"referralCode": "BLOG-FEB",
"referredTenantId": "3a7d5e90-1c2b-4f6e-8d4a-9b0c7e2f1a56",
"tenantName": "Acme GmbH",
"attributionSource": "ReferralCode",
"attributedAt": "2026-01-15T10:30:00+00:00",
"commission1stYearEndsAt": "2027-01-15T10:30:00+00:00",
"commission2ndYearEndsAt": "2028-01-15T10:30:00+00:00",
"status": "Active"
}
],
"total": 42,
"page": 1,
"pageSize": 20,
"totalPages": 3
}Commissions
curl -H "X-Api-Key: qapi_pa_..." \
"https://api.quantumapi.eu/api/v1/partner/commissions?periodFrom=2026-01-01T00:00:00Z&periodTo=2026-02-01T00:00:00Z"
# Response
{
"data": [
{
"id": "e2b8d4f1-7a3c-4b95-8e0d-6c1f9a2b5d37",
"referralId": "8f3c2a1e-5b7d-4e9a-9c61-2d4f8b0a7e13",
"periodStart": "2026-01-01T00:00:00+00:00",
"periodEnd": "2026-02-01T00:00:00+00:00",
"baseAmount": 299.00,
"commissionRate": 0.40,
"commissionAmount": 119.60,
"status": "Pending",
"molliePayoutId": null,
"paidAt": null,
"createdAt": "2026-02-01T02:00:00+00:00"
}
],
"total": 12,
"page": 1,
"pageSize": 20,
"totalPages": 1
}Referral codes
curl -X POST -H "X-Api-Key: qapi_pa_..." \
-H "Content-Type: application/json" \
-d '{"code": "blog-feb"}' \
https://api.quantumapi.eu/api/v1/partner/codes
# Response (201 Created; codes are stored upper-case)
{
"id": "c41e9b72-0a3f-4d85-b6e2-7f19a5c3d840",
"code": "BLOG-FEB",
"isActive": true,
"createdAt": "2026-02-01T09:00:00+00:00"
}Webhooks
Configure webhook endpoints in your Partner Portal to receive real-time notifications. All payloads are signed with HMAC-SHA256 using your webhook secret.
Available events
referral.createdA new customer signed up via your link
referral.convertedReferred customer subscribed to a paid plan
commission.calculatedMonthly commission has been calculated
payout.completedPayment has been sent to your account
import { createHmac } from 'crypto'
function verifyWebhook(payload, signature, secret) {
const expected = createHmac('sha256', secret)
.update(payload)
.digest('hex')
return signature === `sha256=${expected}`
}
// In your webhook handler:
const isValid = verifyWebhook(
req.body,
req.headers['x-quantumapi-signature'],
process.env.WEBHOOK_SECRET
)Rate limits
Partner API endpoints are rate-limited to 100 requests per minute per API key. Webhook deliveries are retried 3 times with exponential backoff (1s, 10s, 60s).