{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/conekta/main/json-schema/conekta-order-schema.json", "title": "Conekta Order", "description": "Top-level transaction object in the Conekta API. Groups line items, charges, customer info, shipping, taxes, and discounts.", "type": "object", "required": ["currency", "line_items"], "properties": { "id": { "type": "string", "description": "Conekta-assigned order identifier (ord_...)." }, "object": { "type": "string", "const": "order" }, "livemode": { "type": "boolean", "description": "Indicates whether the order was created in live or test mode." }, "currency": { "type": "string", "description": "ISO 4217 currency code. MXN is most common.", "examples": ["MXN", "USD"] }, "customer_info": { "type": "object", "properties": { "customer_id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "phone": { "type": "string" } } }, "line_items": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["name", "unit_price", "quantity"], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "unit_price": { "type": "integer", "description": "Amount in the smallest currency unit (centavos for MXN)." }, "quantity": { "type": "integer", "minimum": 1 }, "sku": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } } } } }, "charges": { "type": "array", "items": { "type": "object", "properties": { "payment_method": { "type": "object", "properties": { "type": { "type": "string", "enum": ["card", "default", "cash", "spei", "bnpl"] }, "token_id": { "type": "string" }, "expires_at": { "type": "integer" } } }, "amount": { "type": "integer" } } } }, "discount_lines": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string" }, "amount": { "type": "integer" }, "type": { "type": "string", "enum": ["loyalty", "campaign", "coupon"] } } } }, "tax_lines": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "amount": { "type": "integer" } } } }, "shipping_lines": { "type": "array", "items": { "type": "object", "properties": { "amount": { "type": "integer" }, "tracking_number": { "type": "string" }, "carrier": { "type": "string" }, "method": { "type": "string" } } } }, "shipping_contact": { "type": "object", "properties": { "receiver": { "type": "string" }, "phone": { "type": "string" }, "address": { "type": "object", "properties": { "street1": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "postal_code": { "type": "string" }, "country": { "type": "string" } } } } }, "payment_status": { "type": "string", "enum": ["pending_payment", "paid", "partially_paid", "declined", "expired", "refunded", "canceled"] }, "amount": { "type": "integer" }, "amount_refunded": { "type": "integer" }, "metadata": { "type": "object", "additionalProperties": true }, "created_at": { "type": "integer", "description": "Unix epoch in seconds." }, "updated_at": { "type": "integer" } } }