---
title: "Create order"
method: POST
path: "/orders"
tags: ["Orders"]
---

# Create order

`POST /orders`

Create a new order.

## Headers

- `Accept-Language` 'es' | 'en'
- `X-Child-Company-Id` string

## Request body

- OrderRequest — a order
  - `charges` ChargeRequest[] — List of [charges](https://developers.conekta.com/v2.3.0/reference/orderscreatecharge) that are applied to the order
    - `amount` integer — Amount to be charged in cents
    - `payment_method` union, required
      - PaymentMethodPbbRequest — Contains details of the payment methods that the customer has active or has used in Conekta
        - `type` string, required — Type of the payment method
        - `expires_at` integer — Expiration date of the payment method, in Unix timestamp format
        - `product_type` 'bbva_pay_by_bank', required — Product type of the payment method, use for the payment method to know the product type
      - PaymentMethodBnplRequest — Contains details of the payment methods that the customer has active or has used in Conekta
        - `type` string, required — Type of the payment method
        - `cancel_url` string, required — URL to redirect the customer after a canceled payment
        - `can_not_expire` boolean, required — Indicates if the payment method can not expire
        - `failure_url` string, required — URL to redirect the customer after a failed payment
        - `product_type` 'aplazo_bnpl' | 'azteca_bnpl' | 'coppel_bnpl' | 'creditea_bnpl', required — Product type of the payment method, use for the payment method to know the product type
        - `success_url` string, required — URL to redirect the customer after a successful payment
      - PaymentMethodCardRequest — Contains details of the payment methods that the customer has active or has used in Conekta
        - `type` string, required — Type of payment method
        - `cvc` string, required — Card security code
        - `exp_month` string, required — Card expiration month
        - `exp_year` string, required — Card expiration year
        - `name` string, required — Cardholder name
        - `number` string, required — Card number
        - `customer_ip_address` string — Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes
      - PaymentMethodGeneralRequest — Payment method used in the charge. Go to the [payment methods](https://developers.conekta.com/reference/m%C3%A9todos-de-pago) section for more details
        - `expires_at` integer — Method expiration date as unix timestamp
        - `monthly_installments` integer — How many months without interest to apply, it can be 3, 6, 9, 12 or 18
        - `type` string, required — Type of payment method
        - `token_id` string
        - `payment_source_id` string
        - `cvc` string — Optional, It is a value that allows identifying the security code of the card. Only for PCI merchants
        - `contract_id` string — Optional id sent to indicate the bank contract for recurrent card charges.
        - `customer_ip_address` string — Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes
    - `reference_id` string — Custom reference to add to the charge
  - `checkout` OrderCheckoutRequest — [Checkout](https://developers.conekta.com/v2.3.0/reference/payment-link) details
    - `allowed_payment_methods` string[] — Are the payment methods available for this link. For subscriptions, only 'card' is allowed due to the recurring nature of the payments. This field is mutually exclusive with excluded_payment_methods.
    - `excluded_payment_methods` string[] — Payment methods to be excluded from the checkout. This field is mutually exclusive with allowed_payment_methods.
    - `exclude_card_networks` string[] — List of card networks to exclude from the checkout. This field is only applicable for card payments.
    - `plan_ids` string[] — List of plan IDs that will be available for subscription. This field is required for subscription payments.
    - `expires_at` integer — It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 5 minutes to 365 days from the creation date.
    - `failure_url` string, uri — Redirection url back to the site in case of failed payment, applies only to HostedPayment.
    - `force_save_card` boolean — Indicates whether the card used for the payment should be saved for future purchases. This field is only applicable for card payments.
    - `monthly_installments_enabled` boolean
    - `monthly_installments_options` integer[]
    - `max_failed_retries` integer — Number of retries allowed before the checkout is marked as failed
    - `name` string — Reason for payment
    - `on_demand_enabled` boolean
    - `redirection_time` integer — number of seconds to wait before redirecting to the success_url
    - `success_url` string, uri — Redirection url back to the site in case of successful payment, applies only to HostedPayment
    - `type` 'Integration' | 'HostedPayment' — Required. This field represents the type of checkout, which determines the user experience during the payment process. 'HostedPayment' will redirect the customer to a Conekta-hosted page to complete the payment, while 'Integration' allows the payment process to be handled entirely on your site using Conekta's APIs and SDKs.
  - `currency` string, required — Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217)
  - `customer_info` union, required — Customer information
    - CustomerInfo
      - `name` string, required
      - `email` string, email, required
      - `phone` string, required
      - `corporate` boolean
      - `object` string
    - CustomerInfoCustomerId
      - `customer_id` string, required
  - `discount_lines` OrderDiscountLinesRequest[] — List of [discounts](https://developers.conekta.com/v2.3.0/reference/orderscreatediscountline) that are applied to the order.
    - `amount` integer, required — The amount to be deducted from the total sum of all payments, in cents.
    - `code` string, required — Discount code.
    - `type` string, required — It can be 'loyalty', 'campaign', 'coupon' o 'sign'
  - `fiscal_entity` OrderFiscalEntityRequest — Fiscal entity of the order, Currently it is a purely informative field
    - `address` FiscalEntityAddress, required — Address of the fiscal entity
      - `street1` string, required — Street name and number
      - `street2` string, nullable — Street name and number
      - `postal_code` string, required — Postal code
      - `city` string, required — City
      - `state` string — State
      - `country` string, required — this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
      - `external_number` string, required — External number
    - `email` string — Email of the fiscal entity
    - `metadata` object — Metadata associated with the fiscal entity
    - `name` string, nullable — Name of the fiscal entity
    - `phone` string — Phone of the fiscal entity
    - `tax_id` string, nullable — Tax ID of the fiscal entity
  - `line_items` Product[], required — List of [products](https://developers.conekta.com/v2.3.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product.
    - `antifraud_info` object
    - `brand` string — The brand of the item.
    - `description` string — Short description of the item
    - `metadata` object — It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters.
    - `name` string, required — The name of the item. It will be displayed in the order.
    - `quantity` integer, required — The quantity of the item in the order.
    - `sku` string — The stock keeping unit for the item. It is used to identify the item in the order.
    - `tags` string[] — List of tags for the item. It is used to identify the item in the order.
    - `unit_price` integer, required — The price of the item in cents.
  - `metadata` object — Metadata associated with the order
  - `needs_shipping_contact` boolean — Allows you to fill out the shipping information at checkout
  - `pre_authorize` boolean — Indicates whether the order charges must be preauthorized
  - `processing_mode` string — Indicates the processing mode for the order, either ecommerce, recurrent or validation.
  - `return_url` string, uri — Indicates the redirection callback upon completion of the 3DS2 flow. Do not use this parameter if your order has a checkout parameter
  - `shipping_contact` CustomerShippingContactsRequest — [Shipping](https://developers.conekta.com/v2.3.0/reference/createcustomershippingcontacts) 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.
    - `phone` string — Phone contact
    - `receiver` string — Name of the person who will receive the order
    - `between_streets` string — The street names between which the order will be delivered.
    - `address` CustomerShippingContactsRequestAddress, required — Address of the person who will receive the order
      - `street1` string
      - `street2` string
      - `postal_code` string
      - `city` string
      - `state` string
      - `country` string — this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
      - `residential` boolean, nullable
    - `parent_id` string
    - `default` boolean, nullable
    - `deleted` boolean, nullable
    - `metadata` object — Metadata associated with the shipping contact
  - `shipping_lines` ShippingRequest[] — List of [shipping costs](https://developers.conekta.com/v2.3.0/reference/orderscreateshipping). If the online store offers digital products.
    - `amount` integer, required — Shipping amount in cents
    - `carrier` string — Carrier name for the shipment
    - `tracking_number` string — Tracking number can be used to track the shipment
    - `method` string — Method of shipment
    - `metadata` object — Hash where the user can send additional information for each 'shipping'.
  - `tax_lines` OrderTaxRequest[] — List of [taxes](https://developers.conekta.com/v2.3.0/reference/orderscreatetaxes) that are applied to the order.
    - `amount` integer, required — The amount to be collected for tax in cents
    - `description` string, required — description or tax's name
    - `metadata` object
  - `three_ds_mode` string, nullable — Indicates the 3DS2 mode for the order, either smart or strict. This property is only applicable when 3DS is enabled. When 3DS is disabled, this field should be null.

## Response `200`

successful operation

## Other responses

- `401` — authentication error
- `402` — payment required error
- `422` — parameter validation error
- `500` — internal server error

---

[API](https://skmtc.net/conekta/apis/conekta-api.md) · [All operations](https://skmtc.net/conekta/apis/conekta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/conekta/conekta-api/revisions/029df3052bca/schema)
