Billing

Handle platform subscription

Billing & Subscription

It manages various aspects of billing and subscriptions. It includes verify coupon validity, create, retrieve, and cancel subscription charges, manage one-time charges, access and manage invoices, work with customer details, and interact with subscription plans, allowing you to retrieve details, manage features, activate or cancel plans, access enterprise plans, and update plan statuses as needed.

Operations
GET
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/charge/{charge_id}
# Obtain charge details.
GET
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/subscription/{subscription_id}
# Retrieve subscription charge details.
POST
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/subscription/{subscription_id}/cancel
# Cancel a subscription charge.
POST
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/one_time_charge
# Generate a one-time charge.
POST
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/subscription
# Initiate subscription billing
GET

Obtain charge details.

Retrieve comprehensive details about a specific billing charge.
Parameters
company_id
string
Required
Customer unique id. In case of company it will be company id.
extension_id
string
Required
Extension _id
charge_id
string
Required
Standalone charge _id
Response
200
404
Success
ChargeDetails
_id
string
Unique identifier for the charge.
entity_type
string
The type of entity associated with the charge (e.g., 'extension', 'subscription').
Enum
entity_id
string
Unique identifier for the entity associated with the charge.
name
string
The name of the charge.
term
string
Description of the charge term.
charge_type
string
The type of charge (e.g., 'standalone', 'recurring').
Enum
pricing_type
string
The pricing model for the charge (e.g., 'one_time', 'recurring').
Enum
price
object (EntityChargePrice)
EntityChargePrice
recurring
object (ChargeRecurring)
ChargeRecurring
status
string
Current status of the charge.
Enum
capped_amount
number
Maximum amount that can be charged, if applicable.
activated_on
string
| date-time
Date and time when the charge was activated.
cancelled_on
string
| date-time
Date and time when the charge was cancelled.
billing_date
string
| date-time
Date and time when the charge was billed.
current_period
object (SubscriptionTrialPeriod)
SubscriptionTrialPeriod
modified_at
string
| date-time
Date and time when the charge details were last modified.
created_at
string
| date-time
Date and time when the charge was created.
is_test
boolean
Indicates whether the charge is for testing purposes.
company_id
string
company id.
meta
object
Additional metadata associated with the charge.
__v
number
Internal version key for the charge record.
Examples
Parameters
companyId:
"20"
extensionId:
"64b0dff8c35f99051888085c"
chargeId:
"64b54e711c0570666d5612bb"
GET
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/charge/{charge_id}
Loading...
Response
Loading...
GET

Retrieve subscription charge details.

Retrieve detailed information about subscription charges using this API.
Parameters
company_id
string
Required
Customer unique id. In case of company it will be company id.
extension_id
string
Required
Extension _id
subscription_id
string
Required
Subscription charge _id
Response
200
404
Success
SubscriptionChargeRes
_id
string
Unique identifier for the subscription charge
product_suit_id
string
ID of the product suit associated with the charge
entity_id
string
Unique identifier for the entity
entity_type
string
Type of entity (e.g., subscription, extension)
name
string
Name of the subscription charge
status
string
Current status of the subscription charge
trial_days
number
Number of trial days provided
activated_on
string
| date-time
Date when the charge was activated
cancelled_on
string
| date-time
Date when the charge was cancelled
is_test
boolean
Indicates if the charge is for testing purposes
created_at
string
| date-time
Timestamp when the charge was created
modified_at
string
| date-time
Timestamp when the charge was last modified
company_id
string
Company id
line_items
array of object
List of line items associated with the charge
Examples
Parameters
companyId:
"20"
extensionId:
"64b0dff8c35f99051888085c"
subscriptionId:
"6606ab6d89fdb100d0f39e99"
GET
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/subscription/{subscription_id}
Loading...
Response
Loading...
POST

Cancel a subscription charge.

Cancel an ongoing subscription charge for a customer.
Parameters
company_id
string
Required
Customer unique id. In case of company it will be company id.
extension_id
string
Required
Extension _id
subscription_id
string
Required
Subscription charge _id
Response
200
404
Success
SubscriptionChargeRes
_id
string
Unique identifier for the subscription charge
product_suit_id
string
ID of the product suit associated with the charge
entity_id
string
Unique identifier for the entity
entity_type
string
Type of entity (e.g., subscription, extension)
name
string
Name of the subscription charge
status
string
Current status of the subscription charge
trial_days
number
Number of trial days provided
activated_on
string
| date-time
Date when the charge was activated
cancelled_on
string
| date-time
Date when the charge was cancelled
is_test
boolean
Indicates if the charge is for testing purposes
created_at
string
| date-time
Timestamp when the charge was created
modified_at
string
| date-time
Timestamp when the charge was last modified
company_id
string
Company id
line_items
array of object
List of line items associated with the charge
Examples
Parameters
companyId:
"20"
extensionId:
"64b0dff8c35f99051888085c"
subscriptionId:
"6606ab6d89fdb100d0f39e99"
POST
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/subscription/{subscription_id}/cancel
Loading...
Response
Loading...
POST

Generate a one-time charge.

Generate a one-time charge for specific services or products.
Parameters
company_id
string
Required
Customer unique id. In case of company it will be company id.
extension_id
string
Required
Extension _id
Request body
name
string
The name of the one-time charge to be created.
charge
object (OneTimeChargeItem)
OneTimeChargeItem
is_test
boolean
Indicates whether the charge creation is for testing purposes.
return_url
string
URL to which the user will be redirected after creating the charge.
Response
200
400
Success
CreateOneTimeChargeResponse
charge
object (Charge)
Charge
confirm_url
string
URL to which users are redirected to confirm or complete the payment or subscription process.
Examples
Parameters
companyId:
"20"
extensionId:
"64b54e711c0570321b5612ad"
body:
body
POST
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/one_time_charge
Loading...
Response
Loading...
POST

Initiate subscription billing

Register a subscription charge for a seller using your extension.
Parameters
company_id
integer
Required
Customer unique id. In case of company it will be company id.
extension_id
string
Required
Extension Id for which we need to crete new subscription
Request body
name
string
Required
The name of the charge.
trial_days
integer
| int32
line_items
array of object (ChargeLineItem)
Required
Array of ChargeLineItem
is_test
boolean
Indicates whether the charge is for testing purposes.
return_url
string
Required
The URL passed in request which extension expects in return.
Response
200
400
Success
CreateSubscriptionResponse
subscription
object (EntitySubscription)
EntitySubscription
confirm_url
string
URL to which users are redirected to confirm or complete the payment or subscription process.
Examples
Parameters
companyId:
20
extensionId:
"6051c97bf1c0f40d96d85ca4"
body:
body
POST
/service/platform/billing/v1.0/company/{company_id}/extension/{extension_id}/subscription
Loading...
Response
Loading...