Plugin Billing

Create plugin billing record

POST
http://localhost:3000/api/plugins/{pluginId}/subscriptions/{subscriptionId}/billings

Body

application/json
subscriptionIdstringrequired

Associated subscription ID

Example
uuid-string
amountnumber>= 0required

Billing amount

Example
99.99
currencystringUSDrequired

Currency code

Example
USD
billingDatestring<date-time>required

Billing date

Example
2025-01-01T00:00:00Z
dueDatestring<date-time>required

Due date for payment

Example
2025-01-15T00:00:00Z
paymentDueDatestring<date-time>

Payment due date

Example
2025-01-30T00:00:00Z
statusstringpendingprocessedpaidoverduefailedcancelledrefundedpartially_paidpendingrequired

Billing status

billingPeriodstringdailyweeklymonthlyquarterlyyearlyone-timerequired

Billing period

Example
monthly
billingPeriodStartstring<date-time>required

Billing period start date

Example
2025-01-01T00:00:00Z
billingPeriodEndstring<date-time>required

Billing period end date

Example
2025-01-31T23:59:59Z
invoiceNumberstring

Invoice number

Example
INV-202501-0001
invoiceUrlstring

Invoice URL

Example
https://example.com/invoices/inv-123
taxAmountnumber>= 0

Tax amount

Example
9.99
taxRatenumber[0, 1]

Tax rate (as decimal)

Example
0.1
discountAmountnumber>= 0

Discount amount

Example
5
discountCodestring

Discount code

Example
SAVE10
descriptionstring

Billing description/notes

Example
Monthly subscription fee for Premium plan
paymentReferencestring

Payment reference

Example
PAY_12345
metadataobject

Billing metadata

Example
{
  "source": "automated",
  "campaign": "summer2025"
}
tenantIdstringrequired

Tenant ID

Example
uuid-string
organizationIdstring

Organization ID

Example
uuid-string

Response

201Createdschemas

Plugin billing record created successfully

Response fields application/json
selectobject
relationsobject
whereobjectrequired
orderobject
withDeletedboolean
takenumber[0, 100]
skipnumber>= 0

Authorization

bearerhttp (bearer) in header

Enter JWT token

Copyright © 2023-Present Ever Co. LTD.Docs by Sourcey