Class Order
- All Implemented Interfaces:
HasId,MetadataStore<Order>,StripeActiveObject,StripeObjectInterface
Related guide: Orders overview
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about AutomaticTax, please refer to the API Reference.static classFor more details about BillingDetails, please refer to the API Reference.static classFor more details about Payment, please refer to the API Reference.static classFor more details about ShippingCost, please refer to the API Reference.static classFor more details about ShippingDetails, please refer to the API Reference.static classFor more details about TaxDetails, please refer to the API Reference.static classFor more details about TotalDetails, please refer to the API Reference.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancel()Cancels the order as well as the payment intent if one is attached.cancel(RequestOptions options) Cancels the order as well as the payment intent if one is attached.cancel(OrderCancelParams params) Cancels the order as well as the payment intent if one is attached.cancel(OrderCancelParams params, RequestOptions options) Cancels the order as well as the payment intent if one is attached.Cancels the order as well as the payment intent if one is attached.cancel(Map<String, Object> params, RequestOptions options) Cancels the order as well as the payment intent if one is attached.protected booleanstatic Ordercreate(OrderCreateParams params) Creates a newopenorder object.static Ordercreate(OrderCreateParams params, RequestOptions options) Creates a newopenorder object.static OrderCreates a newopenorder object.static Ordercreate(Map<String, Object> params, RequestOptions options) Creates a newopenorder object.booleanOrder cost before any discounts or taxes are applied.Total order cost after discounts and taxes are applied.Get ID of expandableapplicationobject.Get expandedapplication.Customer billing details associated with the order.The client secret of this Order.Time at which the object was created.Three-letter ISO currency code, in lowercase.Get ID of expandablecustomerobject.Get expandedcustomer.An arbitrary string attached to the object.Get expandeddiscounts.Get IDs of expandablediscountsobject list.getId()Unique identifier for the object.A recent IP address of the purchaser used for tax reporting and tax location inference.A list of line items the customer is ordering.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.The details of the customer cost of shipping, including the customer chosen ShippingRate.Customer shipping information associated with the order.The overall status of the order.inthashCode()static OrderCollectionlist(OrderListParams params) Returns a list of your orders.static OrderCollectionlist(OrderListParams params, RequestOptions options) Returns a list of your orders.static OrderCollectionReturns a list of your orders.static OrderCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of your orders.When retrieving an order, there is an includable line_items property containing the first handful of those items.When retrieving an order, there is an includable line_items property containing the first handful of those items.listLineItems(OrderListLineItemsParams params, RequestOptions options) When retrieving an order, there is an includable line_items property containing the first handful of those items.listLineItems(Map<String, Object> params) When retrieving an order, there is an includable line_items property containing the first handful of those items.listLineItems(Map<String, Object> params, RequestOptions options) When retrieving an order, there is an includable line_items property containing the first handful of those items.reopen()Reopens asubmittedorder.reopen(RequestOptions options) Reopens asubmittedorder.reopen(OrderReopenParams params) Reopens asubmittedorder.reopen(OrderReopenParams params, RequestOptions options) Reopens asubmittedorder.Reopens asubmittedorder.reopen(Map<String, Object> params, RequestOptions options) Reopens asubmittedorder.static OrderRetrieves the details of an existing order.static Orderretrieve(String id, RequestOptions options) Retrieves the details of an existing order.static Orderretrieve(String id, OrderRetrieveParams params, RequestOptions options) Retrieves the details of an existing order.static OrderRetrieves the details of an existing order.voidsetAmountSubtotal(Long amountSubtotal) Order cost before any discounts or taxes are applied.voidsetAmountTotal(Long amountTotal) Total order cost after discounts and taxes are applied.voidsetApplication(String id) voidsetApplicationObject(Application expandableObject) voidsetAutomaticTax(Order.AutomaticTax automaticTax) voidsetBillingDetails(Order.BillingDetails billingDetails) Customer billing details associated with the order.voidsetClientSecret(String clientSecret) The client secret of this Order.voidsetCreated(Long created) Time at which the object was created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCustomer(String id) voidsetCustomerObject(Customer expandableObject) voidsetDescription(String description) An arbitrary string attached to the object.voidsetDiscountObjects(List<Discount> objs) voidsetDiscounts(List<String> ids) voidUnique identifier for the object.voidsetIpAddress(String ipAddress) A recent IP address of the purchaser used for tax reporting and tax location inference.voidsetLineItems(LineItemCollection lineItems) A list of line items the customer is ordering.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidString representing the object's type.voidsetPayment(Order.Payment payment) voidsetResponseGetter(StripeResponseGetter responseGetter) The amount on which tax is calculated, in cents (or local equivalent).voidsetShippingCost(Order.ShippingCost shippingCost) The details of the customer cost of shipping, including the customer chosen ShippingRate.voidsetShippingDetails(Order.ShippingDetails shippingDetails) Customer shipping information associated with the order.voidThe overall status of the order.voidsetTaxDetails(Order.TaxDetails taxDetails) voidsetTotalDetails(Order.TotalDetails totalDetails) submit(OrderSubmitParams params) Submitting an Order transitions the status toprocessingand creates a PaymentIntent object so the order can be paid.submit(OrderSubmitParams params, RequestOptions options) Submitting an Order transitions the status toprocessingand creates a PaymentIntent object so the order can be paid.Submitting an Order transitions the status toprocessingand creates a PaymentIntent object so the order can be paid.submit(Map<String, Object> params, RequestOptions options) Submitting an Order transitions the status toprocessingand creates a PaymentIntent object so the order can be paid.update(OrderUpdateParams params) Updates the specific order by setting the values of the parameters passed.update(OrderUpdateParams params, RequestOptions options) Updates the specific order by setting the values of the parameters passed.Updates the specific order by setting the values of the parameters passed.update(Map<String, Object> params, RequestOptions options) Updates the specific order by setting the values of the parameters passed.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
Order
public Order()
-
-
Method Details
-
getApplication
Get ID of expandableapplicationobject. -
setApplication
-
getApplicationObject
Get expandedapplication. -
setApplicationObject
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
getDiscounts
Get IDs of expandablediscountsobject list. -
setDiscounts
-
getDiscountObjects
Get expandeddiscounts. -
setDiscountObjects
-
cancel
Cancels the order as well as the payment intent if one is attached.- Throws:
StripeException
-
cancel
Cancels the order as well as the payment intent if one is attached.- Throws:
StripeException
-
cancel
Cancels the order as well as the payment intent if one is attached.- Throws:
StripeException
-
cancel
Cancels the order as well as the payment intent if one is attached.- Throws:
StripeException
-
cancel
Cancels the order as well as the payment intent if one is attached.- Throws:
StripeException
-
cancel
Cancels the order as well as the payment intent if one is attached.- Throws:
StripeException
-
create
Creates a newopenorder object.- Throws:
StripeException
-
create
public static Order create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a newopenorder object.- Throws:
StripeException
-
create
Creates a newopenorder object.- Throws:
StripeException
-
create
Creates a newopenorder object.- Throws:
StripeException
-
list
Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.- Throws:
StripeException
-
list
public static OrderCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.- Throws:
StripeException
-
list
Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.- Throws:
StripeException
-
list
public static OrderCollection list(OrderListParams params, RequestOptions options) throws StripeException Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.- Throws:
StripeException
-
listLineItems
When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
StripeException
-
listLineItems
When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
StripeException
-
listLineItems
public LineItemCollection listLineItems(Map<String, Object> params, RequestOptions options) throws StripeExceptionWhen retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
StripeException
-
listLineItems
When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
StripeException
-
listLineItems
public LineItemCollection listLineItems(OrderListLineItemsParams params, RequestOptions options) throws StripeException When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.- Throws:
StripeException
-
reopen
Reopens asubmittedorder.- Throws:
StripeException
-
reopen
Reopens asubmittedorder.- Throws:
StripeException
-
reopen
Reopens asubmittedorder.- Throws:
StripeException
-
reopen
Reopens asubmittedorder.- Throws:
StripeException
-
reopen
Reopens asubmittedorder.- Throws:
StripeException
-
reopen
Reopens asubmittedorder.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.- Throws:
StripeException
-
retrieve
public static Order retrieve(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.- Throws:
StripeException
-
retrieve
public static Order retrieve(String id, OrderRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.- Throws:
StripeException
-
submit
Submitting an Order transitions the status toprocessingand creates a PaymentIntent object so the order can be paid. If the Order has anamount_totalof 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.- Throws:
StripeException
-
submit
Submitting an Order transitions the status toprocessingand creates a PaymentIntent object so the order can be paid. If the Order has anamount_totalof 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.- Throws:
StripeException
-
submit
Submitting an Order transitions the status toprocessingand creates a PaymentIntent object so the order can be paid. If the Order has anamount_totalof 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.- Throws:
StripeException
-
submit
Submitting an Order transitions the status toprocessingand creates a PaymentIntent object so the order can be paid. If the Order has anamount_totalof 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.- Throws:
StripeException
-
update
Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
updatein interfaceMetadataStore<Order>- Throws:
StripeException
-
update
Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
updatein interfaceMetadataStore<Order>- Throws:
StripeException
-
update
Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
update
Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
setResponseGetter
The amount on which tax is calculated, in cents (or local equivalent).- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getAmountSubtotal
Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). -
getAmountTotal
Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or equivalent in charge currency. -
getAutomaticTax
-
getBillingDetails
Customer billing details associated with the order. -
getClientSecret
The client secret of this Order. Used for client-side retrieval using a publishable key.The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs for creating and processing an order to learn about how client_secret should be handled.
-
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
getIpAddress
A recent IP address of the purchaser used for tax reporting and tax location inference. -
getLineItems
A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
order. -
getPayment
-
getShippingCost
The details of the customer cost of shipping, including the customer chosen ShippingRate. -
getShippingDetails
Customer shipping information associated with the order. -
getStatus
The overall status of the order.One of
canceled,complete,open,processing, orsubmitted. -
getTaxDetails
-
getTotalDetails
-
setAmountSubtotal
Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). -
setAmountTotal
Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or equivalent in charge currency. -
setAutomaticTax
-
setBillingDetails
Customer billing details associated with the order. -
setClientSecret
The client secret of this Order. Used for client-side retrieval using a publishable key.The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
Refer to our docs for creating and processing an order to learn about how client_secret should be handled.
-
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
setId
Unique identifier for the object. -
setIpAddress
A recent IP address of the purchaser used for tax reporting and tax location inference. -
setLineItems
A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
order. -
setPayment
-
setShippingCost
The details of the customer cost of shipping, including the customer chosen ShippingRate. -
setShippingDetails
Customer shipping information associated with the order. -
setStatus
The overall status of the order.One of
canceled,complete,open,processing, orsubmitted. -
setTaxDetails
-
setTotalDetails
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
getMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.- Specified by:
getMetadatain interfaceMetadataStore<Order>
-