ChargebeeAPI

Orders

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).

Sample OrderJSON

API Index URL

https://[site].chargebee.com/api/v2/orders

Orders attributes

id
required, string, max chars=40

Uniquely identifies the order. It is the api identifier for the order

document_number
optional, string, max chars=50

The order's serial number

invoice_id
optional, string, max chars=50

The invoice number which acts as an identifier for invoice and is generated sequentially.

subscription_id
optional, string, max chars=50

The subscription for which the order is created

customer_id
optional, string, max chars=50

The customer for which the order is created

status
optional, enumerated string, default=new

The status of this order.

Possible Enum Values
new

Order has been created. Applicable only if you are using Chargebee's legacy order management system.

processing

Order is being processed. Applicable only if you are using Chargebee's legacy order management system

complete

Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system

cancelled

Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system

voided

Order has been voided. Applicable only if you are using Chargebee's legacy order management system

cancellation_reason
optional, enumerated string

Cancellation reason

Possible Enum Values
shipping_cut_off_passed

The invoice has been paid late and Chargebee cancel's the first order for the invoice.

product_unsatisfactory

Product unsatisfactory.

third_party_cancellation

Third party cancellation.

product_not_required

Product not required.

delivery_date_missed

Delivery date missed.

payment_status
optional, enumerated string

The payment status of the order

Possible Enum Values
not_paid

NOT_PAID

paid

PAID

order_type
optional, enumerated string

Order type

Possible Enum Values
manual

The order has been created by the user using Chargebee's legacy order management system.

system_generated

The order has been created by Chargebee automatically based on the preferences set by the user.

price_type
required, enumerated string, default=tax_exclusive

The price type of the order

Possible Enum Values
tax_exclusive

All amounts in the document are exclusive of tax.

tax_inclusive

All amounts in the document are inclusive of tax.

reference_id
optional, string, max chars=50

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 same as the order id in the third party application.

fulfillment_status
optional, string, max chars=50

The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;

order_date
optional, timestamp(UTC) in seconds

The date on which the order will start getting processed.

shipping_date
optional, timestamp(UTC) in seconds

This is the date on which the order will be delivered to the customer.

note
optional, string, max chars=600

The custom note for the order.

tracking_id
optional, string, max chars=50

The tracking id of the order.

tracking_url
optional, string, max chars=255

The tracking url of the order.

batch_id
optional, string, max chars=50

Unique id to identify a group of orders.

created_by
optional, string, max chars=50

The source (or the user) from where the order has been created.

shipment_carrier
optional, string, max chars=50

Shipment carrier

invoice_round_off_amount
optional, in cents, min=0

The total round off taken from the invoice level

tax
optional, in cents, min=0

The total tax for the order.

amount_paid
optional, in cents, min=0

Total amount paid for the order.

amount_adjusted
optional, in cents, min=0

Total amount adjusted for the order.

refundable_credits_issued
optional, in cents, min=0

The total amount issued as credits on behalf of this order.

refundable_credits
optional, in cents, min=0

The total amount that can be issued as credits for this order.

rounding_adjustement
optional, in cents

Rounding adjustment

optional, timestamp(UTC) in seconds

The timestamp indicating the date & time the order's invoice got paid.

shipping_cut_off_date
optional, timestamp(UTC) in seconds

The time after which an order becomes unservicable

created_at
required, timestamp(UTC) in seconds

The time at which the order was created

status_update_at
optional, timestamp(UTC) in seconds

The time at which the order status was last updated.

delivered_at
optional, timestamp(UTC) in seconds

The time at which the order was delivered

shipped_at
optional, timestamp(UTC) in seconds

The time at which the order was shipped.

resource_version
optional, long

Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

updated_at
optional, timestamp(UTC) in seconds

The order's last modified time.

cancelled_at
optional, timestamp(UTC) in seconds

The time at which the order was cancelled.

resent_status
optional, enumerated string

Resent status of the order.

Possible Enum Values
fully_resent

Order is Fully resent

partially_resent

Order is Partially resent

is_resent
required, boolean, default=false

Show if the order is resent order or not.

original_order_id
optional, string, max chars=40

Refers to the original order id of the resent order.

discount
optional, in cents, min=0

Total discount given for the order.

sub_total
optional, in cents, min=0

The order's sub-total

total
optional, in cents, min=0

Total amount charged for the order.

deleted
required, boolean

Indicates that this resource has been deleted.

currency_code
optional, string, max chars=3

The currency code (ISO 4217 format) for the invoice

is_gifted
optional, boolean, default=false

Boolean indicating whether this order is gifted or not.

gift_note
optional, string, max chars=500

The gift message added by the gifter during purchase

gift_id
optional, string, max chars=50

The gift_id if the order is a gift order

resend_reason
optional, string, max chars=100

Reason code for resending the order. Must be one from a list of reason codes set in the Chargebee app in Settings > Configure Chargebee > Reason Codes > Orders > Order Resend. Must be passed if set as mandatory in the app. The codes are case-sensitive

business_entity_id
optional, string, max chars=50

The unique ID of the business entity of this subscription. This is always the same as the business entity of the customer.

order_line_items

Array containing object of parameters for order_line_items

shipping_address

Object of parameters for shipping_address

billing_address

Object of parameters for billing_address

line_item_taxes

Array containing object of parameters for line_item_taxes

line_item_discounts

Array containing object of parameters for line_item_discounts

linked_credit_notes

Array containing object of parameters for linked_credit_notes

resent_orders

Array containing object of parameters for resent_orders