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).
Uniquely identifies the order. It is the api identifier for the order.
string, max chars=40
The order's serial number.
optional, string, max chars=50
The invoice number which acts as an identifier for invoice and is generated sequentially.
optional, string, max chars=50
The subscription for which the order is created.
optional, string, max chars=50
The customer for which the order is created.
optional, string, max chars=50
The status of this order.
optional, enumerated string, default=newPossible 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.
optional, enumerated stringPossible 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[+]
The payment status of the order.
optional, enumerated stringPossible values are
not_paidNOT_PAID.paidPAID.
Order type.
optional, enumerated stringPossible 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.
The price type of the order.
enumerated string, default=tax_exclusivePossible values are
tax_exclusiveAll amounts in the document are exclusive of tax.tax_inclusiveAll amounts in the document are inclusive of tax.
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
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
The date on which the order will start getting processed.
optional, timestamp(UTC) in seconds
This is the date on which the order will be delivered to the customer.
optional, timestamp(UTC) in seconds
The custom note for the order.
optional, string, max chars=600
The tracking id of the order.
optional, string, max chars=50
Unique id to identify a group of orders.
optional, string, max chars=50
The source (or the user) from where the order has been created.
optional, string, max chars=50
Shipment carrier.
optional, string, max chars=50
The total round off taken from the invoice level.
optional, in cents, min=0
The total tax for the order.
optional, in cents, min=0
Total amount paid for the order.
optional, in cents, min=0
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
The total amount that can be issued as credits for this order.
optional, in cents, min=0
Rounding adjustment.
optional, in cents
The timestamp indicating the date & time the order's invoice got paid.
optional, timestamp(UTC) in seconds
The time after which an order becomes unservicable.
optional, timestamp(UTC) in seconds
The time at which the order was created.
timestamp(UTC) in seconds
The time at which the order status was last updated.
optional, timestamp(UTC) in seconds
The time at which the order was delivered.
optional, timestamp(UTC) in seconds
The time at which the order was shipped.
optional, timestamp(UTC) in seconds
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
The order's last modified time.
optional, timestamp(UTC) in seconds
The time at which the order was cancelled.
optional, timestamp(UTC) in seconds
Total discount given for the order.
optional, in cents, min=0
The order's sub-total.
optional, in cents, min=0
Total amount charged for the order.
optional, in cents, min=0
Indicates that this resource has been deleted.
boolean
The currency code (ISO 4217 format) for the invoice.
optional, string, max chars=3
Boolean indicating whether this order is gifted or not.
optional, boolean, default=false
The gift message added by the gifter during purchase.
optional, string, max chars=500
The gift_id if the order is a gift order.
optional, string, max chars=50
The list of line items for this order.
optional, list of order_line_item
Order line item attributes
The identifier for the order line item.
string, max chars=40
The invoice of the line item.
string, max chars=50
The invoice line item id associated with this order line item.
string, max chars=40
The unit price.
optional, in cents, min=0
The line item description.
optional, string, max chars=250
The sub total, of the order line item.
optional, in cents, min=0
The quantity that is going to get fulfilled for this order.
optional, integer, min=0
The amount that is going to get fulfilled for this order(amount after tax and discount).
optional, in cents, min=0
The total tax applied on this line item.
optional, in cents, min=0
The total amount paid on the invoice, on behalf of this delivery.
optional, in cents, min=0
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
The total amount issued as credits on behalf of this delivery.
optional, in cents, min=0
Appliable only if configured to include non shippable charges in orders, specifies if the charge is applicable for shipping.
boolean
The SKU for the delivery.
optional, string, max chars=250
The status of this order.
optional, enumerated string, default=queuedPossible 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.cancelledThe order has been returned after delivery.
Specifies the modelled entity (
plan /
addon etc) this line item is based on.
enumerated stringPossible 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
The discount given on the order line item.
optional, in cents, min=0
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 for the order.
optional, shipping_address
Shipping addres attributes
The first name of the contact.
optional, string, max chars=150
The last name of the contact.
optional, string, max chars=150
The email address.
optional, string, max chars=70
The company name.
optional, string, max chars=250
The phone number.
optional, string, max chars=50
Address line 1.
optional, string, max chars=180
Address line 2.
optional, string, max chars=150
Address line 3.
optional, string, max chars=150
The name of the city.
optional, string, max chars=50
The
ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set
state_code
as
AZ
(not
US-AZ
). For Tamil Nadu (India), set as
TN
(not
IN-TN
). For British Columbia (Canada), set as
BC
(not
CA-BC
).
optional, string, max chars=50
The state/province name.
optional, string, max chars=50
Zip or Postal code.
optional, string, max chars=20
The address verification status.
optional, enumerated string, default=not_validatedPossible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
Billing address for the order.
optional, billing_address
Billing addres attributes
The first name of the billing contact.
optional, string, max chars=150
The last name of the billing contact.
optional, string, max chars=150
The email address.
optional, string, max chars=70
The company name.
optional, string, max chars=250
The phone number.
optional, string, max chars=50
Address line 1.
optional, string, max chars=150
Address line 2.
optional, string, max chars=150
Address line 3.
optional, string, max chars=150
The name of the city.
optional, string, max chars=50
The
ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set
state_code
as
AZ
(not
US-AZ
). For Tamil Nadu (India), set as
TN
(not
IN-TN
). For British Columbia (Canada), set as
BC
(not
CA-BC
).
optional, string, max chars=50
State or Province.
optional, string, max chars=50
Zip or Postal code.
optional, string, max chars=20
The address verification status.
optional, enumerated string, default=not_validatedPossible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
The list of taxes applied on the order line items.
optional, list of line_item_tax
The unique reference id of the line item for which the tax is applicable.
optional, string, max chars=40
The name of the tax applied.
string, max chars=100
The rate of tax used to calculate tax amount.
double, default=0.0, min=0.0, max=100.0
Indicates if tax is applied only on a portion of the line item amount.
optional, boolean
Indicates the non-compliance tax that should not be reported to the jurisdiction.
optional, boolean
Indicates the actual portion of the line item amount that is taxable.
in cents, min=0
The tax amount.
in cents, min=0
The type of tax jurisdiction.
optional, enumerated stringPossible values are
countryThe tax jurisdiction is a country.federalThe tax jurisdiction is a federal.stateThe tax jurisdiction is a state.countyThe tax jurisdiction is a county.cityThe tax jurisdiction is a city.specialSpecial tax jurisdiction.unincorporatedCombined tax of state and county.otherJurisdictions other than the ones listed above.
The name of the tax jurisdiction.
optional, string, max chars=250
The tax jurisdiction code.
optional, string, max chars=250
tax_amount_in_local_currency
Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.
optional, in cents, min=0
The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.
optional, string, max chars=null
The list of discounts applied for the order.
optional, list of line_item_discount
Line item discount attributes
The unique reference id of the line item for which the discount is applicable.
string, max chars=50
Type of this discount line item.
enumerated stringPossible 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.
optional, string, max chars=50
Discount amount.
in cents, min=0
The credit notes linked to the order.
optional, list of order_line_item_linked_credit
Linked credit note attributes
The amount issued for this order.
optional, in cents, min=0
The credit note type.
enumerated stringPossible values are
adjustmentAdjustment Credit Note.refundableRefundable Credit Note.
Credit-note id.
string, max chars=50
The credit note status.
enumerated stringPossible 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 cancelled.
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
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.
Sample Request
curl https://{site}.chargebee.com/api/v2/orders \
-u {site_api_key}:\
-d invoice_id="__demo_inv__2"
copy
curl https://{site}.chargebee.com/api/v2/orders \
-u {site_api_key}:\
-d invoice_id="__demo_inv__2"
Sample Response [ JSON ]
Show more...
{"order": {
"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
}}
URL Format POST
https://{site}.chargebee.com/api/v2/orders
Uniquely identifies the order. If not given, this will be auto-generated.
optional, string, max chars=40
The invoice number which acts as an identifier for invoice and is generated sequentially.
required, string, max chars=50
The order status.
optional, enumerated stringPossible 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 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
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
The custom note for the order.
optional, string, max chars=600
The tracking id of the order.
optional, string, max chars=50
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 \
-u {site_api_key}:\
-d status="delivered" \
-d shipped_at=1517073906 \
-d delivered_at=1517678706
copy
curl https://{site}.chargebee.com/api/v2/orders/1 \
-u {site_api_key}:\
-d status="delivered" \
-d shipped_at=1517073906 \
-d delivered_at=1517678706
# updates the order shipping address.
curl https://{site}.chargebee.com/api/v2/orders/__test__KyVnHhSBWlrq92oh \
-u {site_api_key}:\
-d shipping_address[first_name]="John" \
-d shipping_address[last_name]="Doe" \
-d shipping_address[email]="john@user.com" \
-d shipping_address[line1]="PO Box 9999" \
-d shipping_address[city]="Walnut" \
-d shipping_address[state]="California" \
-d shipping_address[zip]="91789" \
-d shipping_address[country]="US"
Sample Response [ JSON ]
Show more...
{"order": {
"amount_adjusted": 0,
"amount_paid": 40000,
"base_currency_code": "USD",
"created_at": 1517505909,
"created_by": "Auto generated by system",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWlr4r2o7",
"deleted": false,
"delivered_at": 1517678706,
"discount": 0,
"document_number": "1",
"exchange_rate": 1,
"id": "1",
"invoice_id": "__demo_inv__1",
"is_gifted": false,
"linked_credit_notes": [],
"object": "order",
"order_date": 1517505907,
"order_line_items": [
{
"amount": 40000,
"amount_adjusted": 0,
"amount_paid": 40000,
"description": "MB1S1P",
"discount_amount": 0,
"entity_id": "MB1S1P",
"entity_type": "plan",
"fulfillment_amount": 40000,
"fulfillment_quantity": 1,
"id": "o_li__test__KyVnGlSBWlrF727W",
"invoice_id": "__demo_inv__1",
"invoice_line_item_id": "li___test__KyVnHhSBWlr692o9",
"is_shippable": true,
"item_level_discount_amount": 0,
"object": "order_line_item",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"status": "queued",
"tax_amount": 0,
"unit_price": 40000
},
{..}
],
"order_type": "system_generated",
"paid_on": 1517505907,
"payment_status": "paid",
"price_type": "tax_exclusive",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"resource_version": 1517678706000,
"rounding_adjustement": 0,
"shipped_at": 1517073906,
"shipping_date": 1517505907,
"status": "delivered",
"status_update_at": 1517678706,
"sub_total": 40000,
"subscription_id": "__test__KyVnHhSBWlr4r2o7",
"tax": 0,
"total": 40000,
"updated_at": 1517678706
}}
Show more...
{"order": {
"created_at": 1517678708,
"created_by": "full_access_key_v1",
"deleted": false,
"id": "__test__KyVnHhSBWlrq92oh",
"invoice_id": "__demo_inv__2",
"object": "order",
"order_type": "manual",
"price_type": "tax_exclusive",
"status": "new",
"status_update_at": 1517678708
}}
URL Format POST
https://{site}.chargebee.com/api/v2/orders/{order_id}
Reference id is the unique identifier of the order in the shipping/order management application.
optional, string, max chars=50
Unique id to identify a group of orders.
optional, string, max chars=50
The custom note for the order.
optional, string, max chars=600
The date on which the order should be shipped to the customer.
optional, timestamp(UTC) in seconds
The order date.
optional, timestamp(UTC) in seconds
The time at which the order was cancelled.
optional, timestamp(UTC) in seconds
Cancellation reason.
optional, enumerated stringPossible 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[+]
The time at which the order was shipped.
optional, timestamp(UTC) in seconds
The time at which the order was delivered.
optional, timestamp(UTC) in seconds
The tracking id of the order.
optional, string, max chars=50
The carrier used to ship the goods to the customer. Ex:- FedEx.
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;.
optional, string, max chars=50
The order status.
optional, enumerated stringPossible 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[+]
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
The first name of the contact.
optional, string, max chars=150
shipping_address[last_name]
The last name of the contact.
optional, string, max chars=150
The email address.
optional, string, max chars=70
shipping_address[company]
The company name.
optional, string, max chars=250
The phone number.
optional, string, max chars=50
Address line 1.
optional, string, max chars=180
Address line 2.
optional, string, max chars=150
Address line 3.
optional, string, max chars=150
The name of the 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
state_code
as
AZ
(not
US-AZ
). For Tamil Nadu (India), set as
TN
(not
IN-TN
). For British Columbia (Canada), set as
BC
(not
CA-BC
).
optional, string, max chars=50
The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code
is provided.
optional, string, max chars=50
Zip or Postal code.
optional, string, max chars=20
shipping_address[country]
shipping_address[validation_status]
The address verification status.
optional, enumerated stringPossible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
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 stringPossible 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.cancelledThe 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
This API is not enabled for live sites by default. Please contact support@chargebee.com to get this enabled.
Sample Request
curl https://{site}.chargebee.com/api/v2/orders/import_order \
-u {site_api_key}:\
-d invoice_id="ship_inv" \
-d subscription_id="__test__KyVnHhSBWlndM2mg" \
-d order_date=1519879210 \
-d status="queued" \
-d created_at=1517460010 \
-d shipping_date=1522557610
copy
curl https://{site}.chargebee.com/api/v2/orders/import_order \
-u {site_api_key}:\
-d invoice_id="ship_inv" \
-d subscription_id="__test__KyVnHhSBWlndM2mg" \
-d order_date=1519879210 \
-d status="queued" \
-d created_at=1517460010 \
-d shipping_date=1522557610
Sample Response [ JSON ]
Show more...
{"order": {
"amount_adjusted": 0,
"amount_paid": 0,
"base_currency_code": "USD",
"created_at": 1517460010,
"created_by": "Auto generated by system",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWlndM2mg",
"deleted": false,
"discount": 0,
"exchange_rate": 1,
"id": "2",
"invoice_id": "ship_inv",
"is_gifted": false,
"linked_credit_notes": [],
"object": "order",
"order_date": 1519879210,
"order_line_items": [
{
"amount": 2000,
"amount_adjusted": 0,
"amount_paid": 0,
"description": "shippable plan",
"discount_amount": 0,
"entity_id": "shippable",
"entity_type": "plan",
"fulfillment_amount": 2000,
"fulfillment_quantity": 1,
"id": "o_li__test__KyVnHhSBWloGS2mp",
"invoice_id": "ship_inv",
"invoice_line_item_id": "li___test__KyVnHhSBWlniM2mn",
"is_shippable": true,
"item_level_discount_amount": 0,
"object": "order_line_item",
"refundable_credits": 0,
"refundable_credits_issued": 0,
"status": "queued",
"tax_amount": 0,
"unit_price": 2000
},
{..}
],
"order_type": "system_generated",
"payment_status": "not_paid",
"price_type": "tax_exclusive",
"refundable_credits": 0,
"refundable_credits_issued": 0,
"resource_version": 1517678694000,
"rounding_adjustement": 0,
"shipping_date": 1522557610,
"status": "queued",
"sub_total": 2000,
"subscription_id": "__test__KyVnHhSBWlndM2mg",
"tax": 0,
"total": 2000,
"updated_at": 1517678694
}}
URL Format POST
https://{site}.chargebee.com/api/v2/orders/import_order
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.
.
optional, string, max chars=40
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’
.
optional, string, max chars=50
The invoice number which acts as an identifier for invoice and is generated sequentially.
required, string, max chars=50
The status of this order.
required, enumerated string, default=newPossible values are
cancelledOrder has been cancelled. 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[+]
The subscription for which the order is created.
optional, string, max chars=50
The customer for which the order is created.
optional, string, max chars=50
The time at which the order was created.
required, timestamp(UTC) in seconds
The date on which the order will start getting processed.
required, timestamp(UTC) in seconds
This is the date on which the order has to be shipped to the customer.
required, timestamp(UTC) in seconds
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..
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;.
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.
.
optional, string, max chars=50
The custom note for the order.
optional, string, max chars=600
The tracking id of the order.
optional, string, max chars=50
Unique id to identify a group of orders.
optional, string, max chars=50
Shipment carrier.
optional, string, max chars=50
The time after which an order becomes unservicable.
optional, timestamp(UTC) in seconds
The time at which the order was delivered.
optional, timestamp(UTC) in seconds
The time at which the order was shipped.
optional, timestamp(UTC) in seconds
The time at which the order was cancelled.
optional, timestamp(UTC) in seconds
Cancellation reason.
optional, enumerated stringPossible 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[+]
refundable_credits_issued
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.
optional, in cents, min=0
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
The first name of the contact.
optional, string, max chars=150
shipping_address[last_name]
The last name of the contact.
optional, string, max chars=150
The email address.
optional, string, max chars=70
shipping_address[company]
The company name.
optional, string, max chars=250
The phone number.
optional, string, max chars=50
Address line 1.
optional, string, max chars=180
Address line 2.
optional, string, max chars=150
Address line 3.
optional, string, max chars=150
The name of the 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
state_code
as
AZ
(not
US-AZ
). For Tamil Nadu (India), set as
TN
(not
IN-TN
). For British Columbia (Canada), set as
BC
(not
CA-BC
).
optional, string, max chars=50
The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code
is provided.
optional, string, max chars=50
Zip or Postal code.
optional, string, max chars=20
shipping_address[country]
shipping_address[validation_status]
The address verification status.
optional, enumerated string, default=not_validatedPossible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
Parameters for billing_address
pass parameters as billing_address[<param name>]
billing_address[first_name]
The first name of the billing contact.
optional, string, max chars=150
billing_address[last_name]
The last name of the billing contact.
optional, string, max chars=150
The email address.
optional, string, max chars=70
The company name.
optional, string, max chars=250
The phone number.
optional, string, max chars=50
Address line 1.
optional, string, max chars=150
Address line 2.
optional, string, max chars=150
Address line 3.
optional, string, max chars=150
The name of the city.
optional, string, max chars=50
billing_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
state_code
as
AZ
(not
US-AZ
). For Tamil Nadu (India), set as
TN
(not
IN-TN
). For British Columbia (Canada), set as
BC
(not
CA-BC
).
optional, string, max chars=50
The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code
is provided.
optional, string, max chars=50
Zip or Postal code.
optional, string, max chars=20
billing_address[validation_status]
The address verification status.
optional, enumerated string, default=not_validatedPossible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
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 ]
Show more...
{"order": {
"amount_adjusted": 0,
"amount_paid": 40000,
"base_currency_code": "USD",
"created_at": 1517505883,
"created_by": "Auto generated by system",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWlkX22lL",
"deleted": false,
"discount": 0,
"document_number": "1",
"exchange_rate": 1,
"id": "1",
"invoice_id": "__demo_inv__1",
"is_gifted": false,
"linked_credit_notes": [],
"object": "order",
"order_date": 1517505882,
"order_line_items": [
{
"amount": 40000,
"amount_adjusted": 0,
"amount_paid": 40000,
"description": "MB1S1P",
"discount_amount": 0,
"entity_id": "MB1S1P",
"entity_type": "plan",
"fulfillment_amount": 40000,
"fulfillment_quantity": 1,
"id": "o_li__test__KyVnGlSBWlkkr25u",
"invoice_id": "__demo_inv__1",
"invoice_line_item_id": "li___test__KyVnHhSBWlkYO2lN",
"is_shippable": true,
"item_level_discount_amount": 0,
"object": "order_line_item",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"status": "queued",
"tax_amount": 0,
"unit_price": 40000
},
{..}
],
"order_type": "system_generated",
"paid_on": 1517505882,
"payment_status": "paid",
"price_type": "tax_exclusive",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"resource_version": 1517678681000,
"rounding_adjustement": 0,
"shipping_date": 1517505882,
"status": "queued",
"sub_total": 40000,
"subscription_id": "__test__KyVnHhSBWlkX22lL",
"tax": 0,
"total": 40000,
"updated_at": 1517678681
}}
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/1/cancel \
-X POST \
-u {site_api_key}:\
-d cancellation_reason="product_unsatisfactory" \
-d customer_notes="Products were defective"
copy
curl https://{site}.chargebee.com/api/v2/orders/1/cancel \
-X POST \
-u {site_api_key}:\
-d cancellation_reason="product_unsatisfactory" \
-d customer_notes="Products were defective"
Sample Response [ JSON ]
Show more...
{"order": {
"amount_adjusted": 0,
"amount_paid": 40000,
"base_currency_code": "USD",
"cancellation_reason": "product_unsatisfactory",
"cancelled_at": 1517678683,
"created_at": 1517505885,
"created_by": "Auto generated by system",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWll5K2lX",
"deleted": false,
"discount": 0,
"document_number": "1",
"exchange_rate": 1,
"id": "1",
"invoice_id": "__demo_inv__1",
"is_gifted": false,
"linked_credit_notes": [],
"object": "order",
"order_date": 1517505884,
"order_line_items": [
{
"amount": 40000,
"amount_adjusted": 0,
"amount_paid": 40000,
"description": "MB1S1P",
"discount_amount": 0,
"entity_id": "MB1S1P",
"entity_type": "plan",
"fulfillment_amount": 40000,
"fulfillment_quantity": 1,
"id": "o_li__test__KyVnGlSBWllJc264",
"invoice_id": "__demo_inv__1",
"invoice_line_item_id": "li___test__KyVnHhSBWll852lZ",
"is_shippable": true,
"item_level_discount_amount": 0,
"object": "order_line_item",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"status": "queued",
"tax_amount": 0,
"unit_price": 40000
},
{..}
],
"order_type": "system_generated",
"paid_on": 1517505884,
"payment_status": "paid",
"price_type": "tax_exclusive",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"resource_version": 1517678683000,
"rounding_adjustement": 0,
"shipping_date": 1517505884,
"status": "cancelled",
"status_update_at": 1517678683,
"sub_total": 40000,
"subscription_id": "__test__KyVnHhSBWll5K2lX",
"tax": 0,
"total": 40000,
"updated_at": 1517678683
}}
URL Format POST
https://{site}.chargebee.com/api/v2/orders/{order_id}/cancel
Cancellation reason.
required, enumerated stringPossible 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[+]
The Customer Notes to be filled in the Credit Notes created to capture this refund detail.
optional, string, max chars=2000
The time at which the order was cancelled.
optional, timestamp(UTC) in seconds
Parameters for credit_note
pass parameters as credit_note[<param name>]
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}:\
-d credit_note[reason_code]="product_unsatisfactory" \
-d credit_note[total]=100
copy
curl https://{site}.chargebee.com/api/v2/orders/1/create_refundable_credit_note \
-X POST \
-u {site_api_key}:\
-d credit_note[reason_code]="product_unsatisfactory" \
-d credit_note[total]=100
Sample Response [ JSON ]
Show more...
{"order": {
"amount_adjusted": 0,
"amount_paid": 40000,
"base_currency_code": "USD",
"created_at": 1517505903,
"created_by": "Auto generated by system",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWlpZx2nQ",
"deleted": false,
"discount": 0,
"document_number": "1",
"exchange_rate": 1,
"id": "1",
"invoice_id": "__demo_inv__1",
"is_gifted": false,
"linked_credit_notes": [
{
"amount": 100,
"id": "__demo_cn__1",
"object": "order_line_item_linked_credit",
"status": "refund_due",
"type": "refundable"
},
{..}
],
"object": "order",
"order_date": 1517505902,
"order_line_items": [
{
"amount": 40000,
"amount_adjusted": 0,
"amount_paid": 40000,
"description": "MB1S1P",
"discount_amount": 0,
"entity_id": "MB1S1P",
"entity_type": "plan",
"fulfillment_amount": 40000,
"fulfillment_quantity": 1,
"id": "o_li__test__KyVnGlSBWlpkB272",
"invoice_id": "__demo_inv__1",
"invoice_line_item_id": "li___test__KyVnHhSBWlpbC2nS",
"is_shippable": true,
"item_level_discount_amount": 0,
"object": "order_line_item",
"refundable_credits": 39900,
"refundable_credits_issued": 100,
"status": "queued",
"tax_amount": 0,
"unit_price": 40000
},
{..}
],
"order_type": "system_generated",
"paid_on": 1517505902,
"payment_status": "paid",
"price_type": "tax_exclusive",
"refundable_credits": 39900,
"refundable_credits_issued": 100,
"resource_version": 1517678701000,
"rounding_adjustement": 0,
"shipping_date": 1517505902,
"status": "queued",
"sub_total": 40000,
"subscription_id": "__test__KyVnHhSBWlpZx2nQ",
"tax": 0,
"total": 40000,
"updated_at": 1517678701
}}
URL Format POST
https://{site}.chargebee.com/api/v2/orders/{order_id}/create_refundable_credit_note
The Customer Notes to be filled in the Credit Notes created to capture this refund detail.
optional, string, max chars=2000
Parameters for credit_note
pass parameters as credit_note[<param name>]
The reason for issuing this Credit Note. The following reason codes are supported now[Deprecated; use the
create_reason_code parameter instead].
required, enumerated stringPossible 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 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 ]
Show more...
{"order": {
"amount_adjusted": 0,
"amount_paid": 40000,
"base_currency_code": "USD",
"cancelled_at": 1517678702,
"created_at": 1517505905,
"created_by": "Auto generated by system",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWlq8E2ni",
"deleted": false,
"discount": 0,
"document_number": "1",
"exchange_rate": 1,
"id": "1",
"invoice_id": "__demo_inv__1",
"is_gifted": false,
"linked_credit_notes": [],
"object": "order",
"order_date": 1517505904,
"order_line_items": [
{
"amount": 40000,
"amount_adjusted": 0,
"amount_paid": 40000,
"description": "MB1S1P",
"discount_amount": 0,
"entity_id": "MB1S1P",
"entity_type": "plan",
"fulfillment_amount": 40000,
"fulfillment_quantity": 1,
"id": "o_li__test__KyVnGlSBWlqJO27C",
"invoice_id": "__demo_inv__1",
"invoice_line_item_id": "li___test__KyVnHhSBWlq9K2nk",
"is_shippable": true,
"item_level_discount_amount": 0,
"object": "order_line_item",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"status": "queued",
"tax_amount": 0,
"unit_price": 40000
},
{..}
],
"order_type": "system_generated",
"paid_on": 1517505904,
"payment_status": "paid",
"price_type": "tax_exclusive",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"resource_version": 1517678702000,
"rounding_adjustement": 0,
"shipping_date": 1517505904,
"status": "queued",
"status_update_at": 1517678702,
"sub_total": 40000,
"subscription_id": "__test__KyVnHhSBWlq8E2ni",
"tax": 0,
"total": 40000,
"updated_at": 1517678702
}}
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 ]
Show more...
{"order": {
"amount_adjusted": 0,
"amount_paid": 40000,
"base_currency_code": "USD",
"created_at": 1517505907,
"created_by": "Auto generated by system",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWlqc32nw",
"deleted": false,
"discount": 0,
"document_number": "1",
"exchange_rate": 1,
"id": "1",
"invoice_id": "__demo_inv__1",
"is_gifted": false,
"linked_credit_notes": [],
"object": "order",
"order_date": 1517505906,
"order_line_items": [
{
"amount": 40000,
"amount_adjusted": 0,
"amount_paid": 40000,
"description": "MB1S1P",
"discount_amount": 0,
"entity_id": "MB1S1P",
"entity_type": "plan",
"fulfillment_amount": 40000,
"fulfillment_quantity": 1,
"id": "o_li__test__KyVnGlSBWlqm327M",
"invoice_id": "__demo_inv__1",
"invoice_line_item_id": "li___test__KyVnHhSBWlqdG2ny",
"is_shippable": true,
"item_level_discount_amount": 0,
"object": "order_line_item",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"status": "queued",
"tax_amount": 0,
"unit_price": 40000
},
{..}
],
"order_type": "system_generated",
"paid_on": 1517505906,
"payment_status": "paid",
"price_type": "tax_exclusive",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"resource_version": 1517505907000,
"rounding_adjustement": 0,
"shipping_date": 1517505906,
"status": "queued",
"sub_total": 40000,
"subscription_id": "__test__KyVnHhSBWlqc32nw",
"tax": 0,
"total": 40000,
"updated_at": 1517505907
}}
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/123x
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 not enabled for live sites by default. Please contact support@chargebee.com to get this enabled.
Sample Request
curl https://{site}.chargebee.com/api/v2/orders/2/delete \
-X POST \
-u {site_api_key}:
copy
curl https://{site}.chargebee.com/api/v2/orders/2/delete \
-X POST \
-u {site_api_key}:
Sample Response [ JSON ]
Show more...
{"order": {
"amount_adjusted": 0,
"amount_paid": 0,
"base_currency_code": "USD",
"created_at": 1517460010,
"created_by": "Auto generated by system",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWlmVH2mJ",
"deleted": true,
"discount": 0,
"exchange_rate": 1,
"id": "2",
"invoice_id": "ship_inv_delete",
"is_gifted": false,
"linked_credit_notes": [],
"object": "order",
"order_date": 1519879210,
"order_line_items": [
{
"amount": 2000,
"amount_adjusted": 0,
"amount_paid": 0,
"description": "shippable plan",
"discount_amount": 0,
"entity_id": "shippable",
"entity_type": "plan",
"fulfillment_amount": 2000,
"fulfillment_quantity": 1,
"id": "o_li__test__KyVnHhSBWlmbw2mS",
"invoice_id": "ship_inv_delete",
"invoice_line_item_id": "li___test__KyVnHhSBWlmZ52mQ",
"is_shippable": true,
"item_level_discount_amount": 0,
"object": "order_line_item",
"refundable_credits": 0,
"refundable_credits_issued": 0,
"status": "queued",
"tax_amount": 0,
"unit_price": 2000
},
{..}
],
"order_type": "system_generated",
"payment_status": "not_paid",
"price_type": "tax_exclusive",
"refundable_credits": 0,
"refundable_credits_issued": 0,
"resource_version": 1517678688000,
"rounding_adjustement": 0,
"shipping_date": 1522557610,
"status": "queued",
"sub_total": 2000,
"subscription_id": "__test__KyVnHhSBWlmVH2mJ",
"tax": 0,
"total": 2000,
"updated_at": 1517678688
}}
URL Format POST
https://{site}.chargebee.com/api/v2/orders/{order_id}/delete
Resource object representing order.
always returned
Lists the available orders.
Sample Request
curl https://{site}.chargebee.com/api/v2/orders \
-G \
-u {site_api_key}:\
--data-urlencode limit=3 \
--data-urlencode status[is]="queued"
copy
curl https://{site}.chargebee.com/api/v2/orders \
-G \
-u {site_api_key}:\
--data-urlencode limit=3 \
--data-urlencode status[is]="queued"
Sample Response [ JSON ]
Show more...
{"list": [
{"order": {
"amount_adjusted": 0,
"amount_paid": 40000,
"base_currency_code": "USD",
"created_at": 1517505898,
"created_by": "Auto generated by system",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWloVR2mr",
"deleted": false,
"discount": 0,
"document_number": "1",
"exchange_rate": 1,
"id": "1",
"invoice_id": "__demo_inv__1",
"is_gifted": false,
"linked_credit_notes": [],
"object": "order",
"order_date": 1517505897,
"order_line_items": [
{
"amount": 40000,
"amount_adjusted": 0,
"amount_paid": 40000,
"description": "MB1S1P",
"discount_amount": 0,
"entity_id": "MB1S1P",
"entity_type": "plan",
"fulfillment_amount": 40000,
"fulfillment_quantity": 1,
"id": "o_li__test__KyVnGlSBWloic26i",
"invoice_id": "__demo_inv__1",
"invoice_line_item_id": "li___test__KyVnHhSBWloWi2mt",
"is_shippable": true,
"item_level_discount_amount": 0,
"object": "order_line_item",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"status": "queued",
"tax_amount": 0,
"unit_price": 40000
},
{..}
],
"order_type": "system_generated",
"paid_on": 1517505897,
"payment_status": "paid",
"price_type": "tax_exclusive",
"refundable_credits": 40000,
"refundable_credits_issued": 0,
"resource_version": 1517505898000,
"rounding_adjustement": 0,
"shipping_date": 1517505897,
"status": "queued",
"sub_total": 40000,
"subscription_id": "__test__KyVnHhSBWloVR2mr",
"tax": 0,
"total": 40000,
"updated_at": 1517505898
}},
{..}
]}
URL Format GET
https://{site}.chargebee.com/api/v2/orders
The number of resources to be returned.
optional, integer, default=10, min=1, max=100
Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset
to the value of next_offset
obtained in the previous iteration of the API call.
optional, string, max chars=1000
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
Sorts based on the specified attribute.
Supported attributes : created_at, updated_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
exclude_deleted_credit_notes
Flag to indicate whether deleted credit notes should be passed or not.
optional, boolean
Uniquely identifies the order. It is the api identifier for the order.
Supported operators : is, is_not, starts_with, in, not_in
Example → id[is] = "890"
optional, string filter
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_not] = "INVOICE_982"
optional, string filter
subscription_id[<operator>]
The subscription for which the order is created.
Supported operators : is, is_not, starts_with
Example → subscription_id[is_not] = "null"
optional, string filter
The status of this order. 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_not] = "queued"
optional, enumerated string filter
shipping_date[<operator>]
This is the date on which the order will be delivered to the customer.
Supported operators : after, before, on, between
Example → shipping_date[on] = "1435054328"
optional, timestamp(UTC) in seconds filter
Order type. Possible values are : manual, system_generated.
Supported operators : is, is_not, in, not_in
Example → order_type[is_not] = "system_generated"
optional, enumerated string filter
The date on which the order will start getting processed.
Supported operators : after, before, on, between
Example → order_date[before] = "1435054328"
optional, timestamp(UTC) in seconds filter
The timestamp indicating the date & time the order's invoice got paid.
Supported operators : after, before, on, between
Example → paid_on[on] = "1435054328"
optional, timestamp(UTC) in seconds filter
To filter based on updated at .
Supported operators : after, before, on, between
Example → updated_at[after] = "1243545465"
optional, timestamp(UTC) in seconds filter
The time at which the order was created.
Supported operators : after, before, on, between
Example → created_at[before] = "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