On the “Configuration - Webhook” tab, you can define webhook endpoints to receive billing-related events — for example, an Invoice Paid Reminder when an invoice status changes to “paid” after a successful payment. Each webhook event will be sent to the merchant’s configured endpoint and expects an HTTP 200 response with the body containing “success”. If this condition is not met, the system will retry the event delivery up to 40 times, with a 1-minute interval between each attempt.Documentation Index
Fetch the complete documentation index at: https://docs.unibee.dev/llms.txt
Use this file to discover all available pages before exploring further.
List of Webhook events
Subscription Events
| Event | Description |
|---|---|
subscription.created | Sent when a subscription is created. |
subscription.updated | Sent when a subscription is updated (status or billingCycle changed). |
subscription.auto_renew.success | Sent when a subscription is auto-renewed successfully. |
subscription.auto_renew.failure | Sent when a subscription auto-renewal fails. |
subscription.cancelled | Sent when a subscription is cancelled. |
subscription.expired | Sent when a subscription expires. |
subscription.failed | Sent when a subscription failed. |
Invoice Events
| Event | Description |
|---|---|
invoice.created | Sent when an invoice is created (status is editable). |
invoice.paid | Sent when an invoice is paid. |
invoice.process | Sent when an invoice is processing (status is no longer editable). |
invoice.cancelled | Sent when an invoice is cancelled. |
invoice.failed | Sent when an invoice payment failed. |
Subscription Pending Update Events
| Event | Description |
|---|---|
subscription.pending_update.create | Sent when a change subscription purchase is created. |
subscription.pending_update.success | Sent when a change subscription purchase is successful. |
subscription.pending_update.cancelled | Sent when a change subscription purchase is cancelled. |
One-Time Add-on Events
| Event | Description |
|---|---|
subscription.onetime_addon.created | Sent when a one-time add-on purchase is created. |
subscription.onetime_addon.success | Sent when a one-time add-on purchase is successful. |
subscription.onetime_addon.cancelled | Sent when a one-time add-on purchase is cancelled. |
subscription.onetime_addon.expired | Sent when a one-time add-on purchase expires. |
Invoice WebhookEvent sample
{
"autoCharge": true,
"billingCycleAnchor": 0,
"bizType": 3,
"countryCode": "AX",
"createFrom": "AutoRenew",
"createTime": 1745186317,
"cryptoAmount": 0,
"cryptoCurrency": "",
"currency": "EUR",
"dayUtilDue": 3,
"discount": null,
"discountAmount": 0,
"discountCode": "",
"eventId": "ev20250420dcPMTpTq4u8KEHg",
"eventType": "invoice.process",
"finishTime": 1745186317,
"gateway": {
"IsSetupFinished": true,
"archive": false,
"autoChargeEnabled": true,
"bank": null,
"countryConfig": {},
"createTime": 0,
"currency": "",
"currencyExchange": [],
"currencyExchangeEnabled": false,
"description": "Use public and private keys to secure the bank card payment.",
"displayName": "BC02",
"gatewayIcons": [
"https://api.unibee.top/oss/file/d6yhl1qz7qmcg6zafr.svg",
"https://api.unibee.top/oss/file/d6yhlf1t8n3ev3ueii.svg",
"https://api.unibee.top/oss/file/d6yhlpshof3muufphd.svg"
],
"gatewayId": 112,
"gatewayKey": "pk_t**********************************************************************************************************jVUc",
"gatewayLogo": "https://api.unibee.top/oss/file/d76q2e3zyv4ylc6vyh.png",
"gatewayName": "stripe",
"gatewayPaymentTypes": [],
"gatewaySecret": "sk_t**********************************************************************************************************RIoz",
"gatewayType": 1,
"gatewayWebhookIntegrationLink": "",
"gatewayWebsiteLink": "https://stripe.com",
"minimumAmount": 0,
"name": "Stripe",
"privateSecretName": "Private Key",
"publicKeyName": "Public Key",
"setupGatewayPaymentTypes": null,
"sort": 1,
"subGateway": "",
"subGatewayName": "",
"webhookEndpointUrl": "https://api.unibee.top/payment/gateway_webhook_entry/112/notifications",
"webhookSecret": ""
},
"gatewayId": 112,
"gatewayInvoicePdf": "",
"gatewayPaymentId": "",
"gatewayPaymentType": "",
"gatewayStatus": "",
"gatewayUserId": "",
"gmtCreate": "2025-04-20 21:58:37",
"gmtModify": "2025-04-20 21:58:37",
"id": 5075,
"invoiceId": "81745186317599",
"invoiceName": "SubscriptionCycle",
"isDeleted": 0,
"lines": [
{
"amount": 2000,
"amountExcludingTax": 2000,
"currency": "EUR",
"description": "1 * team plan(Copy) (2029-11-15-2029-12-15)",
"discountAmount": 0,
"metricCharge": null,
"name": "team plan(Copy)",
"originAmount": 2000,
"originUnitAmountExcludeTax": 0,
"pdfDescription": "1 * team plan(Copy) (2029-11-15-2029-12-15)",
"periodEnd": 0,
"periodStart": 0,
"plan": {
"amount": 2000,
"bindingAddonIds": "",
"bindingOnetimeAddonIds": "",
"cancelAtTrialEnd": 0,
"checkoutUrl": "https://api.unibee.top/hosted/checkout?planId=272&env=daily",
"createTime": 1722928478,
"currency": "EUR",
"description": "team plan",
"disableAutoCharge": 0,
"externalPlanId": "5456456",
"extraMetricData": "",
"gasPayer": "",
"homeUrl": "http://www.google.com",
"id": 272,
"imageUrl": "http://www.google.com",
"internalName": "",
"intervalCount": 1,
"intervalUnit": "month",
"merchantId": 15656,
"metadata": {},
"metricLimits": null,
"metricMeteredCharge": null,
"metricRecurringCharge": null,
"planName": "team plan(Copy)",
"productId": 248903,
"publishStatus": 2,
"status": 2,
"taxPercentage": 0,
"trialAmount": 0,
"trialDemand": "",
"trialDurationTime": 0,
"type": 1
},
"proration": false,
"quantity": 1,
"tax": 0,
"taxPercentage": 0,
"unitAmountExcludingTax": 2000
}
],
"link": "https://api.unibee.top/in/81745186317599?st=iv20250420GVGq8UmPg9MnI8pAH7NlEKVx9Uk02q&t=1745186319",
"merchant": {
"address": "shandong555",
"businessNum": "",
"companyLogo": "https://api.unibee.top/oss/file/d7xyoggmb7ibxzsxmh.jpg",
"companyName": "UniBee Team2",
"countryCode": "",
"countryName": "",
"createTime": 0,
"email": "qa.testing@unibee.dev",
"homeUrl": "",
"host": "testing.unibee.top",
"id": 15656,
"idcard": "",
"location": "",
"name": "Unibee Team2",
"phone": "13800138003",
"timeZone": "",
"type": 0,
"userId": 0
},
"merchantId": 15656,
"message": "",
"metadata": {},
"originAmount": 0,
"originalPaymentInvoice": null,
"partialCreditPaidAmount": 0,
"payment": null,
"paymentId": "",
"periodEnd": 1892005950,
"periodStart": 1889413950,
"productName": "team plan(Copy)",
"promoCreditDiscountAmount": 2000,
"promoCreditTransaction": {
"accountType": 2,
"bizId": "crpayment1745186317910",
"by": "joshua.yu+124@wowow.io",
"createTime": 1745186317,
"creditAmountAfter": 14,
"creditAmountBefore": 16,
"creditId": 2103612,
"currency": "EUR",
"deltaAmount": -2,
"deltaCurrencyAmount": -2000,
"description": "Subscription Invoice Promo Credit Discount",
"exchangeRate": 1000,
"id": 348,
"invoiceId": "81745186317599",
"merchantId": 15656,
"name": "InvoicePromoCreditDiscount",
"transactionId": "ev202504200CiXyOhMUEWi6Ap",
"transactionType": 2,
"userId": 2235429338
},
"prorationDate": 0,
"refund": null,
"refundId": "",
"sendEmail": "joshua.yu+124@wowow.io",
"sendNote": "",
"sendPdf": "https://api.unibee.top/in/pdf/81745186317599?st=iv20250420GVGq8UmPg9MnI8pAH7NlEKVx9Uk02q&t=1745186319",
"sendStatus": 0,
"status": 2,
"subscription": {
"addonData": "null",
"amount": 0,
"billingCycleAnchor": 1731647551,
"cancelAtPeriodEnd": 0,
"cancelOrExpireTime": 0,
"cancelReason": "",
"countryCode": "AS",
"createTime": 1731647551,
"currency": "EUR",
"currentPeriodEnd": 1889413950,
"currentPeriodPaid": 1,
"currentPeriodStart": 1731647551,
"defaultPaymentMethodId": "",
"dunningTime": 1733980351,
"externalSubscriptionId": "",
"features": "",
"firstPaidTime": 1731647551,
"gasPayer": "",
"gatewayId": 112,
"gatewayStatus": "",
"id": 1548,
"lastUpdateTime": 1731647551,
"latestInvoiceId": "81745186317227",
"link": "",
"merchantId": 15656,
"metadata": {},
"originalPeriodEnd": 1734239551,
"pendingUpdateId": "",
"planId": 272,
"productId": 248903,
"quantity": 1,
"returnUrl": "",
"status": 2,
"subscriptionId": "sub20241115r2xK2AOXhbhYlzV",
"taskTime": "2025-04-20 21:58:38",
"taxPercentage": 0,
"testClock": 0,
"trialEnd": 1889413950,
"type": 1,
"userId": 2235429338,
"vatNumber": ""
},
"subscriptionAmount": 2000,
"subscriptionAmountExcludingTax": 2000,
"subscriptionId": "sub20241115r2xK2AOXhbhYlzV",
"subscriptionPendingUpdate": null,
"taxAmount": 0,
"taxPercentage": 0,
"totalAmount": 0,
"totalAmountExcludingTax": 0,
"trialEnd": 0,
"uniqueId": "",
"userAccount": {
"address": "Test Address",
"avatarUrl": "",
"billingType": 1,
"birthday": "",
"city": "test city",
"companyName": "test company54345354354345354345354354345345354345354354354354354354354354354345345345345",
"countryCode": "AX",
"countryName": "Åland Islands",
"createTime": 1731477129,
"custom": "",
"email": "joshua.yu+124@wowow.io",
"externalUserId": "",
"facebook": "",
"firstName": "",
"gatewayId": 112,
"gatewayPaymentType": "",
"gender": "",
"id": 2235429338,
"isRisk": 0,
"isSpecial": 0,
"language": "",
"lastLoginAt": 0,
"lastName": "",
"linkedIn": "",
"merchantId": 15656,
"metadata": {},
"mobile": "",
"otherSocialInfo": "",
"paymentMethod": "",
"phone": "",
"profession": "",
"recurringAmount": 0,
"registrationNumber": "asd",
"school": "",
"status": 0,
"subscriptionId": "sub20241115kyGFj7HoOOFUY4Z",
"subscriptionName": "sub20241115kyGFj7HoOOFUY4Z",
"subscriptionStatus": 2,
"taxPercentage": 0,
"telegram": "",
"tikTok": "",
"timeZone": "",
"type": 1,
"userName": "",
"vATNumber": "",
"version": 0,
"weChat": "",
"whatsAPP": "",
"zipCode": "0001"
},
"userId": 2235429338,
"userMetricChargeForInvoice": {
"meteredChargeStats": [],
"recurringChargeStats": []
},
"userSnapshot": {
"address": "Test Address",
"avatarUrl": "",
"billingType": 0,
"birthday": "",
"city": "test city",
"companyName": "test company54345354354345354345354354345345354345354354354354354354354354354345345345345",
"countryCode": "AX",
"countryName": "Åland Islands",
"createTime": 0,
"custom": "",
"email": "joshua.yu+124@wowow.io",
"externalUserId": "",
"facebook": "",
"firstName": "",
"gatewayId": 112,
"gatewayPaymentType": "",
"gender": "",
"id": 0,
"isRisk": 0,
"isSpecial": 0,
"language": "",
"lastLoginAt": 0,
"lastName": "",
"linkedIn": "",
"merchantId": 0,
"metadata": {},
"mobile": "",
"otherSocialInfo": "",
"paymentMethod": "",
"phone": "",
"profession": "",
"recurringAmount": 0,
"registrationNumber": "",
"school": "",
"status": 0,
"subscriptionId": "",
"subscriptionName": "",
"subscriptionStatus": 0,
"taxPercentage": 0,
"telegram": "",
"tikTok": "",
"timeZone": "",
"type": 1,
"userName": "",
"vATNumber": "",
"version": 0,
"weChat": "",
"whatsAPP": "",
"zipCode": "0001"
},
"vatNumber": ""
}
Subscription WebhookEvent sample
{
"addonParams": [],
"addons": null,
"discount": null,
"gateway": {
"countryConfig": {},
"createTime": 0,
"gatewayId": 26,
"gatewayKey": "",
"gatewayLogo": "http://unibee.top/files/invoice/stripe.png",
"gatewayName": "stripe",
"gatewayType": 1
},
"latestInvoice": {
"bizType": 3,
"cryptoAmount": 0,
"cryptoCurrency": "",
"currency": "EUR",
"dayUtilDue": 3,
"discountAmount": 0,
"discountCode": "",
"finishTime": 1713937670,
"id": 1296,
"invoiceId": "iv202404248LgKY1M5SHlT11B",
"invoiceName": "",
"lines": [
{
"amount": 106,
"amountExcludingTax": 100,
"currency": "EUR",
"description": "1 * Daily Plan (2024-04-24-2024-04-25)",
"discountAmount": 0,
"originAmount": 0,
"periodEnd": 0,
"periodStart": 0,
"plan": {
"amount": 100,
"bindingAddonIds": "",
"bindingOnetimeAddonIds": "",
"createTime": 1709618605,
"currency": "EUR",
"description": "NodeMaven Daily Plan",
"extraMetricData": "",
"gasPayer": "",
"homeUrl": "http://www.google.com",
"id": 77,
"imageUrl": "http://www.google.com",
"intervalCount": 1,
"intervalUnit": "day",
"merchantId": 15623,
"metadata": {},
"planName": "Daily Plan",
"productDescription": "NodeMaven Daily Plan",
"productName": "Daily Plan",
"publishStatus": 2,
"status": 2,
"taxPercentage": 0,
"trialAmount": 0,
"trialDemand": "",
"trialDurationTime": 0,
"type": 1
},
"proration": false,
"quantity": 1,
"tax": 6,
"taxPercentage": 600,
"unitAmountExcludingTax": 100
}
],
"link": "http://api.unibee.top/in/iv202404248LgKY1M5SHlT11B?st=iv20240424asbLUDQmT2qt9YC",
"originAmount": 106,
"paymentId": "pay20240424tFhM9vRtZEzghvU",
"paymentLink": "http://api.unibee.top/pay/pay20240424tFhM9vRtZEzghvU",
"periodEnd": 1714027667,
"periodStart": 1713941267,
"prorationDate": 0,
"prorationScale": 0,
"sendStatus": 1,
"status": 3,
"subscriptionAmount": 106,
"subscriptionAmountExcludingTax": 100,
"taxAmount": 6,
"taxPercentage": 600,
"totalAmount": 106,
"totalAmountExcludingTax": 100
},
"plan": {
"amount": 100,
"bindingAddonIds": "",
"bindingOnetimeAddonIds": "",
"createTime": 1709618605,
"currency": "EUR",
"description": "NodeMaven Daily Plan",
"extraMetricData": "",
"gasPayer": "",
"homeUrl": "http://www.google.com",
"id": 77,
"imageUrl": "http://www.google.com",
"intervalCount": 1,
"intervalUnit": "day",
"merchantId": 15623,
"metadata": {},
"planName": "Daily Plan",
"productDescription": "NodeMaven Daily Plan",
"productName": "Daily Plan",
"publishStatus": 2,
"status": 2,
"taxPercentage": 0,
"trialAmount": 0,
"trialDemand": "",
"trialDurationTime": 0,
"type": 1
},
"subscription": {
"addonData": "[]",
"amount": 106,
"billingCycleAnchor": 1709621267,
"cancelAtPeriodEnd": 0,
"cancelReason": "",
"countryCode": "CN",
"createTime": 1709621267,
"currency": "EUR",
"currentPeriodEnd": 1714027667,
"currentPeriodStart": 1713941267,
"defaultPaymentMethodId": "pm_1Oqrl4Hhgikz9ijMVnQYPe8P",
"dunningTime": 1714024067,
"firstPaidTime": 1709621271,
"gasPayer": "",
"gatewayId": 26,
"gatewayItemData": "",
"gatewayStatus": "",
"id": 173,
"lastUpdateTime": 0,
"latestInvoiceId": "iv202404248LgKY1M5SHlT11B",
"link": "https://checkout.stripe.com/c/pay/cs_test_a1VZvIFpe7ezde1bJtgfxr7Xmj1ww0Pt9oKaX62GF6eCvHSNBB6yrSOUdv#fidkdWxOYHwnPyd1blpxYHZxWjA0SktHZ1VNbWJsbn88bG9IV1VMTWQwb2JWPE5PRm1Vd3ZVTkhdN3EwZDxTYGRRZDRDYnY9c0dSSzY9PGg2TjdzYHFxX0o0XDNwRGtXPEhLZnNSQ0pUckRCNTVscFU3b1NQZicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl",
"merchantId": 15623,
"metadata": {},
"pendingUpdateId": "",
"planId": 77,
"quantity": 1,
"returnUrl": "http://nodemaven.unibee.top/payment-result",
"status": 2,
"subscriptionId": "sub20240305xqG8Y3O0LW2UdKy",
"taskTime": "2024-04-24 06:17:51",
"taxPercentage": 600,
"testClock": 0,
"trialEnd": 1713941266,
"type": 1,
"userId": 2235428026,
"vatNumber": ""
},
"unfinishedSubscriptionPendingUpdate": null,
"user": {
"address": "16-1",
"avatarUrl": "",
"billingType": 1,
"birthday": "",
"companyName": "",
"countryCode": "CN",
"countryName": "China",
"createTime": 1709240723,
"custom": "",
"email": "jack.fu@wowow.io",
"externalUserId": "1709272139",
"facebook": "",
"firstName": "jack",
"gatewayId": "",
"gender": "",
"id": 2235428026,
"isRisk": 0,
"isSpecial": 0,
"lastLoginAt": 0,
"lastName": "fu",
"linkedIn": "",
"merchantId": 15623,
"mobile": "",
"otherSocialInfo": "",
"paymentMethod": "",
"phone": "15967127553",
"profession": "",
"reMark": "",
"recurringAmount": 13356,
"school": "",
"status": 0,
"subscriptionId": "sub20240305xqG8Y3O0LW2UdKy",
"subscriptionName": "sub20240305xqG8Y3O0LW2UdKy",
"subscriptionStatus": 0,
"telegram": "",
"tikTok": "",
"timeZone": "",
"userName": "",
"vATNumber": "",
"version": 0,
"weChat": "",
"whatsAPP": ""
}
}
User metrics WebhookEvent sample
{
"addons": null,
"isPaid": false,
"plan": {
"amount": 1989,
"bindingAddonIds": "58,65",
"createTime": 1708938543,
"currency": "EUR",
"description": "eee",
"extraMetricData": "",
"homeUrl": "http://www.google.com",
"id": 72,
"imageUrl": "http://www.google.com",
"intervalCount": 1,
"intervalUnit": "month",
"merchantId": 15621,
"planName": "abc",
"productDescription": "eee",
"productName": "abc",
"publishStatus": 2,
"status": 2,
"taxPercentage": 0,
"type": 1
},
"subscription": {
"addonData": "[]",
"amount": 2426,
"billingCycleAnchor": 1709717308,
"cancelAtPeriodEnd": 0,
"cancelReason": "User Cancel Create Subscription",
"countryCode": "EE",
"createTime": 1709717309,
"currency": "EUR",
"currentPeriodEnd": 1712395708,
"currentPeriodStart": 1709717308,
"dunningTime": 1712136508,
"firstPaidTime": 0,
"gatewayId": 25,
"gatewayItemData": "",
"gatewayStatus": "",
"id": 178,
"lastUpdateTime": 0,
"latestInvoiceId": "iv20240306ikkBucorrS7eFQo",
"link": "https://checkout.stripe.com/c/pay/cs_test_a1YYtNfq4fsRlVWoKl20bsVTC3TlIe4rANARY1igJ7VK3peUIMuXokhNrR#fidkdWxOYHwnPyd1blpxYHZxWjA0SktHZ1VNbWJsbn88bG9IV1VMTWQwb2JWPE5PRm1Vd3ZVTkhdN3EwZDxTYGRRZDRDYnY9c0dSSzY9PGg2TjdzYHFxX0o0XDNwRGtXPEhLZnNSQ0pUckRCNTVscFU3b1NQZicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl",
"merchantId": 15621,
"pendingUpdateId": "",
"planId": 72,
"quantity": 1,
"returnUrl": "http://localhost:3000/payment-result",
"status": 4,
"subscriptionId": "sub20240306rBLuMm12h70QlJZ",
"taskTime": null,
"taxPercentage": 2200,
"testClock": 0,
"trialEnd": 1709717307,
"type": 1,
"userId": 2235427988,
"vatNumber": ""
},
"user": {
"address": "hebing",
"createTime": 0,
"email": "jack.fu@wowow.io",
"externalUserId": "17",
"firstName": "jack",
"id": 2235427988,
"lastName": "fu",
"merchantId": 15621
},
"userMerchantMetricStats": [
{
"CurrentUseValue": 0,
"MetricLimit": {
"MerchantId": 15621,
"MetricId": 15684,
"PlanLimits": [
{
"createTime": 1708938544,
"gmtModify": 1708941034,
"id": 15686,
"merchantId": 15621,
"merchantMetricVo": {
"aggregationProperty": "userId",
"aggregationType": 1,
"code": "max-20",
"createTime": 1708590047,
"gmtModify": 1708662161,
"id": 15684,
"merchantId": 15621,
"metricDescription": "max-20 description",
"metricName": "max_20_hits",
"type": 1
},
"metricId": 15684,
"metricLimit": 88,
"planId": 72
}
],
"TotalLimit": 88,
"UserId": 2235427988,
"aggregationProperty": "userId",
"aggregationType": 1,
"code": "max-20",
"metricName": "max_20_hits",
"type": 1
}
},
{
"CurrentUseValue": 0,
"MetricLimit": {
"MerchantId": 15621,
"MetricId": 15685,
"PlanLimits": [
{
"createTime": 1708938543,
"gmtModify": 1708941035,
"id": 15685,
"merchantId": 15621,
"merchantMetricVo": {
"aggregationProperty": "userId",
"aggregationType": 4,
"code": "5g-sum",
"createTime": 1708665708,
"gmtModify": 1708753197,
"id": 15685,
"merchantId": 15621,
"metricDescription": "max 5g storage(upgraded2)",
"metricName": "5G-sum(upgraded2)",
"type": 1
},
"metricId": 15685,
"metricLimit": 99,
"planId": 72
}
],
"TotalLimit": 99,
"UserId": 2235427988,
"aggregationProperty": "userId",
"aggregationType": 4,
"code": "5g-sum",
"metricName": "5G-sum(upgraded2)",
"type": 1
}
}
]
}

