Note: This doc is for the latest version of Chargebee Orders. If you enabled Chargebee Orders before September-30-2018 , you may be using the legacy version of the feature and its API. For help in migrating to the current system or using the legacy API for Chargebee Orders, please contact support
Orders are automatically generated for an invoice when it gets paid, based on the shipping preference chosen for the invoice's product and the shipping date configuration. They can be updated either via api or merchant web console (a.k.a admin console).
{
"created_at": 1517678686,
"created_by": "full_access_key_v1",
"deleted": false,
"id": "__test__KyVnHhSBWlm1j2m7",
"invoice_id": "__demo_inv__2",
"object": "order",
"order_type": "manual",
"price_type": "tax_exclusive",
"status": "new",
"status_update_at": 1517678686
}The unique ID of the business entity of this subscription. This is always the same as the business entity of the customer.
The list of line items for this order.
Shipping address for the order.
Billing address for the order.
The list of taxes applied on the order line items.
The list of discounts applied for the order
The credit notes linked to the order
The list of resent orders applied on the order.
Updates an order. If the status of an order is changed while updating the order, the status_update_at attribute is set with the current time.
Import an order for an invoice with one or more line items. The import order bulk operation is to be applied on an imported invoice.
Uniquely identifies the order. It is the api identifier for the order.
*Order id will always be assigned incrementally from the last generated Order ID.
If Orders imported has an Order ID which is a string, Chargebee will just validate if the Order ID is unique
Recommendation: For orders being imported, set the same prefix and the serial number that is used for the Document number, which will make this into a string. This will ensure that imported orders don't conflict with orders created by Chargebee. Chargebee will ensure there aren't orders with duplicate Order IDs.* .
The order's serial number.
Document number passed cannot be greater than the series mentioned in the configuration. For instance, if you have set Document number series in Order Configurations with a Prefix as 'ORDER' and Starting number as '1000', orders up to the sequence number 'ORDER999' can be imported into Chargebee
Recommendation: Set a different prefix at the Order Configuration, than the ones that are imported. If your Order Configuration has a Prefix of 'NEW', with Starting number as '1', i.e. 'NEW1', then, set Prefix for imported orders to be as 'OLD', with Starting number as '1', i.e, 'OLD1' .
Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is the same as the order id in the third party application.
Recommendation:
If this order is in any of these statuses, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned, and has already been processed, through a 3rd party system, and you have a reference id of the entity in the 3rd party tool, pass in the entity id to this field. If not, set the same prefix and the serial number that is used for the Document number, which will make this into a string.
If this order hasn't been processed and is in 'queued' status, do not pass any value to this field. Chargebee, when it syncs your Orders through the fulfilment integrations such as Shipstation or Shopify, would auto assign the reference id from the connected system. .
The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.
*If this order is in any of these statuses, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned, and has already been processed, through a 3rd party system, and you have a corresponding status from the 3rd party tool, pass in the status to this field.
If this order hasn't been processed and is in 'queued' status, do not pass any value to this field. Chargebee, when it syncs your Orders through the fulfilment integrations such as Shipstation or Shopify, would auto assign the fulfilment status from the connected system.* .
If there are any credits that were issued at the order level, you can make use of the field, refundable_credits_issued. This will lead to Chargebee creating a Refundable Credit note against the order. When the next invoice is raised against the customer, this credit note will be utilised.
Assigns order number to the order based on the settings, if not already assigned
Cancel order and create a refundable credit note for the order
This API is used to create a refundable credit note for the order
This API is used to re-open a cancelled order
Retrieves an order corresponding to the order id passed.
Deletes only Imported Order .Delete does not happen if the order was refunded. It goes through if order refund was initiated and is in "refund_due" state.
This API is used to retrieve a list of all the available orders.
The invoice number which acts as an identifier for invoice and is generated sequentially. Supported operators : is, is_not, starts_with, in, not_in
Example → invoice_id[is] = "INVOICE_982"
The status of this order.
Possible values are : new, processing, complete, cancelled, voided, queued, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returnedThis is the date on which the order will be delivered to the customer. Supported operators : after, before, on, between
Example → shipping_date[after] = "1435054328"
The date on which the order will start getting processed. Supported operators : after, before, on, between
Example → order_date[before] = "1435054328"
The timestamp indicating the date & time the order's invoice got paid. Supported operators : after, before, on, between
Example → paid_on[on] = "1435054328"
Resend an existing order. This will help in resending an existing order in full or partial. Upto 5 resend operations are allowed per . When resent fully, the original order is canceled.