Plugin Billing
Create plugin billing record
POST
http://localhost:3000/api/plugins/{pluginId}/subscriptions/{subscriptionId}/billings
Body
application/json
subscriptionIdstringrequiredAssociated subscription ID
Example
uuid-stringamountnumber>= 0requiredBilling amount
Example
99.99currencystringUSDrequiredCurrency code
Example
USDbillingDatestring<date-time>requiredBilling date
Example
2025-01-01T00:00:00ZdueDatestring<date-time>requiredDue date for payment
Example
2025-01-15T00:00:00ZpaymentDueDatestring<date-time>Payment due date
Example
2025-01-30T00:00:00Zstatusstringpendingprocessedpaidoverduefailedcancelledrefundedpartially_paidpendingrequiredBilling status
billingPeriodstringdailyweeklymonthlyquarterlyyearlyone-timerequiredBilling period
Example
monthlybillingPeriodStartstring<date-time>requiredBilling period start date
Example
2025-01-01T00:00:00ZbillingPeriodEndstring<date-time>requiredBilling period end date
Example
2025-01-31T23:59:59ZinvoiceNumberstringInvoice number
Example
INV-202501-0001invoiceUrlstringInvoice URL
Example
https://example.com/invoices/inv-123taxAmountnumber>= 0Tax amount
Example
9.99taxRatenumber[0, 1]Tax rate (as decimal)
Example
0.1discountAmountnumber>= 0Discount amount
Example
5discountCodestringDiscount code
Example
SAVE10descriptionstringBilling description/notes
Example
Monthly subscription fee for Premium planpaymentReferencestringPayment reference
Example
PAY_12345metadataobjectBilling metadata
Example
{
"source": "automated",
"campaign": "summer2025"
}tenantIdstringrequiredTenant ID
Example
uuid-stringorganizationIdstringOrganization ID
Example
uuid-stringResponse
201Createdschemas
Plugin billing record created successfully
Authorization
bearerhttp (bearer) in headerEnter JWT token