Conekta Orders API

The Orders API from Conekta — 6 operation(s) for orders.

OpenAPI Specification

conekta-orders-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  contact:
    email: engineering@conekta.com
    name: Engineering Conekta
    url: https://github.com/conekta/openapi/issues
  description: Conekta sdk
  license:
    name: MIT-LICENSE
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  title: Conekta Antifraud Orders API
  version: 2.2.0
servers:
- description: Conekta main server
  url: https://api.conekta.io
security:
- bearerAuth: []
tags:
- name: Orders
paths:
  /orders:
    get:
      description: Get order details in the form of a list
      operationId: getOrders
      parameters:
      - description: Use for knowing which language to use
        examples:
          es:
            summary: for spanish request/response
            value: es
          en:
            summary: for english request/response
            value: en
        explode: false
        in: header
        name: Accept-Language
        required: false
        schema:
          default: es
          enum:
          - es
          - en
          type: string
        style: simple
      - description: In the case of a holding company, the company id of the child company to which will process the request.
        example: 6441b6376b60c3a638da80af
        explode: false
        in: header
        name: X-Child-Company-Id
        required: false
        schema:
          type: string
        style: simple
      - description: The numbers of items to return, the maximum value is 250
        explode: true
        in: query
        name: limit
        required: false
        schema:
          default: 20
          format: int32
          maximum: 250
          minimum: 1
          type: integer
        style: form
      - description: General order search, e.g. by mail, reference etc.
        explode: true
        in: query
        name: search
        required: false
        schema:
          type: string
        style: form
      - description: next page
        explode: true
        in: query
        name: next
        required: false
        schema:
          type: string
        style: form
      - description: previous page
        explode: true
        in: query
        name: previous
        required: false
        schema:
          type: string
        style: form
      - description: Filters by order status
        explode: true
        in: query
        name: payment_status
        required: false
        schema:
          example: paid
          type: string
        style: form
      - description: Filters by last payment info status
        explode: true
        in: query
        name: last_payment_info.status
        required: false
        schema:
          example: pending_payment
          type: string
        style: form
      - description: created equal to
        explode: true
        in: query
        name: created_at
        required: false
        schema:
          example: 1612137600
          format: int64
          type: integer
        style: form
      - description: created at greater than or equal to
        explode: true
        in: query
        name: created_at.gte
        required: false
        schema:
          example: 1612137600
          format: int64
          type: integer
        style: form
      - description: created at less than or equal to
        explode: true
        in: query
        name: created_at.lte
        required: false
        schema:
          example: 1612137600
          format: int64
          type: integer
        style: form
      - description: updated at greater than or equal to
        explode: true
        in: query
        name: updated_at.gte
        required: false
        schema:
          example: 1612137600
          format: int64
          type: integer
        style: form
      - description: updated at less than or equal to
        explode: true
        in: query
        name: updated_at.lte
        required: false
        schema:
          example: 1612137600
          format: int64
          type: integer
        style: form
      responses:
        '200':
          content:
            application/vnd.conekta-v2.2.0+json:
              schema:
                $ref: '#/components/schemas/get_orders_response'
          description: successful operation
        '401':
          content:
            application/vnd.conekta-v2.2.0+json:
              example:
                details:
                - message: Please include your access key in your request.
                  code: conekta.errors.authentication.missing_key
                log_id: 507f1f77bcf86cd799439011
                object: error
                type: authentication_error
              schema:
                $ref: '#/components/schemas/error'
          description: authentication error
        '500':
          content:
            application/vnd.conekta-v2.2.0+json:
              example:
                details:
                - debug_message: There was a runtime error and Conekta engineers have been notified.
                  message: There was a runtime error and Conekta engineers have been notified.
                  code: conekta.errors.api.system.general_failure
                object: error
                type: api_error
                log_id: 641b6f2b3cd9a50001515098
              schema:
                $ref: '#/components/schemas/error'
          description: internal server error
      security:
      - bearerAuth: []
      summary: Get a list of Orders
      tags:
      - Orders
    post:
      description: Create a new order.
      operationId: createOrder
      parameters:
      - description: Use for knowing which language to use
        examples:
          es:
            summary: for spanish request/response
            value: es
          en:
            summary: for english request/response
            value: en
        explode: false
        in: header
        name: Accept-Language
        required: false
        schema:
          default: es
          enum:
          - es
          - en
          type: string
        style: simple
      - description: In the case of a holding company, the company id of the child company to which will process the request.
        example: 6441b6376b60c3a638da80af
        explode: false
        in: header
        name: X-Child-Company-Id
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            examples:
              order_with_charges:
                summary: Create an order with charges
                value:
                  charges:
                  - amount: 40000
                    expires_at: 1677196303
                    monthly_installments: 0
                    payment_method:
                      type: card
                      token_id: tok_2897348234
                      payment_source_id: src_2tLkkyfMPh6v7pFry
                      customer_ip_address: 0.0.0.0
                    reference_id: string
                  currency: MXN
                  customer_info:
                    name: DevTest
                    email: test@conekta.com
                    phone: '5522997233'
                    corporate: false
                    object: customer_info
                  fiscal_entity:
                    tax_id: '1234567890'
                    name: Conekta Inc
                    email: test@gmail.com
                    phone: '525511223344'
                    metadata:
                      test: true
                      company_id: '123'
                    address:
                      street1: Nuevo Leon 254
                      street2: Departamento 404
                      postal_code: '06100'
                      city: Ciudad de Mexico
                      state: Ciudad de Mexico
                      country: MX
                      external_number: '123'
                  discount_lines:
                  - amount: 500
                    code: '123'
                    type: loyalty
                  line_items:
                  - antifraud_info:
                      additionalProp1: {}
                      additionalProp2: {}
                      additionalProp3: {}
                    description: string
                    sku: string
                    name: Box of Cohiba S1s
                    unit_price: 20000
                    quantity: 1
                    tags:
                    - string
                    brand: string
                    metadata:
                      additionalProp1: string
                      additionalProp2: string
                      additionalProp3: string
                  metadata:
                    test: true
                    company_id: '123'
                  pre_authorize: false
                  shipping_contact:
                    phone: '525511223344'
                    receiver: Marvin Fuller
                    between_streets: Ackerman Crescent
                    metadata:
                      test: true
                      company_id: '123'
                    address:
                      street1: Nuevo Leon 254
                      street2: Departamento 404
                      postal_code: '06100'
                      city: Ciudad de Mexico
                      state: Ciudad de Mexico
                      country: MX
                      residential: true
                    parent_id: string
                    default: true
                    deleted: true
                  shipping_lines:
                  - amount: 100
                    carrier: FEDEX
                    tracking_number: TRACK123
                    method: TRAING
                    metadata:
                      key: value
                  tax_lines:
                  - amount: 100
                    description: testing
                    metadata:
                      additionalProp1: {}
                      additionalProp2: {}
                      additionalProp3: {}
              order_with_bnpl_charges:
                summary: Create an order with a bnpl charge
                value:
                  channel:
                    checkout_request_id: fdcb06d6-c9e1-44ee-921f-17723b63852f
                    checkout_request_name: Test creditea
                    checkout_request_type: PaymentLink
                  charges:
                  - payment_method:
                      can_not_expire: true
                      cancel_url: https://pay.conekta.io/payment-status/fdcb06d6-c9e1-44ee-921f-17723b63852f/cancel
                      failure_url: https://pay.conekta.io/payment-status/fdcb06d6-c9e1-44ee-921f-17723b63852f/failure
                      product_type: aplazo_bnpl
                      success_url: https://pay.conekta.io/payment-status/fdcb06d6-c9e1-44ee-921f-17723b63852f/success
                      type: bnpl
                  currency: MXN
                  customer_info:
                    customer_id: cus_2xZfwfjXxX9tZhVey
                  line_items:
                  - name: Test creditea
                    quantity: 1
                    unit_price: 300000
              order_with_pbb_charges:
                summary: Create an order with a pay by bank charge
                value:
                  charges:
                  - payment_method:
                      product_type: bbva_pay_by_bank
                      type: pay_by_bank
                  currency: MXN
                  customer_info:
                    customer_id: cus_2xZfwfjXxX9tZhVey
                  line_items:
                  - name: Test pay by bank
                    quantity: 1
                    unit_price: 300000
              order_with_checkout:
                summary: Create an order with checkout
                value:
                  checkout:
                    allowed_payment_methods:
                    - cash
                    - card
                    - bank_transfer
                    - bnpl
                    - pay_by_bank
                    expires_at: 0
                    failure_url: string
                    monthly_installments_enabled: false
                    monthly_installments_options:
                    - 0
                    name: string
                    on_demand_enabled: true
                    success_url: string
                    type: Integration
                  currency: MXN
                  customer_info:
                    name: DevTest
                    email: test@conekta.com
                    phone: '5522997233'
                    corporate: false
                    object: customer_info
                  discount_lines:
                  - amount: 500
                    code: '123'
                    type: loyalty
                  line_items:
                  - antifraud_info:
                      additionalProp1: {}
                      additionalProp2: {}
                      additionalProp3: {}
                    description: string
                    sku: string
                    name: Box of Cohiba S1s
                    unit_price: 20000
                    quantity: 1
                    tags:
                    - string
                    brand: string
                    metadata:
                      additionalProp1: string
                      additionalProp2: string
                      additionalProp3: string
                  metadata:
                    additionalProp1: string
                    additionalProp2: string
                    additionalProp3: string
                  pre_authorize: false
                  shipping_contact:
                    phone: '525511223344'
                    receiver: Marvin Fuller
                    between_streets: Ackerman Crescent
                    address:
                      street1: Nuevo Leon 254
                      street2: Departamento 404
                      postal_code: '06100'
                      city: Ciudad de Mexico
                      state: Ciudad de Mexico
                      country: MX
                      residential: true
                    parent_id: string
                    default: true
                    deleted: true
                  shipping_lines:
                  - amount: 100
                    carrier: FEDEX
                    tracking_number: TRACK123
                    method: TRAING
                    metadata:
                      key: value
                  tax_lines:
                  - amount: 100
                    description: testing
                    metadata:
                      additionalProp1: {}
                      additionalProp2: {}
                      additionalProp3: {}
              order_with_subscription:
                summary: Create an order with subscription plans
                value:
                  checkout:
                    allowed_payment_methods:
                    - card
                    plan_ids:
                    - nuevo-plan
                    expires_at: 1746015865
                    failure_url: string
                    monthly_installments_enabled: false
                    name: Embebido Prueba
                    on_demand_enabled: true
                    success_url: string
                    type: Integration
                    max_failed_retries: 3
                    is_redirect_on_failure: true
                  currency: MXN
                  customer_info:
                    name: Prueba
                    email: prueba@prueba.com
                    phone: '+5218181818181'
                    corporate: false
                    object: customer_info
                  shipping_lines:
                  - amount: 0
                    metadata:
                      key: value
              split_payment_with_2_card_charges:
                summary: Create an order with 2 card charges
                value:
                  charges:
                  - amount: 40000
                    payment_method:
                      type: card
                      token_id: tok_2897348234
                  - amount: 40000
                    payment_method:
                      type: card
                      token_id: tok_2897348235
                  currency: MXN
                  customer_info:
                    name: DevTest
                    email: test@conekta.com
                    phone: '5522997233'
                    corporate: false
                  line_items:
                    description: string
                    sku: string
                    name: Box of Cohiba S1s
                    unit_price: 40000
                    quantity: 2
                    brand: string
              split_payment_with_3_cash_charges:
                summary: Create an order with 3 cash charges
                value:
                  charges:
                  - amount: 10000
                    payment_method:
                      type: cash
                  - amount: 10000
                    payment_method:
                      type: cash
                  - amount: 10000
                    payment_method:
                      type: cash
                  currency: MXN
                  customer_info:
                    name: DevTest
                    email: test@conekta.com
                    phone: '5522997233'
                    corporate: false
                  line_items:
                    description: string
                    sku: string
                    name: Box of Cohiba S1s
                    unit_price: 10000
                    quantity: 3
                    brand: string
              split_payment_with_cash_card_charges:
                summary: Create an order with 3 cash and 2 card charges
                value:
                  charges:
                  - amount: 10000
                    payment_method:
                      type: card
                      token_id: tok_2897348234
                  - amount: 10000
                    payment_method:
                      type: card
                      token_id: tok_2897348235
                  - amount: 10000
                    payment_method:
                      type: cash
                  - amount: 10000
                    payment_method:
                      type: cash
                  - amount: 10000
                    payment_method:
                      type: cash
                  currency: MXN
                  customer_info:
                    name: DevTest
                    email: test@conekta.com
                    phone: '5522997233'
                    corporate: false
                  line_items:
                    description: string
                    sku: string
                    name: Box of Cohiba S1s
                    unit_price: 50000
                    quantity: 1
                    brand: string
            schema:
              $ref: '#/components/schemas/order_request'
        description: requested field for order
        required: true
      responses:
        '200':
          content:
            application/vnd.conekta-v2.2.0+json:
              examples:
                cash:
                  value:
                    livemode: true
                    amount: 1560
                    currency: MXN
                    payment_status: pending_payment
                    amount_refunded: 0
                    split_payment: false
                    customer_info:
                      email: franco.longhi@conekta.com
                      phone: 539-933-3810
                      name: franco golden
                      object: customer_info
                    object: order
                    id: ord_2xayxSvfWzQ2TLz7r
                    metadata: {}
                    is_refundable: false
                    created_at: 1741103510
                    updated_at: 1741103510
                    line_items:
                      object: list
                      has_more: false
                      total: 1
                      data:
                      - name: APOYO URGENTE REFERENCIA
                        unit_price: 1560
                        quantity: 1
                        sku: COL094
                        brand: CHEDRAUI
                        object: line_item
                        id: line_item_2xayxSvfWzQ2TLz7p
                        parent_id: ord_2xayxSvfWzQ2TLz7r
                        metadata: {}
                        antifraud_info: {}
                    charges:
                      object: list
                      has_more: false
                      total: 1
                      data:
                      - id: 67c72196e777ac0001f2140c
                        livemode: true
                        created_at: 1741103510
                        currency: MXN
                        payment_method:
                          service_name: Cash
                          barcode_url: https://barcodes.conekta.com/cash/cashin/datalogic/10001140326893401915.png
                          object: cash_payment
                          type: cash
                          expires_at: 1743724800
                          store_names:
                          - 7 Eleven
                          - Farmacias del Ahorro
                          - CIRCLE K
                          - Tiendas Extra
                          - Farmacia Benavides
                          - Soriana
                          - WALDO'S
                          - ELECZION
                          - Super Kiosko
                          - Farmacias Bazar
                          - Wolworth
                          - Del Sol
                          - Yepas
                          - Farmacias De Dios
                          - Farmacias Nosarco
                          - Farmacias Santa Cruz
                          - Farmacentro
                          - Farmacias GyM
                          - Farmacias San Francisco de Asis
                          - Farmacias Union
                          - Farmacias Zapotlan
                          - Farmatodo
                          - Al Super
                          reference: 10001140326893401915
                          product_type: cash_in
                        object: charge
                        description: Payment from order
                        is_refundable: false
                        status: pending_payment
                        amount: 1560
                        customer_id: ''
                        order_id: ord_2xayxSvfWzQ2TLz7r
                multiples_cash_charges:
                  value:
                    livemode: true
                    amount: 156000
                    currency: MXN
                    payment_status: pending_payment
                    amount_refunded: 0
                    split_payment: false
                    customer_info:
                      email: franco.longhi@conekta.com
                      phone: 884-712-6894
                      name: franco golden
                      object: customer_info
                    object: order
                    id: ord_2xazGvtKYTjxTUZU3
                    metadata: {}
                    is_refundable: false
                    created_at: 1741104962
                    updated_at: 1741104963
                    line_items:
                      object: list
                      has_more: false
                      total: 1
                      data:
                      - name: APOYO URGENTE REFERENCIA
                        unit_price: 156000
                        quantity: 1
                        sku: COL094
                        brand: CHEDRAUI
                        object: line_item
                        id: line_item_2xazGvtKYTjxTUZU1
                        parent_id: ord_2xazGvtKYTjxTUZU3
                        metadata: {}
                        antifraud_info: {}
                    charges:
                      object: list
                      has_more: false
                      total: 2
                      data:
                      - id: 67c72742e777ac0001f21463
                        livemode: true
                        created_at: 1741104962
                        currency: MXN
                        payment_method:
                          service_name: Cash
                          barcode_url: https://barcodes.conekta.com/cash/cashin/bbva/10830309851141878231.png
                          agreement: '2409992'
                          object: cash_payment
                          type: cash
                          expires_at: 1743724800
                          store_names:
                          - BBVA ATM
                          reference: 10830309851141878231
                          product_type: bbva_cash_in
                        object: charge
                        description: Payment from order
                        is_refundable: false
                        status: pending_payment
                        amount: 156000
                        customer_id: ''
                        order_id: ord_2xazGvtKYTjxTUZU3
                      - id: 67c72742e777ac0001f2145b
                        livemode: true
                        created_at: 1741104962
                        currency: MXN
                        payment_method:
                          service_name: Cash
                          barcode_url: https://barcodes.conekta.com/cash/cashin/datalogic/10001244873740402013.png
                          object: cash_payment
                          type: cash
                          expires_at: 1743724800
                          store_names:
                          - 7 Eleven
                          - Farmacias del Ahorro
                          - CIRCLE K
                          - Tiendas Extra
                          - Farmacia Benavides
                          - Soriana
                          - WALDO'S
                          - ELECZION
                          - Super Kiosko
                          - Farmacias Bazar
                          - Wolworth
                          - Del Sol
                          - Yepas
                          - Farmacias De Dios
                          - Farmacias Nosarco
                          - Farmacias Santa Cruz
                          - Farmacentro
                          - Farmacias GyM
                          - Farmacias San Francisco de Asis
                          - Farmacias Union
                          - Farmacias Zapotlan
                          - Farmatodo
                          - Al Super
                          reference: 10001244873740402013
                          product_type: cash_in
                        object: charge
                        description: Payment from order
                        is_refundable: false
                        status: pending_payment
                        amount: 156000
                        customer_id: ''
                        order_id: ord_2xazGvtKYTjxTUZU3
                card:
                  value:
                    id: 63dab7d00558720001bb3c7d
                    livemode: true,
                    created_at: 1675278289,
                    currency: MXN
                    failure_code: suspected_fraud
                    failure_message: Este cargo ha sido declinado porque el comportamiento del comprador es sospechoso.
                    device_fingerprint: 6FR3chaU4Y1nGAW5NAGd1rcjAKa142Ba
                    payment_method:
                      name: Fulanito Perez
                      exp_month: 2
                      exp_year: 30
                      object: card_payment
                      type: credit
                      last4: 4242
                      brand: visa
                      issuer: BANAMEX
                      account_type: Credit
                      country: MX
                      fraud_indicators:
                      - description: El usuario está utilizando una tarjeta de crédito o débito de prueba en modo producción.
                    object: charge
                    description: Payment from order
                    status: declined
                    amount: 20001,
                    fee: 116,
                    order_id: ord_2tHuwPhgSwq6Gt7Rg
                bnpl:
                  value:
                    amount: 300000
                    amount_refunded: 0
                    channel:
                      checkout_request_id: fdcb06d6-c9e1-44ee-921f-17723b63852f
                      checkout_request_type: PaymentLink
                      id: channel_2xaegxs5s69VP4pWw
                      segment: Checkout
                    charges:
                      data:
                      - amount: 300000
                        channel:
                          checkout_request_id: fdcb06d6-c9e1-44ee-921f-17723b63852f
                          checkout_request_type: PaymentLink
                          id: channel_2xaegxs5s69VP4pXA
                          segment: Checkout
                        created_at: 1741015718
                        currency: MXN
                        customer_id: ''
                        description: Payment from order
                        id: 67c5caa665f9b400015dec40
                        is_refundable: false
                        livemode: true
                        object: charge
                        order_id: ord_2xaegxs5s69VP4pWy
                        payment_method:
                          cancel_url: https://pay.conekta.io/payment-status/fdcb06d6-c9e1-44ee-921f-17723b63852f/cancel?order_id=ord_2xaegxs5s69VP4pWy&charge_id=67c5caa665f9b400015dec40
                          expires_at: 1743694118
                          failure_url: https://pay.conekta.io/payment-status/fdcb06d6-c9e1-44ee-921f-17723b63852f/failure?order_id=ord_2xaegxs5s69VP4pWy&charge_id=67c5caa665f9b400015dec40
                          object: bnpl_payment
                          product_type: aplazo_bnpl
                          redirect_url: https://pay.playground.com/na/hpp/payments/20sJ2LZ
                          success_url: https://pay.conekta.io/payment-status/fdcb06d6-c9e1-44ee-921f-17723b63852f/success?order_id=ord_2xaegxs5s69VP4pWy&charge_id=67c5caa665f9b400015dec40
                          type: bnpl
                        status: pending_payment
                      has_more: false
                      object: list
                      total: 1
                    created_at: 1741015718
                    currency: MXN
                    customer_info:
                      corporate: false
                      customer_id: cus_2xZfwfjXxX9tZhVey
                      email: alexis.ruiz@google.com
                      name: Pedro Ruiz
                      object: customer_info
                      phone: '+5215555555555'
                    id: ord_2xaegxs5s69VP4pWy
                    is_refundable: false
                    line_items:
                      data:
                      - antifraud_info: {}
                        id: line_item_2xaegxs5s69VP4pWv
                        metadata: {}
                        name: Test creditea
                        object: line_item
                        parent_id: ord_2xaegxs5s69VP4pWy
                        quantity: 1
                        unit_price: 300000
                      has_more: false
                      object: list
                      total: 1
                    livemode: true
                    metadata: {}
                    object: order
                    payment_status: pending_payment
                    split_payment: false
                    updated_at: 1741015718
                pay_by_bank:
                  value:
                    amount: 300000
                    amount_refunded: 0
                    charges:
                      data:
                      - amount: 300000
                        channel:
                          checkout_request_id: fdcb06d6-c9e1-44ee-921f-17723b63852f
                          checkout_request_type: PaymentLink
                          id: channel_2xaegxs5s69VP4pXA
                          segment: Checkout
                        created_at: 1741015718
                        currency: MXN
                        customer_id: ''
                        description: Payment from order
                        id: 67c5caa665f9b400015dec40
                        is_refundable: false
                        livemode: true
                        object: charge
 

# --- truncated at 32 KB (133 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/conekta/refs/heads/main/openapi/conekta-orders-api-openapi.yml