Create order

Creates a new order (products + amounts + customer data).

Minimum required fields:

  • currency
  • line_items
  • customer_info

About customer_info:

  • You can reference an existing customer using customer_info.customer_id, or
  • You can provide customer details at minimum customer_info.name and customer_info.email to create the order with customer context.

How to create the order:

  • Create an order only (no payment): send only the order data.
  • Create an order and create the first payment charge: include charges.
  • Create an order with a checkout configuration (for a hosted payment flow): include checkout.

Important rules:

  • You cannot send charges and checkout in the same request (they are mutually exclusive).
  • If you send shipping_contact_id and/or fiscal_entity_id, you must also send customer_info.customer_id so the API can validate those IDs against that customer.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

requested field for order

a order

string
required
length ≤ 3

Currency with which the payment will be made.

customer_info
required

Customer information

line_items
array of objects
required

List of products that are sold in the order. You must have at least one product.

line_items*
charges
array of objects

List of charges that are applied to the order

charges
checkout
object

Checkout details

discount_lines
array of objects

List of discounts that are applied to the order. You must have at least one discount.

discount_lines
tax_lines
array of objects

List of taxes that are applied to the order.

tax_lines
boolean

Allows you to fill out the shipping information at checkout

shipping_contact
object

Shipping details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used.

shipping_lines
array of objects

List of shipping costs. If the online store offers digital products.

shipping_lines
fiscal_entity
object

Fiscal entity of the order, Currently it is a purely informative field

string

Indicates the processing mode for the order, either ecommerce, recurrent or validation.

metadata
object

Arbitrary key-value data that you can attach to the order for your internal use (e.g. customer_segment, sales_channel, internal_order_id). It is not used for payment processing or fraud decisions. Keys should be strings; values can be any JSON value.

Headers
string
enum
Defaults to es

Use for knowing which language to use

Allowed:
string

In the case of a holding company, the company id of the child company to which will process the request.

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/vnd.app-v2.1.0+json