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 order [ JSON ]

{ "id": "1", "document_number": "1", "invoice_id": "INV-092018-194", "subscription_id": "1mklhi2R4ePTnLVi", "customer_id": "1mklhi2R4ePTnLVi", "status": "queued", "payment_status": "paid", "order_type": "system_generated", "price_type": "tax_inclusive", "order_date": 1537868031, "shipping_date": 1537868031, "created_by": "Auto generated by system", "tax": 3000, "amount_paid": 33000, "amount_adjusted": 0, "refundable_credits_issued": 0, "refundable_credits": 33000, "rounding_adjustement": 0, "paid_on": 1537868031, "created_at": 1537868034, "updated_at": 1537939744, "resource_version": 1537939744934, "deleted": false, "object": "order", "discount": 0, "sub_total": 30000, "order_line_items": [ { "id": "o_li1mklhi2R4ePXxoWA", "invoice_id": "INV-092018-194", "invoice_line_item_id": "li_1mklhi2R4ePTpVVk", "unit_price": 33000, "fulfillment_quantity": 1, "fulfillment_amount": 33000, "tax_amount": 3000, "amount_paid": 33000, "amount_adjusted": 0, "refundable_credits_issued": 0, "refundable_credits": 33000, "is_shippable": true, "status": "queued", "object": "order_line_item", "entity_id": "classic-monthly-shipping-yearly-plan", "discount_amount": 0, "item_level_discount_amount": 0, "description": "Classic monthly shipping yearly plan", "entity_type": "plan" }, {..} ], "line_item_taxes": [ { "tax_name": "test", "tax_rate": 10.0, "tax_juris_type": "country", "tax_juris_name": "United States", "tax_juris_code": "US", "object": "line_item_tax", "line_item_id": "li_1mklhi2R4ePTpVVk", "tax_amount": 3000 }, {..} ], "total": 33000, "amount_refundable": 33000, "currency_code": "EUR", "base_currency_code": "EUR", "shipping_address": { "state_code": "AL", "state": "Alabama", "country": "US", "validation_status": "not_validated", "object": "shipping_address" }, "billing_address": { "state_code": "AL", "state": "Alabama", "country": "US", "validation_status": "not_validated", "object": "billing_address" }, "linked_credit_notes": [] }

API Index URL GET

https://{site}.chargebee.com/api/v2/orders
id
Uniquely identifies the order. It is the api identifier for the order.
string, max chars=40
document_number
The order's serial number.
optional, string, max chars=50
invoice_id
The invoice number which acts as an identifier for invoice and is generated sequentially.
optional, string, max chars=50
subscription_id
The subscription for which the order is created.
optional, string, max chars=50
customer_id
The customer for which the order is created.
optional, string, max chars=50
status
The status of this order.
optional, enumerated string, default=new
Possible values are
newOrder has been created. Applicable only if you are using Chargebee's legacy order management system.processingOrder is being processed. Applicable only if you are using Chargebee's legacy order management system.completeOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management system.cancelledOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system.
voidedOrder has been voided. Applicable only if you are using Chargebee's legacy order management system.queuedOrder is yet to be processed by any system, these are scheduled orders created by Chargebee.awaiting_shipmentThe order has been picked up by an integration system, and synced to a shipping management platform.on_holdThe order is paused from being processed.deliveredThe order has been delivered to the customer.shippedThe order has moved from order management system to a shipping system.partially_deliveredThe order has been partially delivered to the customer.returnedThe order has been returned after delivery.
Show all values[+]
cancellation_reason
Cancellation reason.
optional, enumerated string
Possible values are
shipping_cut_off_passedThe invoice has been paid late and Chargebee cancel's the first order for the invoice.product_unsatisfactoryProduct unsatisfactory.third_party_cancellationThird party cancellation.product_not_requiredProduct not required.
delivery_date_missedDelivery date missed.alternative_foundAlternative found.invoice_written_offThe invoice has been completely written off. Orders are generated by Chargebee in cancelled state.invoice_voidedThe invoice for which the order was createed has been voided.fraudulent_transactionFraudulent transaction.payment_declinedPayment declined.subscription_cancelledThe subsctiption for which the order was created has been cancelled.product_not_availableProduct not available.othersOther reason.
Show all values[+]
payment_status
The payment status of the order.
optional, enumerated string
Possible values are
not_paidNOT_PAID.paidPAID.
order_type
Order type.
optional, enumerated string
Possible values are
manualThe order has been created by the the user using Chargebee's legacy order management system.system_generatedThe order has been created by Chargebee automatically based on the preferences set by the user.
price_type
The price type of the order.
enumerated string, default=tax_exclusive
Possible values are
tax_exclusiveAll amounts in the document are exclusive of tax.tax_inclusiveAll amounts in the document are inclusive of tax.
reference_id
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.
optional, string, max chars=50
fulfillment_status
The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.
optional, string, max chars=50
order_date
The date on which the order will start getting processed.
optional, timestamp(UTC) in seconds
shipping_date
This is the date on which the order will be delivered to the customer.
optional, timestamp(UTC) in seconds
note
The custom note for the order.
optional, string, max chars=600
tracking_id
The tracking id of the order.
optional, string, max chars=50
batch_id
Unique id to identify a group of orders.
optional, string, max chars=50
created_by
The source (or the user) from where the order has been created.
optional, string, max chars=50
shipment_carrier
Shipment carrier.
optional, string, max chars=50
invoice_round_off_amount
The total round off taken from the invoice level.
optional, in cents, min=0
tax
The total tax for the order.
optional, in cents, min=0
amount_paid
Total amount paid for the order.
optional, in cents, min=0
amount_adjusted
Total amount adjusted for the order.
optional, in cents, min=0
refundable_credits_issued
The total amount issued as credits on behalf of this order.
optional, in cents, min=0
refundable_credits
The total amount that can be issued as credits for this order.
optional, in cents, min=0
rounding_adjustement
Rounding adjustment.
optional, in cents
paid_on
The timestamp indicating the date & time the order's invoice got paid.
optional, timestamp(UTC) in seconds
shipping_cut_off_date
The time after which an order becomes unservicable.
optional, timestamp(UTC) in seconds
created_at
The time at which the order was created.
timestamp(UTC) in seconds
status_update_at
The time at which the order status was last updated.
optional, timestamp(UTC) in seconds
delivered_at
The time at which the order was delivered.
optional, timestamp(UTC) in seconds
shipped_at
The time at which the order was shipped.
optional, timestamp(UTC) in seconds
resource_version
Version number of this resource. Each update of this resource results in incremental change of this number. This attribute will be present only if the resource has been updated after 2016-09-28.
optional, long
updated_at
The order's last modified time.
optional, timestamp(UTC) in seconds
cancelled_at
The time at which the order was cancelled.
optional, timestamp(UTC) in seconds
discount
Total discount given for the order.
optional, in cents, min=0
sub_total
The order's sub-total.
optional, in cents, min=0
total
Total amount charged for the order.
optional, in cents, min=0
deleted
Indicates that this resource has been deleted.
boolean
currency_code
The currency code (ISO 4217 format) for the invoice.
optional, string, max chars=3
order_line_items
Show attributes[+]
The list of line items for this order.
optional, list of order_line_item
Order line item attributes
id
The identifier for the order line item.
string, max chars=40
invoice_id
The invoice of the line item.
string, max chars=50
invoice_line_item_id
The invoice line item id associated with this order line item.
string, max chars=40
unit_price
The unit price.
optional, integer
description
The line item description.
optional, string, max chars=250
amount
The sub total, of the order line item.
optional, integer
fulfillment_quantity
The quantity that is going to get fulfilled for this order.
optional, integer, min=0
fulfillment_amount
The amount that is going to get fulfilled for this order(amount after tax and discount).
optional, in cents, min=0
tax_amount
The total tax applied on this line item.
optional, in cents, min=0
amount_paid
The total amount paid on the invoice, on behalf of this delivery.
optional, in cents, min=0
amount_adjusted
The total amount adjusted on the invoice, on behalf of this delivery.
optional, in cents, min=0
refundable_credits_issued
The total refundable credits issued on the invoice, on behalf of this delivery.
optional, in cents, min=0
refundable_credits
The total amount issued as credits on behalf of this delivery.
optional, in cents, min=0
is_shippable
Appliable only if configured to include non shippable charges in orders, specifies if the charge is applicable for shipping.
boolean
SKU
The SKU for the delivery.
optional, string, max chars=250
status
The status of this order.
optional, enumerated string, default=queued
Possible values are
queuedNot processed for shipping yet.awaiting_shipmentMoved to shipping platform.on_holdThe delivery has been moved to "On hold" status.deliveredThe order line item has been delivered.shippedThe order line item has been shipped.partially_deliveredThe order has been partially delivered to the customer.returnedThe order has been returned after delivery.
entity_type
Specifies the modelled entity (plan / addon etc) this lineitem is based on.
enumerated string
Possible values are
plan_setupIndicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the plan id.planIndicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the plan id.addonIndicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the addon id.adhocIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case.
item_level_discount_amount
Item level discount amount.
optional, in cents, min=0
discount_amount
The discount given on the order line item.
optional, in cents, min=0
entity_id
The identifier of the modelled entity this lineitem is based on. Will be null for 'adhoc' entity type.
optional, string, max chars=50
shipping_address
Show attributes[+]
Shipping address for the order.
optional, shipping_address
Shipping addres attributes
first_name
First name.
optional, string, max chars=150
last_name
Last name.
optional, string, max chars=150
email
Email.
optional, string, max chars=70
company
Company name.
optional, string, max chars=250
phone
Phone number.
optional, string, max chars=50
line1
Address line 1.
optional, string, max chars=180
line2
Address line 2.
optional, string, max chars=150
line3
Address line 3.
optional, string, max chars=150
city
City.
optional, string, max chars=50
state_code
The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set the state_code as AZ (not US-AZ). or, for Tamil Nadu (India), set the state_code as TN (not IN-TN). or, for British Columbia (Canada), set the state_code as BC (not CA-BC).
Note: If the 'state_code' is specified, the 'state' attribute should not be provided as Chargebee will set the value automatically (for US, Canada, India).
optional, string, max chars=50
state
The state/province name.
optional, string, max chars=50
country
2-letter ISO 3166 alpha-2 country code.
optional, string, max chars=50
zip
Zip or Postal code.
optional, string, max chars=20
validation_status
The address verification status.
optional, enumerated string, default=not_validated
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
billing_address
Show attributes[+]
Billing address for the order.
optional, billing_address
Billing addres attributes
first_name
First name.
optional, string, max chars=150
last_name
Last name.
optional, string, max chars=150
email
Email.
optional, string, max chars=70
company
Company name.
optional, string, max chars=250
phone
Phone number.
optional, string, max chars=50
line1
Address line 1.
optional, string, max chars=150
line2
Address line 2.
optional, string, max chars=150
line3
Address line 3.
optional, string, max chars=150
city
City.
optional, string, max chars=50
state_code
The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set the state_code as AZ (not US-AZ). or, for Tamil Nadu (India), set the state_code as TN (not IN-TN). or, for British Columbia (Canada), set the state_code as BC (not CA-BC).
Note: If the 'state_code' is specified, the 'state' attribute should not be provided as Chargebee will set the value automatically (for US, Canada, India).
optional, string, max chars=50
state
State or Province.
optional, string, max chars=50
country
2-letter ISO 3166 alpha-2 country code.
optional, string, max chars=50
zip
Zip or Postal code.
optional, string, max chars=20
validation_status
The address verification status.
optional, enumerated string, default=not_validated
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
line_item_taxes
Show attributes[+]
The list of taxes applied on the order line items.
optional, list of line_item_tax
Line item tax attributes
line_item_id
The unique reference id of the line item for which the tax is applicable.
optional, string, max chars=40
tax_name
The name of the tax applied.
string, max chars=100
tax_rate
The rate of tax used to calculate tax amount.
double, default=0.0, min=0.0, max=100.0
tax_amount
The tax amount.
in cents, min=0
tax_juris_type
The type of tax jurisdiction.
optional, enumerated string
Possible values are
countryThe tax jurisdiction is a country.stateThe tax jurisdiction is a state.countyThe tax jurisdiction is a county.cityThe tax jurisdiction is a city.specialSpecial tax jurisdiction.otherJurisdictions other than the ones listed above.
tax_juris_name
The name of the tax jurisdiction.
optional, string, max chars=250
tax_juris_code
The tax jurisdiction code.
optional, string, max chars=250
line_item_discounts
Show attributes[+]
The list of discounts applied for the order.
optional, list of line_item_discount
Line item discount attributes
line_item_id
The unique reference id of the line item for which the discount is applicable.
string, max chars=50
discount_type
Type of this discount line item.
enumerated string
Possible values are
item_level_couponRepresents the 'Item' level coupons applied to this invoice. Further the 'coupon_id' attribute specifies the coupon id this discount is based on.document_level_couponRepresents the 'Document' level coupons applied to this document. Further the 'coupon_id' attribute specifies the coupon id this discount is based on.promotional_creditsRepresents the Promotional Credits item in invoice. The 'coupon_id' attribute will be null in this case.prorated_creditsRepresents the credit adjustment items in invoice. The 'coupon_id' attribute will be null in this case.
coupon_id
Coupon id.
optional, string, max chars=50
discount_amount
Discount amount.
in cents, min=0
linked_credit_notes
Show attributes[+]
The credit notes linked to the order.
optional, list of order_line_item_linked_credit
Linked credit note attributes
amount
The amount issued for this order.
optional, in cents, min=0
type
The credit note type.
enumerated string
Possible values are
adjustmentAdjustment Credit Note.refundableRefundable Credit Note.
id
Credit-note id.
string, max chars=50
status
The credit note status.
enumerated string
Possible values are
adjustedWhen the Credit Note has been adjusted against an invoice.refundedWhen the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).refund_dueWhen the credits are yet to be used, or have been partially used.voidedWhen the Credit Note has been canceled.
amount_adjusted
Total amount adjusted on the order for the linked credit note. Applicable if the linked credit note is of the type 'adjustement'.
optional, in cents, min=0
amount_refunded
Total refundable credits issued on the order for the linked credit note. Applicable if the linked credit note is of the type 'refundable'.
optional, in cents, min=0
Creates an order for an invoice. If 'status' is not passed while creating an order, the default status('new') is set. This api endpoint is only applicable if you are using Chargebee's legacy order management system.
Sample Request
curl  https://{site}.chargebee.com/api/v2/orders \
     -u {site_api_key}: \
     -d invoice_id="INV-092018-194"
copy
curl  https://{site}.chargebee.com/api/v2/orders \
     -u {site_api_key}: \
     -d invoice_id="INV-092018-194"

Sample Response [ JSON ]

{"order": { "id": "5SK0b8q3QtyveuP54", "invoice_id": "1", "status": "new", "created_by": "full_access_key_v1", "created_at": 1528093753, "status_update_at": 1528093753, "object": "order" }}

URL Format POST

https://{site}.chargebee.com/api/v2/orders
id
Uniquely identifies the order. If not given, this will be auto-generated.
optional, string, max chars=40
invoice_id
The invoice number which acts as an identifier for invoice and is generated sequentially.
required, string, max chars=50
status
The order status.
optional, enumerated string
Possible values are
newOrder has been created. Applicable only if you are using Chargebee's legacy order management system.processingOrder is being processed. Applicable only if you are using Chargebee's legacy order management system.completeOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management system.cancelledOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system.voidedOrder has been voided. Applicable only if you are using Chargebee's legacy order management system.
reference_id
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.
optional, string, max chars=50
fulfillment_status
The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.
optional, string, max chars=50
note
The custom note for the order.
optional, string, max chars=600
tracking_id
The tracking id of the order.
optional, string, max chars=50
batch_id
Unique id to identify a group of orders.
optional, string, max chars=50
Resource object representing order.
always returned
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.
Sample Request
curl  https://{site}.chargebee.com/api/v2/orders/1 \
     -X POST  \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/orders/1 \
     -X POST  \
     -u {site_api_key}:

Sample Response [ JSON ]

{"order": { "amount": 32000, "amount_adjusted": 0, "amount_paid": 32000, "amount_refundable": 32000, "created_at": 1515164423, "created_by": "Auto generated by system", "customer_id": "XpbGOrnR3G1qWG1I", "deleted": false, "document_number": "CB-ORD-1", "id": "1", "invoice_id": "1", "linked_credit_notes": [], "object": "order", "order_date": 1515164422, "line_item_discounts": [ [{ "coupon_id": "Discount20Per", "discount_amount": 6400, "discount_type": "document_level_coupon", "line_item_id": "li_XpbGOrnR3G1qYk1K", "object": "line_item_discount" }], {..} ], "order_line_items": [ { "amount": 40000, "amount_adjusted": 0, "amount_paid": 32000, "description": "Classic monthly shipping yearly plan", "discount_amount": 8000, "entity_id": "classic-monthly-shipping-yearly-plan", "entity_type": "plan", "fulfillment_amount": 32000, "fulfillment_quantity": 1, "id": "o_liXpbGOomR3G1s2D6i", "invoice_id": "1", "is_shippable": true, "item_level_discount_amount": 0, "line_item_id": "li_XpbGOrnR3G1qYk1K", "object": "order_line_item", "refundable_credits": 32000, "refunded_amount": 0, "status": "queued", "tax_amount": 0 }, {..} ], "order_type": "system_generated", "paid_at": 1515164422, "paid_on": 1515164422, "payment_status": "paid", "price_type": "tax_inclusive", "refundable_credits": 32000, "refundable_credits_issued": 0, "resource_version": 1515164423000, "rounding_adjustement": 0, "shipping_address": { "country": "US", "object": "shipping_address", "validation_status": "not_validated" }, "shipping_date": 1515164422, "status": "queued", "sub_total": 32000, "subscription_id": "XpbGOrnR3G1qWG1I", "tax": 0, "tax_amount": 0, "total": 32000, "total_discount": 8000, "updated_at": 1515164423 }}

URL Format POST

https://{site}.chargebee.com/api/v2/orders/{order_id}
reference_id
Reference id is the unique identifier of the order in the shipping/order management application.
optional, string, max chars=50
batch_id
Unique id to identify a group of orders.
optional, string, max chars=50
note
The custom note for the order.
optional, string, max chars=600
shipping_date
The date on which the order should be shipped to the customer.
optional, timestamp(UTC) in seconds
order_date
The order date.
optional, timestamp(UTC) in seconds
cancelled_at
The time at which the order was cancelled.
optional, timestamp(UTC) in seconds
cancellation_reason
Cancellation reason.
optional, enumerated string
Possible values are
shipping_cut_off_passedThe invoice has been paid late and Chargebee cancel's the first order for the invoice.product_unsatisfactoryProduct unsatisfactory.third_party_cancellationThird party cancellation.product_not_requiredProduct not required.
delivery_date_missedDelivery date missed.alternative_foundAlternative found.invoice_written_offThe invoice has been completely written off. Orders are generated by Chargebee in cancelled state.invoice_voidedThe invoice for which the order was createed has been voided.fraudulent_transactionFraudulent transaction.payment_declinedPayment declined.subscription_cancelledThe subsctiption for which the order was created has been cancelled.product_not_availableProduct not available.othersOther reason.
Show all values[+]
shipped_at
The time at which the order was shipped.
optional, timestamp(UTC) in seconds
delivered_at
The time at which the order was delivered.
optional, timestamp(UTC) in seconds
tracking_id
The tracking id of the order.
optional, string, max chars=50
shipment_carrier
The carrier used to ship the goods to the customer. Ex:- FedEx.
optional, string, max chars=50
fulfillment_status
The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.
optional, string, max chars=50
status
The order status.
optional, enumerated string
Possible values are
newOrder has been created. Applicable only if you are using Chargebee's legacy order management system.processingOrder is being processed. Applicable only if you are using Chargebee's legacy order management system.completeOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management system.cancelledOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system.
voidedOrder has been voided. Applicable only if you are using Chargebee's legacy order management system.queuedOrder is yet to be processed by any system, these are scheduled orders created by Chargebee.awaiting_shipmentThe order has been picked up by an integration system, and synced to a shipping management platform.on_holdThe order is paused from being processed.deliveredThe order has been delivered to the customer.shippedThe order has moved from order management system to a shipping system.partially_deliveredThe order has been partially delivered to the customer.returnedThe order has been returned after delivery.
Show all values[+]
shipping_address
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
First name.
optional, string, max chars=150
shipping_address[last_name]
Last name.
optional, string, max chars=150
shipping_address[email]
Email.
optional, string, max chars=70
shipping_address[company]
Company name.
optional, string, max chars=250
shipping_address[phone]
Phone number.
optional, string, max chars=50
shipping_address[line1]
Address line 1.
optional, string, max chars=180
shipping_address[line2]
Address line 2.
optional, string, max chars=150
shipping_address[line3]
Address line 3.
optional, string, max chars=150
shipping_address[city]
City.
optional, string, max chars=50
shipping_address[state_code]
The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set the state_code as AZ (not US-AZ). or, for Tamil Nadu (India), set the state_code as TN (not IN-TN). or, for British Columbia (Canada), set the state_code as BC (not CA-BC).
Note: If the 'state_code' is specified, the 'state' attribute should not be provided as Chargebee will set the value automatically (for US, Canada, India).
optional, string, max chars=50
shipping_address[state]
The state/province name. Use this to pass the state/province information for cases where 'state_code' is not supported or cannot be passed.
optional, string, max chars=50
shipping_address[zip]
Zip or Postal code.
optional, string, max chars=20
shipping_address[country]
2-letter ISO 3166 alpha-2 country code.
optional, string, max chars=50
shipping_address[validation_status]
The address verification status.
optional, enumerated string
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
order_line_items
Parameters for order_line_items. Multiple order_line_items can be passed by specifying unique indices.
pass parameters as order_line_items[<param name>][<idx:0..n>]
order_line_items[id][0..n]
The identifier for the order line item.
optional, string, max chars=40
order_line_items[status][0..n]
The order line item's delivery status.
optional, enumerated string
Possible values are
queuedNot processed for shipping yet.awaiting_shipmentMoved to shipping platform.on_holdThe delivery has been moved to "On hold" status.deliveredThe order line item has been delivered.shippedThe order line item has been shipped.partially_deliveredThe order has been partially delivered to the customer.returnedThe order has been returned after delivery.
order_line_items[SKU][0..n]
The SKU code for the order line item product.
optional, string, max chars=250
Resource object representing order.
always returned
Assigns order number to the order based on the settings, if not already assigned.
Sample Request
curl  https://{site}.chargebee.com/api/v2/orders/1/assign_order_number \
     -X POST  \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/orders/1/assign_order_number \
     -X POST  \
     -u {site_api_key}:

Sample Response [ JSON ]

{"order": { "amount": 32000, "amount_adjusted": 0, "amount_paid": 32000, "amount_refundable": 32000, "created_at": 1515164423, "created_by": "Auto generated by system", "customer_id": "XpbGOrnR3G1qWG1I", "deleted": false, "document_number": "CB-ORD-2", "id": "2", "invoice_id": "1", "linked_credit_notes": [], "object": "order", "order_date": 1515164422, "line_item_discounts": [ [{ "coupon_id": "Discount20Per", "discount_amount": 6400, "discount_type": "document_level_coupon", "line_item_id": "li_XpbGOrnR3G1qYk1K", "object": "line_item_discount" }], {..} ], "order_line_items": [ { "amount": 40000, "amount_adjusted": 0, "amount_paid": 32000, "description": "Classic monthly shipping yearly plan", "discount_amount": 8000, "entity_id": "classic-monthly-shipping-yearly-plan", "entity_type": "plan", "fulfillment_amount": 32000, "fulfillment_quantity": 1, "id": "o_liXpbGOomR3G1s2D6i", "invoice_id": "1", "is_shippable": true, "item_level_discount_amount": 0, "line_item_id": "li_XpbGOrnR3G1qYk1K", "object": "order_line_item", "refundable_credits": 32000, "refunded_amount": 0, "status": "queued", "tax_amount": 0 }, {..} ], "order_type": "system_generated", "paid_at": 1515164422, "paid_on": 1515164422, "payment_status": "paid", "price_type": "tax_inclusive", "refundable_credits": 32000, "refundable_credits_issued": 0, "resource_version": 1515164423000, "rounding_adjustement": 0, "shipping_address": { "country": "US", "object": "shipping_address", "validation_status": "not_validated" }, "shipping_date": 1515164422, "status": "queued", "sub_total": 32000, "subscription_id": "XpbGOrnR3G1qWG1I", "tax": 0, "tax_amount": 0, "total": 32000, "total_discount": 8000, "updated_at": 1515164423 }}

URL Format POST

https://{site}.chargebee.com/api/v2/orders/{order_id}/assign_order_number
Resource object representing order.
always returned
Cancel order and create a refundable credit note for the order.
Sample Request
curl  https://{site}.chargebee.com/api/v2/orders/8avVGOkx8U1MX/cancel \
     -X POST  \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/orders/8avVGOkx8U1MX/cancel \
     -X POST  \
     -u {site_api_key}:

Sample Response [ JSON ]

{"order": { "id": "32", "document_number": "CBO2109", "invoice_id": "__demo_inv__32", "customer_id": "fzZnR3H823Y1V", "status": "cancelled", "cancellation_reason": "product_unsatisfactory", "payment_status": "paid", "order_type": "system_generated", "price_type": "tax_exclusive", "reference_id": "SH189", "fulfillment_status": "delivered", "order_date": 1536609410, "shipping_date": 1536609410, "note": "Send this order with a gift packaging", "tracking_id": "35358658366", "batch_id": "1896", "created_by": "Auto generated by system", "shipment_carrier": "DHL", "amount": 30000, "tax_amount": 0, "amount_paid": 30000, "amount_adjusted": 0, "refundable_credits_issued": 30000, "refundable_credits": 0, "rounding_adjustement": 0, "paid_on": 1536609410, "created_at": 1536609413, "status_update_at": 1536610284, "updated_at": 1536611097, "resource_version": 1536611097713, "deleted": false, "object": "order", "paid_at": 1536609410, "total_discount": 0, "sub_total": 30000, "tax": 0, "order_line_items": [ { "id": "o_lifzbaR3HEV4PN", "invoice_id": "__demo_inv__32", "line_item_id": "li_fzbaR3HETwQI", "amount": 30000, "fulfillment_quantity": 1, "fulfillment_amount": 30000, "tax_amount": 0, "amount_paid": 30000, "amount_adjusted": 0, "refunded_amount": 30000, "refundable_credits": 0, "is_shippable": true, "status": "queued", "object": "order_line_item", "entity_id": "test-addon", "discount_amount": 0, "item_level_discount_amount": 0, "description": "test addon", "entity_type": "addon" }, {..} ], "total": 30000, "amount_refundable": 0, "linked_credit_notes": [ { "object": "order_line_item_linked_credit", "id": "__demo_cn__7", "type": "refundable", "amount": 30000 }, {..} ] }}

URL Format POST

https://{site}.chargebee.com/api/v2/orders/{order_id}/cancel
cancellation_reason
Cancellation reason.
required, enumerated string
Possible values are
shipping_cut_off_passedThe invoice has been paid late and Chargebee cancel's the first order for the invoice.product_unsatisfactoryProduct unsatisfactory.third_party_cancellationThird party cancellation.product_not_requiredProduct not required.
delivery_date_missedDelivery date missed.alternative_foundAlternative found.invoice_written_offThe invoice has been completely written off. Orders are generated by Chargebee in cancelled state.invoice_voidedThe invoice for which the order was createed has been voided.fraudulent_transactionFraudulent transaction.payment_declinedPayment declined.subscription_cancelledThe subsctiption for which the order was created has been cancelled.product_not_availableProduct not available.othersOther reason.
Show all values[+]
customer_notes
The Customer Notes to be filled in the Credit Notes created to capture this refund detail.
optional, string, max chars=1000
credit_note
Parameters for credit_note
pass parameters as credit_note[<param name>]
credit_note[total]
Credit Note amount in cents.
optional, in cents, default=0, min=0
Resource object representing order.
always returned
Create a refundable credit note for the order.
Sample Request
curl  https://{site}.chargebee.com/api/v2/orders/1/create_refundable_credit_note \
     -X POST  \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/orders/1/create_refundable_credit_note \
     -X POST  \
     -u {site_api_key}:

Sample Response [ JSON ]

{ "order": { "id": "32", "document_number": "CBO2109", "invoice_id": "__demo_inv__32", "customer_id": "fzZnR3H823Y1V", "status": "delivered", "cancellation_reason": "product_unsatisfactory", "payment_status": "paid", "order_type": "system_generated", "price_type": "tax_exclusive", "reference_id": "SH189", "fulfillment_status": "delivered", "order_date": 1536609410, "shipping_date": 1536609410, "shipped_at": 1536609410, "delivered_at": 1536609410, "note": "Send this order with a gift packaging", "tracking_id": "35358658366", "batch_id": "1896", "created_by": "Auto generated by system", "shipment_carrier": "DHL", "amount": 30000, "tax_amount": 0, "amount_paid": 30000, "amount_adjusted": 0, "refundable_credits_issued": 30000, "refundable_credits": 0, "rounding_adjustement": 0, "paid_on": 1536609410, "created_at": 1536609413, "status_update_at": 1536610284, "updated_at": 1536611097, "resource_version": 1536611097713, "deleted": false, "object": "order", "paid_at": 1536609410, "total_discount": 0, "sub_total": 30000, "tax": 0, "order_line_items": [ { "id": "o_lifzbaR3HEV4PN", "invoice_id": "__demo_inv__32", "line_item_id": "li_fzbaR3HETwQI", "amount": 30000, "fulfillment_quantity": 1, "fulfillment_amount": 30000, "tax_amount": 0, "amount_paid": 30000, "amount_adjusted": 0, "refunded_amount": 30000, "refundable_credits": 0, "is_shippable": true, "status": "queued", "object": "order_line_item", "entity_id": "test-addon", "discount_amount": 0, "item_level_discount_amount": 0, "description": "test addon", "entity_type": "addon" }, {..} ], "total": 30000, "amount_refundable": 0, "linked_credit_notes": [ { "object": "order_line_item_linked_credit", "id": "__demo_cn__7", "type": "refundable", "amount": 30000 }, {..} ] }, "credit_note": { "id": "__demo_cn__7", "customer_id": "fzZnR3H823Y1V", "reference_invoice_id": "__demo_inv__32", "type": "refundable", "reason_code": "product_unsatisfactory", "status": "refunded", "date": 1536609410, "price_type": "tax_exclusive", "exchange_rate": 1.0, "total": 30000, "amount_allocated": 0, "amount_refunded": 30000, "amount_available": 0, "refunded_at": 1536609443, "updated_at": 1536609443, "resource_version": 1536609443259, "deleted": false, "object": "credit_note", "currency_code": "USD", "round_off_amount": 0, "base_currency_code": "USD", "sub_total": 30000, "line_items": [ { "id": "li_fzbaR3HEcvTX", "date_from": 1536609410, "date_to": 1536609410, "unit_amount": 30000, "quantity": 1, "pricing_model": "flat_fee", "is_taxed": false, "tax_amount": 0, "object": "line_item", "amount": 30000, "description": "test addon", "entity_type": "addon", "entity_id": "test-addon", "tax_exempt_reason": "tax_not_configured", "discount_amount": 0, "item_level_discount_amount": 0 }, {..} ], "taxes": [], "line_item_taxes": [], "line_item_discounts": [], "linked_refunds": [ { "applied_amount": 30000, "applied_at": 1536609443, "txn_id": "txn_fzbaR3HEcLcU", "txn_status": "success", "txn_date": 1536609410, "txn_amount": 30000 }, {..} ], "allocations": [] } }

URL Format POST

https://{site}.chargebee.com/api/v2/orders/{order_id}/create_refundable_credit_note
customer_notes
The Customer Notes to be filled in the Credit Notes created to capture this refund detail.
optional, string, max chars=1000
credit_note
Parameters for credit_note
pass parameters as credit_note[<param name>]
credit_note[reason_code]
The reason for issuing this Credit Note. The following reason codes are supported now.
required, enumerated string, default=product_unsatisfactory
Possible values are
write_offThis reason will be set automatically for the Credit Notes created during invoice Write Off operation.subscription_changeThis reason will be set automatically for Credit Notes created during Change Subscription operation when proration is enabled.subscription_cancellationThis reason will be set automatically for Credit Notes created during cancel subscription operation.subscription_pauseThis reason will be automatically set to credit notes created during pause/resume subscription operation.
chargebackCan be set when you are recording your customer Chargebacks.product_unsatisfactoryProduct Unsatisfactory.service_unsatisfactoryService Unsatisfactory.order_changeOrder Change.order_cancellationOrder Cancellation.waiverWaiver.otherCan be set when none of the above reason codes are applicable.fraudulentFRAUDULENT.
Show all values[+]
credit_note[total]
Credit Note amount in cents.
required, in cents, default=0, min=0
Resource object representing order.
always returned
Reopen a cancelled order.
Sample Request
curl  https://{site}.chargebee.com/api/v2/orders/1/reopen \
     -X POST  \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/orders/1/reopen \
     -X POST  \
     -u {site_api_key}:

Sample Response [ JSON ]

{"order": { "amount": 32000, "amount_adjusted": 0, "amount_paid": 32000, "amount_refundable": 32000, "created_at": 1515164423, "created_by": "Auto generated by system", "customer_id": "XpbGOrnR3G1qWG1I", "deleted": false, "document_number": "CB-ORD-1", "id": "1", "invoice_id": "1", "linked_credit_notes": [], "object": "order", "order_date": 1515164422, "line_item_discounts": [ [{ "coupon_id": "Discount20Per", "discount_amount": 6400, "discount_type": "document_level_coupon", "line_item_id": "li_XpbGOrnR3G1qYk1K", "object": "line_item_discount" }], {..} ], "order_line_items": [ { "amount": 40000, "amount_adjusted": 0, "amount_paid": 32000, "description": "Classic monthly shipping yearly plan", "discount_amount": 8000, "entity_id": "classic-monthly-shipping-yearly-plan", "entity_type": "plan", "fulfillment_amount": 32000, "fulfillment_quantity": 1, "id": "o_liXpbGOomR3G1s2D6i", "invoice_id": "1", "is_shippable": true, "item_level_discount_amount": 0, "line_item_id": "li_XpbGOrnR3G1qYk1K", "object": "order_line_item", "refundable_credits": 32000, "refunded_amount": 0, "status": "queued", "tax_amount": 0 }, {..} ], "order_type": "system_generated", "paid_at": 1515164422, "paid_on": 1515164422, "payment_status": "paid", "price_type": "tax_inclusive", "refundable_credits": 32000, "refundable_credits_issued": 0, "resource_version": 1515164423000, "rounding_adjustement": 0, "shipping_address": { "country": "US", "object": "shipping_address", "validation_status": "not_validated" }, "shipping_date": 1515164422, "status": "queued", "sub_total": 32000, "subscription_id": "XpbGOrnR3G1qWG1I", "tax": 0, "tax_amount": 0, "total": 32000, "total_discount": 8000, "updated_at": 1515164423 }}

URL Format POST

https://{site}.chargebee.com/api/v2/orders/{order_id}/reopen
void_cancellation_credit_notes
Flag to void credit notes created for cancellation if they are unused.
optional, boolean
Resource object representing order.
always returned
Retrieves an order corresponding to the order id passed.
Sample Request
curl  https://{site}.chargebee.com/api/v2/orders/1 \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/orders/1 \
     -u {site_api_key}:

Sample Response [ JSON ]

{"order": { "amount": 32000, "amount_adjusted": 0, "amount_paid": 32000, "amount_refundable": 32000, "created_at": 1515164423, "created_by": "Auto generated by system", "customer_id": "XpbGOrnR3G1qWG1I", "deleted": false, "document_number": "CB-ORD-1", "id": "1", "invoice_id": "1", "linked_credit_notes": [], "object": "order", "order_date": 1515164422, "line_item_discounts": [ [{ "coupon_id": "Discount20Per", "discount_amount": 6400, "discount_type": "document_level_coupon", "line_item_id": "li_XpbGOrnR3G1qYk1K", "object": "line_item_discount" }], {..} ], "order_line_items": [ { "amount": 40000, "amount_adjusted": 0, "amount_paid": 32000, "description": "Classic monthly shipping yearly plan", "discount_amount": 8000, "entity_id": "classic-monthly-shipping-yearly-plan", "entity_type": "plan", "fulfillment_amount": 32000, "fulfillment_quantity": 1, "id": "o_liXpbGOomR3G1s2D6i", "invoice_id": "1", "is_shippable": true, "item_level_discount_amount": 0, "line_item_id": "li_XpbGOrnR3G1qYk1K", "object": "order_line_item", "refundable_credits": 32000, "refunded_amount": 0, "status": "queued", "tax_amount": 0 }, {..} ], "order_type": "system_generated", "paid_at": 1515164422, "paid_on": 1515164422, "payment_status": "paid", "price_type": "tax_inclusive", "refundable_credits": 32000, "refundable_credits_issued": 0, "resource_version": 1515164423000, "rounding_adjustement": 0, "shipping_address": { "country": "US", "object": "shipping_address", "validation_status": "not_validated" }, "shipping_date": 1515164422, "status": "queued", "sub_total": 32000, "subscription_id": "XpbGOrnR3G1qWG1I", "tax": 0, "tax_amount": 0, "total": 32000, "total_discount": 8000, "updated_at": 1515164423 }}

URL Format GET

https://{site}.chargebee.com/api/v2/orders/{order_id}
Resource object representing order.
always returned

Sample admin console URL

https://{site}.chargebee.com/admin-console/orders/1
Lists the available orders.
Sample Request
curl  https://{site}.chargebee.com/api/v2/orders \
     -G  \
     -u {site_api_key}: \
     --data-urlencode limit="5" \
     --data-urlencode status[is]="queued" \
     --data-urlencode sort_by[asc]="created_at"
copy
curl  https://{site}.chargebee.com/api/v2/orders \
     -G  \
     -u {site_api_key}: \
     --data-urlencode limit="5" \
     --data-urlencode status[is]="queued" \
     --data-urlencode sort_by[asc]="created_at"

Sample Response [ JSON ]

{ "list": [ {"order": { "id": "1", "document_number": "1", "invoice_id": "INV-092018-194", "subscription_id": "1mklhi2R4ePTnLVi", "customer_id": "1mklhi2R4ePTnLVi", "status": "queued", "payment_status": "paid", "order_type": "system_generated", "price_type": "tax_inclusive", "order_date": 1537868031, "shipping_date": 1537868031, "created_by": "Auto generated by system", "tax": 3000, "amount_paid": 33000, "amount_adjusted": 0, "refundable_credits_issued": 0, "refundable_credits": 33000, "rounding_adjustement": 0, "paid_on": 1537868031, "created_at": 1537868034, "updated_at": 1537939744, "resource_version": 1537939744934, "deleted": false, "object": "order", "discount": 0, "sub_total": 30000, "order_line_items": [ { "id": "o_li1mklhi2R4ePXxoWA", "invoice_id": "INV-092018-194", "invoice_line_item_id": "li_1mklhi2R4ePTpVVk", "unit_price": 33000, "fulfillment_quantity": 1, "fulfillment_amount": 33000, "tax_amount": 3000, "amount_paid": 33000, "amount_adjusted": 0, "refundable_credits_issued": 0, "refundable_credits": 33000, "is_shippable": true, "status": "queued", "object": "order_line_item", "entity_id": "classic-monthly-shipping-yearly-plan", "discount_amount": 0, "item_level_discount_amount": 0, "description": "Classic monthly shipping yearly plan", "entity_type": "plan" }, {..} ], "line_item_taxes": [ { "tax_name": "test", "tax_rate": 10.0, "tax_juris_type": "country", "tax_juris_name": "United States", "tax_juris_code": "US", "object": "line_item_tax", "line_item_id": "li_1mklhi2R4ePTpVVk", "tax_amount": 3000 }, {..} ], "total": 33000, "amount_refundable": 33000, "currency_code": "EUR", "base_currency_code": "EUR", "shipping_address": { "state_code": "AL", "state": "Alabama", "country": "US", "validation_status": "not_validated", "object": "shipping_address" }, "billing_address": { "state_code": "AL", "state": "Alabama", "country": "US", "validation_status": "not_validated", "object": "billing_address" }, "linked_credit_notes": [] }}, {..} ], "next_offset": "[\"1528093753000\",\"214000000003\"]" }

URL Format GET

https://{site}.chargebee.com/api/v2/orders
limit
Limits the number of resources to be returned.
optional, integer, default=10, min=1, max=100
offset
Allows you to fetch the next set of resources. The value used for this parameter must be the value returned for next_offset parameter in the previous API call.
optional, string, max chars=1000
include_deleted
If set to true, includes the deleted resources in the response. For the deleted resources in the response, the 'deleted' attribute will be 'true'.
optional, boolean, default=false
sort_by[<sort-order>]
Sorts based on the specified attribute.
Supported attributes : created_at
Supported sort-orders : asc, desc

Example sort_by[asc] = "created_at"
This will sort the result based on the 'created_at' attribute in ascending(earliest first) order.
optional, string filter
Filter Params
For operator usages, see the Pagination and Filtering section.
id[<operator>]
To filter based on Order Id.
Supported operators : is, is_not, starts_with, in, not_in

Example id[is] = "890"
optional, string filter
invoice_id[<operator>]
To filter based on Order Invoice Id.
Supported operators : is, is_not, starts_with, in, not_in

Example invoice_id[is] = "INVOICE_982"
optional, string filter
status[<operator>]
To filter based on Order Status. Possible values are : new, processing, complete, cancelled, voided, queued, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned.
Supported operators : is, is_not, in, not_in

Example status[is] = "queued"
optional, enumerated string filter
shipping_date[<operator>]
To filter based on Order Shipping Date.
Supported operators : after, before, on, between

Example shipping_date[after] = "null"
optional, timestamp(UTC) in seconds filter
order_date[<operator>]
To filter based on Order Order Date.
Supported operators : after, before, on, between

Example order_date[after] = "null"
optional, timestamp(UTC) in seconds filter
paid_on[<operator>]
To filter based on Order Paid On.
Supported operators : after, before, on, between

Example paid_on[after] = "null"
optional, timestamp(UTC) in seconds filter
updated_at[<operator>]
To filter based on Order Resource Updated At.
Supported operators : after, before, on, between

Example updated_at[before] = "1243545465"
optional, timestamp(UTC) in seconds filter
created_at[<operator>]
To filter based on Order Created At.
Supported operators : after, before, on, between

Example created_at[after] = "1435054328"
optional, timestamp(UTC) in seconds filter
Resource object representing order.
always returned
next_offset
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter “offset”.
optional, string, max chars=1000