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
# Obtain charge details.
GET
# Retrieve subscription charge details.
POST
# Cancel a subscription charge.
POST
# Generate a one-time charge.
POST
# 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
amount
number
| value >= 1
The amount for the price. The minimum value is 1.
currency_code
string
The currency code for the price
recurring
object (ChargeRecurring)
ChargeRecurring
interval
string
Enum
interval_time
number
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
start_date
string
| date-time
The start date and time of the trial period.
end_date
string
| date-time
The end date and time of the trial period.
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
company_id:
"20"
extension_id:
"64b0dff8c35f99051888085c"
charge_id:
"64b54e711c0570666d5612bb"
Was this section helpful?
GET
Loading...
Response
Loading...
Obtain charge details.
getChargeDetails
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
company_id:
"20"
extension_id:
"64b0dff8c35f99051888085c"
subscription_id:
"6606ab6d89fdb100d0f39e99"
Was this section helpful?
GET
Loading...
Response
Loading...
Retrieve subscription charge details.
getSubscriptionCharge
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
company_id:
"20"
extension_id:
"64b0dff8c35f99051888085c"
subscription_id:
"6606ab6d89fdb100d0f39e99"
Was this section helpful?
POST
Loading...
Response
Loading...
Cancel a subscription charge.
cancelSubscriptionCharge
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
name
string
The name of the one-time charge item.
term
string
The term or description of the charge.
pricing_type
string
The type of pricing for the charge item.
Enum
price
object (EntityChargePrice)
EntityChargePrice
amount
number
| value >= 1
The amount for the price. The minimum value is 1.
currency_code
string
The currency code for the price
capped_amount
number
The maximum amount that can be charged for this item, if applicable.
is_test
boolean
Indicates whether the charge item is for testing purposes.
metadata
object
Additional metadata associated with the charge item.
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
final_charge
object (OneTimeChargeEntity)
OneTimeChargeEntity
term
string
Description of the charge term or usage.
charge_type
string
Type of the charge (e.g., 'subscription', 'extension').
capped_amount
number
Maximum amount that can be charged. If no cap, the value should be 0.
billing_date
string
| date-time
Nullable
Date when the charge was billed. Null if not yet billed.
created_at
string
| date-time
Date and time when the charge entity was created.
modified_at
string
| date-time
Date and time when the charge entity was last modified.
__v
number
Internal version key for the charge record.
_id
string
Unique identifier for the charge entity.
name
string
The name of the one-time charge.
status
string
Current status of the charge (e.g., 'pending', 'completed').
activated_on
string
| date-time
Nullable
Date and time when the charge was activated. Null if not yet activated.
cancelled_on
string
| date-time
Nullable
Date and time when the charge was cancelled. Null if not cancelled.
metadata
object
Additional metadata associated with the charge.
return_url
string
URL to redirect to after processing the charge.
is_test
boolean
Indicates whether the charge is for testing purposes.
pricing_type
string
Pricing model for the charge (e.g., 'one_time').
Enum
subscriber_id
string
Unique identifier for the subscriber associated with the charge.
entity_type
string
Type of the entity related to the charge (e.g., 'subscription', 'user').
entity_id
string
Unique identifier for the entity associated with the charge.
meta
object
Additional metadata associated with the charge.
price
object (EntityChargePrice)
EntityChargePrice
amount
number
| value >= 1
The amount for the price. The minimum value is 1.
currency_code
string
The currency code for the price
confirm_url
string
URL to which users are redirected to confirm or complete the payment or subscription process.
Examples
Parameters
company_id:
"20"
extension_id:
"64b54e711c0570321b5612ad"
body:
body
Was this section helpful?
POST
Loading...
Response
Loading...
Generate a one-time charge.
createOneTimeCharge
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
name
string
Required
Its name of the extension plan.
term
string
Required
It indicates how it will be charged.
pricing_type
string
Required
It indicates the extension subscription will be auto renewed timely.
Enum
price
object (EntityChargePrice)
Required
EntityChargePrice
amount
number
| value >= 1
The amount for the price. The minimum value is 1.
currency_code
string
The currency code for the price
recurring
object (EntityChargeRecurring)
EntityChargeRecurring
interval
string
Required
The interval of the subscription.
Enum
capped_amount
number
trial_days
integer
| int32
is_test
boolean
metadata
object
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
_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
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
subscriber_id
string
Unique Identifier of the company
line_items
array of object (EntityChargeDetails)
Array of EntityChargeDetails
_id
string
Unique identifier for the charge.
subscription_id
string
Unique identifier of the extension subscription.
subscriber_id
string
Unique identifier of the subscriber/company who installed extension subscription.
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
amount
number
| value >= 1
The amount for the price. The minimum value is 1.
currency_code
string
The currency code for the price
recurring
object (ChargeRecurring)
ChargeRecurring
interval
string
Enum
interval_time
number
status
string
Current status of the charge.
Enum
capped_amount
number
Maximum amount that can be charged, if applicable.
activated_on
string
| date-time
Nullable
Date and time when the charge was activated.
cancelled_on
string
| date-time
Nullable
Date and time when the charge was cancelled.
billing_date
string
| date-time
Nullable
Date and time when the charge was billed.
current_period
object (SubscriptionTrialPeriod)
SubscriptionTrialPeriod
start_date
string
| date-time
The start date and time of the trial period.
end_date
string
| date-time
The end date and time of the trial period.
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.
return_url
string
The URL passed in request which extension expects in return.
confirm_url
string
URL to which users are redirected to confirm or complete the payment or subscription process.
Examples
Parameters
company_id:
20
extension_id:
"6051c97bf1c0f40d96d85ca4"
body:
body
Was this section helpful?
POST
Loading...
Response
Loading...