API Version
Product Catalog
Library

Sales orders represent the contractual agreement and commitment for services between a seller and a buyer. They act as a seamless interface connecting any sales system (such as CPQ, CRM, or Customer Portal) with Chargebee Billing. The sales order captures the following essential components

  • Order Line Items including discounts and ramps
  • Billing and payment configuration
  • Contract terms and conditions
  • Customer information including billing and shipping contacts
  • Meta data

Sample sales order [ JSON ]

API Index URL GET

https://{site}.chargebee.com/api/v2/sales_orders

Model Class

id
string, max chars=50
External identifier of the sales order.
version
integer, default=1
Version of the sales order.
renewed_from_order_id
optional, string, max chars=50
The unique identifier of the original sales order from which this order was renewed. This field is used to track renewal orders and link them to their previous sales transactions.
updated_at
optional, timestamp(UTC) in seconds
Indicates the timestamp at which this sales order was last updated.
created_at
timestamp(UTC) in seconds
Timestamp indicating sales order created.
po_number
optional, string, max chars=100
Buyer's purchase order reference number.
meta_data
optional, string, max chars=65k
A set of key-value pairs stored as additional information for the subscription. Learn more.
quote_id
optional, string, max chars=100
Primary quote id for which the order was placed.
effective_date
timestamp(UTC) in seconds
Effective start date of the order signifies when the contract is signed and becomes legally binding.
end_date
optional, timestamp(UTC) in seconds
The date when the order is considered completed, cancelled, or no longer valid.
business_entity_id
optional, string, max chars=50
The unique ID of the business entity of this sales order.
customer_id
string, max chars=50
The unique ID of the customer to which this sales order belongs.
currency_code
string, max chars=3
The currency code (ISO 4217 format) of the sales order.
subscription_ids
optional, list of string
The unique identifiers of the subscriptions that are bundled as part of this sales order.
status
enumerated string, default=active
Status of the sales order.
Possible values are
activeactivecompletedcompleted
Show all values[+]
optional, list of line_item
Line items of this sales order
billing_addresses
Show attributes [+]
optional, list of billing_address
Billing address for a customer.
optional, list of discount
List of discounts for this subscription
shipping_addresses
Show attributes [+]
optional, list of shipping_address
Shipping address for the subscription.
line_item_tiers
Show attributes [+]
optional, list of line_item_tier
The pricing details of line_items which have pricing_model as tiered, volume or stairstep. Learn more about pricing models.
payment_configuration
Show attributes [+]
optional, payment_configuration
Payment configuration of this sales order
billing_configuration
Show attributes [+]
optional, billing_configuration
Configurations controlling billing behavior and invoice generation workflows.
renewal_term
Show attributes [+]
optional, renewal_term
Renewal term for this sales order.

This is a list of the event types we currently support. We will continue to add more events moving forward. All events follow a uniform pattern - <resource>_<event_name>. The resources that will be present in the event content are provided beneath each event type's description.

Note: If consolidated invoicing is enabled, the attributes invoice.subscription_id and credit_note.subscription_id should not be used (as it will not be present if the invoice / credit note has lines from multiple subscriptions). Instead to know the related subscriptions, their line_items' subscription_id attribute should be referred.

id id
string, max chars=50
External identifier of the sales order.
version version
integer, default=1
Version of the sales order.
renewed_from_order_id renewed_from_order_id
optional, string, max chars=50
The unique identifier of the original sales order from which this order was renewed. This field is used to track renewal orders and link them to their previous sales transactions.
updated_at updated_at
optional, timestamp(UTC) in seconds
Indicates the timestamp at which this sales order was last updated.
created_at created_at
timestamp(UTC) in seconds
Timestamp indicating sales order created.
po_number po_number
optional, string, max chars=100
Buyer's purchase order reference number.
meta_data meta_data
optional, string, max chars=65k
A set of key-value pairs stored as additional information for the subscription. Learn more.
quote_id quote_id
optional, string, max chars=100
Primary quote id for which the order was placed.
effective_date effective_date
timestamp(UTC) in seconds
Effective start date of the order signifies when the contract is signed and becomes legally binding.
end_date end_date
optional, timestamp(UTC) in seconds
The date when the order is considered completed, cancelled, or no longer valid.
business_entity_id business_entity_id
optional, string, max chars=50
The unique ID of the business entity of this sales order.
customer_id customer_id
string, max chars=50
The unique ID of the customer to which this sales order belongs.
currency_code currency_code
string, max chars=3
The currency code (ISO 4217 format) of the sales order.
subscription_ids subscription_ids
optional, list of string
The unique identifiers of the subscriptions that are bundled as part of this sales order.
status status
enumerated string, default=active
Status of the sales order.
Possible values are
activeactivecompletedcompleted
Show all values[+]
line_items
optional, list of line_item
Line items of this sales order
billing_addresses
optional, list of billing_address
Billing address for a customer.
discounts
optional, list of discount
List of discounts for this subscription
shipping_addresses
optional, list of shipping_address
Shipping address for the subscription.
line_item_tiers
optional, list of line_item_tier
The pricing details of line_items which have pricing_model as tiered, volume or stairstep. Learn more about pricing models.
payment_configuration
optional, payment_configuration
Payment configuration of this sales order
billing_configuration
optional, billing_configuration
Configurations controlling billing behavior and invoice generation workflows.
renewal_term
optional, renewal_term
Renewal term for this sales order.