diff --git a/_build/api.yaml b/_build/api.yaml index 6ca17b4..847c205 100644 --- a/_build/api.yaml +++ b/_build/api.yaml @@ -1499,7 +1499,6 @@ paths: bnpl: value: 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 @@ -1641,7 +1640,6 @@ paths: bnpl: value: 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 @@ -5073,7 +5071,6 @@ paths: 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 @@ -16554,13 +16551,15 @@ components: title: customer_payment_method_request - properties: cancel_url: - description: URL to redirect the customer after a canceled payment + description: Optional URL to redirect the customer after a canceled payment example: https://example.com/cancel type: string - can_not_expire: - description: Indicates if the payment method can not expire - example: true - type: boolean + expires_at: + description: "Optional expiry for the BNPL order, expressed in seconds\ + \ since the Unix epoch. Defaults to one month from creation when omitted." + example: 1680397724 + format: int64 + type: integer failure_url: description: URL to redirect the customer after a failed payment example: https://example.com/failure @@ -16584,8 +16583,6 @@ components: example: bnpl type: string required: - - can_not_expire - - cancel_url - failure_url - product_type - success_url @@ -16623,13 +16620,27 @@ components: minLength: 4 type: string name: - description: Cardholder name + description: "Cardholder name. Must include first and last name separated\ + \ by a space; single-word names are rejected. Letters (including accented\ + \ Latin characters), spaces, and the characters , . ' - are accepted;\ + \ digits and other symbols are rejected." example: John Doe + maxLength: 249 type: string number: description: Card number example: "4242424242424242" type: string + contract_id: + description: Optional merchant-supplied identifier (exactly 10 characters) + that links a card transaction to a recurring/subscription contract at + the acquiring bank. Forwarded to the bank gateway and stored on the + resulting charge. Accepted on creation only; ignored on update. Do not + place sensitive bank data here — the value is returned in charge responses. + example: "3456788363" + maxLength: 10 + minLength: 10 + type: string customer_ip_address: description: Optional field used to capture the customer's IP address for fraud prevention and security monitoring purposes @@ -17164,10 +17175,6 @@ components: description: "this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)" example: MX type: string - residential: - default: false - example: true - type: boolean external_number: type: string required: @@ -17499,31 +17506,57 @@ components: title: customerPaymentMethods title: customer_payment_methods_response customer_shipping_contacts_request_address: - description: Address of the person who will receive the order - properties: - street1: - example: Nuevo Leon 254 - type: string - street2: - example: Departamento 404 - type: string - postal_code: - example: "06100" - type: string - city: - example: Ciudad de Mexico - type: string - state: - example: Ciudad de Mexico - type: string - country: - description: "this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)" - example: MX - type: string - residential: - example: true - nullable: true - type: boolean + allOf: + - description: Address of the person who will receive the order + properties: + street1: + description: Street and number of the delivery address. + example: Nuevo Leon 254 + maxLength: 249 + minLength: 2 + type: string + street2: + description: "Apartment, suite or interior reference for the delivery\ + \ address." + example: Departamento 404 + maxLength: 249 + type: string + postal_code: + description: Postal code of the delivery address. For Mexican addresses + (country MX) it must be a 5-digit postal code. + example: "06100" + maxLength: 250 + type: string + city: + description: City of the delivery address. Must contain at least two consecutive + ASCII letters. + example: Ciudad de Mexico + maxLength: 249 + pattern: "[A-Za-z]{2}" + type: string + state: + description: State of the delivery address. + example: Ciudad de Mexico + maxLength: 249 + type: string + country: + description: "Country of the delivery address. This field follows the\ + \ [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)." + example: MX + maxLength: 249 + minLength: 2 + type: string + residential: + default: true + description: Indicates whether the delivery address is residential. + example: true + nullable: true + type: boolean + title: shipping_contact_address + required: + - country + - postal_code + - street1 customer_shipping_contacts_data_response: allOf: - description: |- @@ -17540,7 +17573,10 @@ components: type: string between_streets: description: The street names between which the order will be delivered. + Must contain at least two consecutive ASCII letters. example: Ackerman Crescent + maxLength: 249 + pattern: "[A-Za-z]{2}" type: string address: $ref: "#/components/schemas/customer_shipping_contacts_request_address" @@ -17899,7 +17935,10 @@ components: type: string between_streets: description: The street names between which the order will be delivered. + Must contain at least two consecutive ASCII letters. example: Ackerman Crescent + maxLength: 249 + pattern: "[A-Za-z]{2}" type: string address: $ref: "#/components/schemas/customer_shipping_contacts_request_address" @@ -19138,6 +19177,13 @@ components: default: null description: List of discounts that are applied to the order nullable: true + order_tax_request_metadata_value: + anyOf: + - maxLength: 249 + type: string + - type: integer + - type: number + - type: boolean tax_lines_data_response: allOf: - allOf: @@ -19152,14 +19198,14 @@ components: description: description: description or tax's name example: testing - minLength: 2 + minLength: 3 type: string metadata: - additionalProperties: true + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" example: key: value maxProperties: 100 - type: object required: - amount - description @@ -19229,23 +19275,30 @@ components: carrier: description: Carrier name for the shipment example: FEDEX + maxLength: 249 + minLength: 3 type: string tracking_number: description: Tracking number can be used to track the shipment example: TRACK123 + maxLength: 249 + minLength: 3 type: string method: description: Method of shipment example: Same day + maxLength: 249 + minLength: 3 type: string metadata: - additionalProperties: true - description: Hash where the user can send additional information for - each 'shipping'. + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" + description: "Hash where the user can send additional information for\ + \ each 'shipping'. Values must be scalar (string of at most 249 characters,\ + \ integer, number or boolean); nested objects and arrays are not supported." example: key: value maxProperties: 100 - type: object required: - amount title: shipping_request @@ -19402,24 +19455,30 @@ components: brand: description: The brand of the item. example: Cohiba + maxLength: 249 + minLength: 2 type: string description: description: Short description of the item example: Imported From Mex. - maxLength: 250 + maxLength: 249 + minLength: 3 type: string metadata: - additionalProperties: true + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" default: {} - description: It is a key/value hash that can hold custom fields. Maximum - 100 elements and allows special characters. + description: "It is a key/value hash that can hold custom fields. Maximum\ + \ 100 elements. Values must be scalar (string of at most 249 characters,\ + \ integer, number or boolean); nested objects and arrays are not supported." example: key: value maxProperties: 100 - type: object name: description: The name of the item. It will be displayed in the order. example: Box of Cohiba S1s + maxLength: 249 + minLength: 3 type: string quantity: description: The quantity of the item in the order. @@ -19431,6 +19490,8 @@ components: description: The stock keeping unit for the item. It is used to identify the item in the order. example: XYZ12345 + maxLength: 249 + minLength: 1 type: string tags: description: List of tags for the item. It is used to identify the item @@ -19439,7 +19500,10 @@ components: - food - mexican food items: + maxLength: 249 + minLength: 2 type: string + minItems: 1 type: array default: null unit_price: @@ -19768,15 +19832,14 @@ components: type: array default: null exclude_card_networks: - description: List of card networks to exclude from the checkout. This field - is only applicable for card payments. + description: "List of card networks to exclude from the checkout. This field\ + \ is only applicable for card payments. Accepted values: 'visa_master_card'\ + \ (a single token excluding both Visa and Mastercard) and 'amex'." example: - - visa - - amex + - visa_master_card items: enum: - - visa - - mastercard + - visa_master_card - amex type: string title: checkout_request_exclude_card_networks @@ -19973,24 +20036,30 @@ components: brand: description: The brand of the item. example: Cohiba + maxLength: 249 + minLength: 2 type: string description: description: Short description of the item example: Imported From Mex. - maxLength: 250 + maxLength: 249 + minLength: 3 type: string metadata: - additionalProperties: true + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" default: {} - description: It is a key/value hash that can hold custom fields. Maximum - 100 elements and allows special characters. + description: "It is a key/value hash that can hold custom fields. Maximum\ + \ 100 elements. Values must be scalar (string of at most 249 characters,\ + \ integer, number or boolean); nested objects and arrays are not supported." example: key: value maxProperties: 100 - type: object name: description: The name of the item. It will be displayed in the order. example: Box of Cohiba S1s + maxLength: 249 + minLength: 3 type: string quantity: description: The quantity of the item in the order. @@ -20002,6 +20071,8 @@ components: description: The stock keeping unit for the item. It is used to identify the item in the order. example: XYZ12345 + maxLength: 249 + minLength: 1 type: string tags: description: List of tags for the item. It is used to identify the item @@ -20010,7 +20081,10 @@ components: - food - mexican food items: + maxLength: 249 + minLength: 2 type: string + minItems: 1 type: array default: null unit_price: @@ -20035,23 +20109,30 @@ components: carrier: description: Carrier name for the shipment example: FEDEX + maxLength: 249 + minLength: 3 type: string tracking_number: description: Tracking number can be used to track the shipment example: TRACK123 + maxLength: 249 + minLength: 3 type: string method: description: Method of shipment example: Same day + maxLength: 249 + minLength: 3 type: string metadata: - additionalProperties: true - description: Hash where the user can send additional information for each - 'shipping'. + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" + description: "Hash where the user can send additional information for each\ + \ 'shipping'. Values must be scalar (string of at most 249 characters,\ + \ integer, number or boolean); nested objects and arrays are not supported." example: key: value maxProperties: 100 - type: object required: - amount title: shipping_request @@ -20067,14 +20148,14 @@ components: description: description: description or tax's name example: testing - minLength: 2 + minLength: 3 type: string metadata: - additionalProperties: true + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" example: key: value maxProperties: 100 - type: object required: - amount - description @@ -20116,10 +20197,12 @@ components: type: array default: null metadata: - additionalProperties: true - description: Metadata associated with the order + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" + description: "Metadata associated with the order. Values must be scalar\ + \ (string of at most 249 characters, integer, number or boolean); nested\ + \ objects and arrays are not supported." maxProperties: 100 - type: object needs_shipping_contact: description: Allows you to fill out the shipping information at checkout example: false @@ -20155,10 +20238,15 @@ components: type: array default: null three_ds_mode: - description: "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." - nullable: true + description: "Indicates the 3DS2 mode: 'strict', 'not_strict' or 'smart'.\ + \ The value is validated against the allowed set on creation; sending\ + \ an explicit null is rejected. Omit the field to create the order without\ + \ requesting 3DS through the API (company-level 3DS applies only to orders\ + \ paid through Checkout or when antifraud forces 3DS)." + enum: + - strict + - not_strict + - smart type: string required: - currency @@ -20238,7 +20326,8 @@ components: default: null metadata: additionalProperties: - type: string + $ref: "#/components/schemas/order_tax_request_metadata_value" + maxProperties: 100 pre_authorize: description: Indicates whether the order charges must be preauthorized type: boolean @@ -20279,24 +20368,30 @@ components: brand: description: The brand of the item. example: Cohiba + maxLength: 249 + minLength: 2 type: string description: description: Short description of the item example: Imported From Mex. - maxLength: 250 + maxLength: 249 + minLength: 3 type: string metadata: - additionalProperties: true + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" default: {} - description: It is a key/value hash that can hold custom fields. Maximum - 100 elements and allows special characters. + description: "It is a key/value hash that can hold custom fields. Maximum\ + \ 100 elements. Values must be scalar (string of at most 249 characters,\ + \ integer, number or boolean); nested objects and arrays are not supported." example: key: value maxProperties: 100 - type: object name: description: The name of the item. It will be displayed in the order. example: Box of Cohiba S1s + maxLength: 249 + minLength: 3 type: string quantity: description: The quantity of the item in the order. @@ -20308,6 +20403,8 @@ components: description: The stock keeping unit for the item. It is used to identify the item in the order. example: XYZ12345 + maxLength: 249 + minLength: 1 type: string tags: description: List of tags for the item. It is used to identify the item @@ -20316,7 +20413,10 @@ components: - food - mexican food items: + maxLength: 249 + minLength: 2 type: string + minItems: 1 type: array default: null unit_price: @@ -20344,12 +20444,17 @@ components: additionalProperties: type: object description: - maxLength: 250 + maxLength: 249 + minLength: 3 type: string sku: + maxLength: 249 + minLength: 1 type: string name: example: Box of Cohiba S1s + maxLength: 249 + minLength: 3 type: string unit_price: example: 20000 @@ -20363,14 +20468,20 @@ components: type: integer tags: items: + maxLength: 249 + minLength: 2 type: string + minItems: 1 type: array default: null brand: + maxLength: 249 + minLength: 2 type: string metadata: additionalProperties: - type: string + $ref: "#/components/schemas/order_tax_request_metadata_value" + maxProperties: 100 title: update_product orderRefund_request: properties: @@ -20928,15 +21039,14 @@ components: type: array default: null exclude_card_networks: - description: List of card networks to exclude from the checkout. This field - is only applicable for card payments. + description: "List of card networks to exclude from the checkout. This field\ + \ is only applicable for card payments. Accepted values: 'visa_master_card'\ + \ (a single token excluding both Visa and Mastercard) and 'amex'." example: - - visa - - amex + - visa_master_card items: enum: - - visa - - mastercard + - visa_master_card - amex type: string title: checkout_exclude_card_networks @@ -20968,9 +21078,15 @@ components: type: array default: null three_ds_mode: - description: "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." + description: "Indicates the 3DS2 mode: 'strict', 'not_strict' or 'smart'.\ + \ Accepted on creation only. Null appears in responses when no mode is\ + \ configured; to defer to the company-level 3DS configuration, omit the\ + \ field on creation (an explicit null is rejected)." + enum: + - strict + - not_strict + - smart + - null nullable: true type: string name: @@ -21320,23 +21436,30 @@ components: carrier: description: Carrier name for the shipment example: FEDEX + maxLength: 249 + minLength: 3 type: string tracking_number: description: Tracking number can be used to track the shipment example: TRACK123 + maxLength: 249 + minLength: 3 type: string method: description: Method of shipment example: Same day + maxLength: 249 + minLength: 3 type: string metadata: - additionalProperties: true - description: Hash where the user can send additional information for each - 'shipping'. + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" + description: "Hash where the user can send additional information for\ + \ each 'shipping'. Values must be scalar (string of at most 249 characters,\ + \ integer, number or boolean); nested objects and arrays are not supported." example: key: value maxProperties: 100 - type: object required: - amount title: shipping_request @@ -21388,6 +21511,52 @@ components: example: false type: boolean title: customer_shipping_contacts_response + shipping_contact_address: + description: Address of the person who will receive the order + properties: + street1: + description: Street and number of the delivery address. + example: Nuevo Leon 254 + maxLength: 249 + minLength: 2 + type: string + street2: + description: "Apartment, suite or interior reference for the delivery address." + example: Departamento 404 + maxLength: 249 + type: string + postal_code: + description: Postal code of the delivery address. For Mexican addresses + (country MX) it must be a 5-digit postal code. + example: "06100" + maxLength: 250 + type: string + city: + description: City of the delivery address. Must contain at least two consecutive + ASCII letters. + example: Ciudad de Mexico + maxLength: 249 + pattern: "[A-Za-z]{2}" + type: string + state: + description: State of the delivery address. + example: Ciudad de Mexico + maxLength: 249 + type: string + country: + description: "Country of the delivery address. This field follows the [ISO\ + \ 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)." + example: MX + maxLength: 249 + minLength: 2 + type: string + residential: + default: true + description: Indicates whether the delivery address is residential. + example: true + nullable: true + type: boolean + title: shipping_contact_address customer_update_shipping_contacts_request: description: |- [Shipping](https://developers.conekta.com/v2.3.0/reference/createcustomershippingcontacts) @@ -21403,10 +21572,13 @@ components: type: string between_streets: description: The street names between which the order will be delivered. + Must contain at least two consecutive ASCII letters. example: Ackerman Crescent + maxLength: 249 + pattern: "[A-Za-z]{2}" type: string address: - $ref: "#/components/schemas/customer_shipping_contacts_request_address" + $ref: "#/components/schemas/shipping_contact_address" parent_id: type: string default: @@ -21732,14 +21904,14 @@ components: description: description: description or tax's name example: testing - minLength: 2 + minLength: 3 type: string metadata: - additionalProperties: true + additionalProperties: + $ref: "#/components/schemas/order_tax_request_metadata_value" example: key: value maxProperties: 100 - type: object required: - amount - description @@ -21770,11 +21942,11 @@ components: description: description: description or tax's name example: testing - minLength: 2 + minLength: 3 type: string metadata: additionalProperties: - type: object + $ref: "#/components/schemas/order_tax_request_metadata_value" maxProperties: 100 token_request_card: properties: diff --git a/schemas/checkouts/checkout.yml b/schemas/checkouts/checkout.yml index eed957d..86b839a 100644 --- a/schemas/checkouts/checkout.yml +++ b/schemas/checkouts/checkout.yml @@ -25,11 +25,11 @@ properties: exclude_card_networks: title: checkout_exclude_card_networks type: array - description: "List of card networks to exclude from the checkout. This field is only applicable for card payments." + description: "List of card networks to exclude from the checkout. This field is only applicable for card payments. Accepted values: 'visa_master_card' (a single token excluding both Visa and Mastercard) and 'amex'." items: type: string - enum: ["visa", "mastercard", "amex"] - example: ["visa", "amex"] + enum: ["visa_master_card", "amex"] + example: ["visa_master_card"] expires_at: type: integer example: 1680397724 @@ -51,12 +51,15 @@ properties: example: [3,6,12] three_ds_mode: type: [string, "null"] - description: "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." + enum: ["strict", "not_strict", "smart", null] + description: "Indicates the 3DS2 mode: 'strict', 'not_strict' or 'smart'. Accepted on creation only. Null appears in responses when no mode is configured; to defer to the company-level 3DS configuration, omit the field on creation (an explicit null is rejected)." examples: - value: "smart" - summary: "Those transactions that Conekta considers to present a risk to commerce will go through an additional verification flow (through 3DS2), provided that the issuing bank is compatible with this technology.If the transaction is not considered risky, it will continue its normal course, without going through 3DS2 authentication." + summary: "Risk-based 3DS: transactions that Conekta considers risky go through the 3DS2 verification flow (provided the issuing bank supports it); low-risk transactions continue without 3DS2 authentication." - value: "strict" - summary: "All transactions will require 3DS2 authentication as a complementary measure for the security of charges, except those that are rejected by our Anti-Fraud. The issuing bank must be compatible with 3DS2 technology." + summary: "All transactions require 3DS2 authentication as a complementary security measure, except those rejected by our Anti-Fraud. The issuing bank must support 3DS2." + - value: "not_strict" + summary: "The 3DS2 flow is also always initiated, behaving like 'strict'. Acceptance of authentication attempts is governed by the company-level 3DS configuration, not by this mode." name: type: string description: Reason for charge diff --git a/schemas/checkouts/checkout_request.yml b/schemas/checkouts/checkout_request.yml index 0f759b4..c5dcdc7 100644 --- a/schemas/checkouts/checkout_request.yml +++ b/schemas/checkouts/checkout_request.yml @@ -20,11 +20,11 @@ properties: exclude_card_networks: title: checkout_request_exclude_card_networks type: array - description: "List of card networks to exclude from the checkout. This field is only applicable for card payments." + description: "List of card networks to exclude from the checkout. This field is only applicable for card payments. Accepted values: 'visa_master_card' (a single token excluding both Visa and Mastercard) and 'amex'." items: type: string - enum: ["visa", "mastercard", "amex"] - example: ["visa", "amex"] + enum: ["visa_master_card", "amex"] + example: ["visa_master_card"] plan_ids: type: array description: "List of plan IDs that will be available for subscription. This field is required for subscription payments." diff --git a/schemas/customers/customer_address.yml b/schemas/customers/customer_address.yml index 2fe1435..ec69fcd 100644 --- a/schemas/customers/customer_address.yml +++ b/schemas/customers/customer_address.yml @@ -23,10 +23,5 @@ properties: type: string example: MX description: "this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)" - residential: - type: boolean - example: true - default: false external_number: type: string - \ No newline at end of file diff --git a/schemas/customers/customer_shipping_contacts.yml b/schemas/customers/customer_shipping_contacts.yml index d876add..979d54a 100644 --- a/schemas/customers/customer_shipping_contacts.yml +++ b/schemas/customers/customer_shipping_contacts.yml @@ -13,36 +13,19 @@ properties: type: string example: "Marvin Fuller" description: "Name of the person who will receive the order" - between_streets: + between_streets: type: string + maxLength: 249 + pattern: "[A-Za-z]{2}" example: "Ackerman Crescent" - description: "The street names between which the order will be delivered." - address: - type: object - description: "Address of the person who will receive the order" - properties: - street1: - type: string - example: Nuevo Leon 254 - street2: - type: string - example: Departamento 404 - postal_code: - type: string - example: "06100" - city: - type: string - example: "Ciudad de Mexico" - state: - type: string - example: "Ciudad de Mexico" - country: - type: string - example: MX - description: "this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)" - residential: - type: [boolean, "null"] - example: true + description: "The street names between which the order will be delivered. Must contain at least two consecutive ASCII letters." + address: + allOf: + - $ref: shipping_contact_address.yml + required: + - street1 + - postal_code + - country parent_id: type: string default: diff --git a/schemas/customers/customer_update_shipping_contacts.yml b/schemas/customers/customer_update_shipping_contacts.yml index b26e0bf..a0dec2f 100644 --- a/schemas/customers/customer_update_shipping_contacts.yml +++ b/schemas/customers/customer_update_shipping_contacts.yml @@ -11,36 +11,14 @@ properties: type: string example: "Marvin Fuller" description: "Name of the person who will receive the order" - between_streets: + between_streets: type: string + maxLength: 249 + pattern: "[A-Za-z]{2}" example: "Ackerman Crescent" - description: "The street names between which the order will be delivered." - address: - type: object - description: "Address of the person who will receive the order" - properties: - street1: - type: string - example: Nuevo Leon 254 - street2: - type: string - example: Departamento 404 - postal_code: - type: string - example: "06100" - city: - type: string - example: "Ciudad de Mexico" - state: - type: string - example: "Ciudad de Mexico" - country: - type: string - example: MX - description: "this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)" - residential: - type: [boolean, "null"] - example: true + description: "The street names between which the order will be delivered. Must contain at least two consecutive ASCII letters." + address: + $ref: shipping_contact_address.yml parent_id: type: string default: diff --git a/schemas/customers/payment_method_bnpl_request.yml b/schemas/customers/payment_method_bnpl_request.yml index 0330bf8..20249a5 100644 --- a/schemas/customers/payment_method_bnpl_request.yml +++ b/schemas/customers/payment_method_bnpl_request.yml @@ -3,8 +3,6 @@ allOf: - $ref: './customer_payment_method_request.yml' - type: object required: - - can_not_expire - - cancel_url - failure_url - product_type - success_url @@ -12,12 +10,13 @@ allOf: properties: cancel_url: type: string - description: "URL to redirect the customer after a canceled payment" + description: "Optional URL to redirect the customer after a canceled payment" example: "https://example.com/cancel" - can_not_expire: - type: boolean - example: true - description: "Indicates if the payment method can not expire" + expires_at: + type: integer + format: int64 + example: 1680397724 + description: "Optional expiry for the BNPL order, expressed in seconds since the Unix epoch. Defaults to one month from creation when omitted." failure_url: type: string description: "URL to redirect the customer after a failed payment" diff --git a/schemas/customers/payment_method_card_request.yml b/schemas/customers/payment_method_card_request.yml index 5b91543..0c703fc 100644 --- a/schemas/customers/payment_method_card_request.yml +++ b/schemas/customers/payment_method_card_request.yml @@ -29,12 +29,19 @@ allOf: minLength: 4 name: type: string + maxLength: 249 example: "John Doe" - description: "Cardholder name" + description: "Cardholder name. Must include first and last name separated by a space; single-word names are rejected. Letters (including accented Latin characters), spaces, and the characters , . ' - are accepted; digits and other symbols are rejected." number: type: string example: "4242424242424242" description: "Card number" + contract_id: + type: string + minLength: 10 + maxLength: 10 + example: "3456788363" + description: "Optional merchant-supplied identifier (exactly 10 characters) that links a card transaction to a recurring/subscription contract at the acquiring bank. Forwarded to the bank gateway and stored on the resulting charge. Accepted on creation only; ignored on update. Do not place sensitive bank data here — the value is returned in charge responses." customer_ip_address: type: string example: "0.0.0.0" diff --git a/schemas/customers/shipping_contact_address.yml b/schemas/customers/shipping_contact_address.yml new file mode 100644 index 0000000..2e5425d --- /dev/null +++ b/schemas/customers/shipping_contact_address.yml @@ -0,0 +1,42 @@ +title: shipping_contact_address +type: object +description: "Address of the person who will receive the order" +properties: + street1: + type: string + minLength: 2 + maxLength: 249 + example: Nuevo Leon 254 + description: "Street and number of the delivery address." + street2: + type: string + maxLength: 249 + example: Departamento 404 + description: "Apartment, suite or interior reference for the delivery address." + postal_code: + type: string + maxLength: 250 + example: "06100" + description: "Postal code of the delivery address. For Mexican addresses (country MX) it must be a 5-digit postal code." + city: + type: string + maxLength: 249 + pattern: "[A-Za-z]{2}" + example: "Ciudad de Mexico" + description: "City of the delivery address. Must contain at least two consecutive ASCII letters." + state: + type: string + maxLength: 249 + example: "Ciudad de Mexico" + description: "State of the delivery address." + country: + type: string + minLength: 2 + maxLength: 249 + example: MX + description: "Country of the delivery address. This field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)." + residential: + type: [boolean, "null"] + default: true + example: true + description: "Indicates whether the delivery address is residential." diff --git a/schemas/orders/order_request.yml b/schemas/orders/order_request.yml index ad7cd8f..d1ead89 100644 --- a/schemas/orders/order_request.yml +++ b/schemas/orders/order_request.yml @@ -66,9 +66,15 @@ properties: $ref: product.yml metadata: type: object - additionalProperties: true + additionalProperties: + anyOf: + - type: string + maxLength: 249 + - type: integer + - type: number + - type: boolean maxProperties: 100 - description: "Metadata associated with the order" + description: "Metadata associated with the order. Values must be scalar (string of at most 249 characters, integer, number or boolean); nested objects and arrays are not supported." needs_shipping_contact: type: boolean example: false @@ -98,10 +104,13 @@ properties: items: $ref: order_tax_request.yml three_ds_mode: - type: [string, "null"] - description: "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." + type: string + enum: ["strict", "not_strict", "smart"] + description: "Indicates the 3DS2 mode: 'strict', 'not_strict' or 'smart'. The value is validated against the allowed set on creation; sending an explicit null is rejected. Omit the field to create the order without requesting 3DS through the API (company-level 3DS applies only to orders paid through Checkout or when antifraud forces 3DS)." examples: - value: "smart" - summary: "Those transactions that Conekta considers to present a risk to commerce will go through an additional verification flow (through 3DS2), provided that the issuing bank is compatible with this technology.If the transaction is not considered risky, it will continue its normal course, without going through 3DS2 authentication." + summary: "Risk-based 3DS: transactions that Conekta considers risky go through the 3DS2 verification flow (provided the issuing bank supports it); low-risk transactions continue without 3DS2 authentication." - value: "strict" - summary: "All transactions will require 3DS2 authentication as a complementary measure for the security of charges, except those that are rejected by our Anti-Fraud. The issuing bank must be compatible with 3DS2 technology." + summary: "All transactions require 3DS2 authentication as a complementary security measure, except those rejected by our Anti-Fraud. The issuing bank must support 3DS2." + - value: "not_strict" + summary: "The 3DS2 flow is also always initiated, behaving like 'strict'. Acceptance of authentication attempts is governed by the company-level 3DS configuration, not by this mode." diff --git a/schemas/orders/order_tax_request.yml b/schemas/orders/order_tax_request.yml index 1c168c9..8cdd6e0 100644 --- a/schemas/orders/order_tax_request.yml +++ b/schemas/orders/order_tax_request.yml @@ -14,10 +14,16 @@ properties: description: type: string example: "testing" - minLength: 2 + minLength: 3 description: description or tax's name metadata: type: object - additionalProperties: true + additionalProperties: + anyOf: + - type: string + maxLength: 249 + - type: integer + - type: number + - type: boolean example: { "key": "value" } maxProperties: 100 diff --git a/schemas/orders/order_update_request.yml b/schemas/orders/order_update_request.yml index 92bd302..65ead04 100644 --- a/schemas/orders/order_update_request.yml +++ b/schemas/orders/order_update_request.yml @@ -61,8 +61,14 @@ properties: $ref: product.yml metadata: type: object + maxProperties: 100 additionalProperties: - type: string + anyOf: + - type: string + maxLength: 249 + - type: integer + - type: number + - type: boolean pre_authorize: type: boolean description: "Indicates whether the order charges must be preauthorized" diff --git a/schemas/orders/product.yml b/schemas/orders/product.yml index 21b4a5f..04ea0a8 100644 --- a/schemas/orders/product.yml +++ b/schemas/orders/product.yml @@ -11,22 +11,33 @@ properties: example: { "key": "value" } brand: type: string + minLength: 2 + maxLength: 249 example: "Cohiba" description: "The brand of the item." description: type: string example: "Imported From Mex." - maxLength: 250 + minLength: 3 + maxLength: 249 description: "Short description of the item" metadata: type: object maxProperties: 100 - description: It is a key/value hash that can hold custom fields. Maximum 100 elements and allows special characters. - additionalProperties: true + description: It is a key/value hash that can hold custom fields. Maximum 100 elements. Values must be scalar (string of at most 249 characters, integer, number or boolean); nested objects and arrays are not supported. + additionalProperties: + anyOf: + - type: string + maxLength: 249 + - type: integer + - type: number + - type: boolean example: { "key": "value" } default: {} name: type: string + minLength: 3 + maxLength: 249 example: "Box of Cohiba S1s" description: "The name of the item. It will be displayed in the order." quantity: @@ -37,12 +48,17 @@ properties: description: "The quantity of the item in the order." sku: type: string + minLength: 1 + maxLength: 249 example: "XYZ12345" description: "The stock keeping unit for the item. It is used to identify the item in the order." tags: type: array + minItems: 1 items: type: string + minLength: 2 + maxLength: 249 example: [ "food", "mexican food"] description: "List of tags for the item. It is used to identify the item in the order." unit_price: diff --git a/schemas/orders/request_examples/charge_bnpl.yml b/schemas/orders/request_examples/charge_bnpl.yml index 5bd311a..0af6aed 100644 --- a/schemas/orders/request_examples/charge_bnpl.yml +++ b/schemas/orders/request_examples/charge_bnpl.yml @@ -1,6 +1,5 @@ value: - payment_method: - can_not_expire: true + payment_method: 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 diff --git a/schemas/orders/request_examples/order_with_charges_bnpl.yml b/schemas/orders/request_examples/order_with_charges_bnpl.yml index fce1192..8138419 100644 --- a/schemas/orders/request_examples/order_with_charges_bnpl.yml +++ b/schemas/orders/request_examples/order_with_charges_bnpl.yml @@ -6,7 +6,6 @@ value: 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" diff --git a/schemas/orders/shipping_request.yml b/schemas/orders/shipping_request.yml index dad8e73..b4ed8a6 100644 --- a/schemas/orders/shipping_request.yml +++ b/schemas/orders/shipping_request.yml @@ -8,21 +8,33 @@ properties: example: 100 minimum: 0 description: Shipping amount in cents - carrier: + carrier: type: string + minLength: 3 + maxLength: 249 example: FEDEX description: Carrier name for the shipment tracking_number: type: string + minLength: 3 + maxLength: 249 example: "TRACK123" description: Tracking number can be used to track the shipment method: type: string - example: "Same day" + minLength: 3 + maxLength: 249 + example: "Same day" description: Method of shipment metadata: - description: Hash where the user can send additional information for each 'shipping'. + description: Hash where the user can send additional information for each 'shipping'. Values must be scalar (string of at most 249 characters, integer, number or boolean); nested objects and arrays are not supported. type: object - additionalProperties: true + additionalProperties: + anyOf: + - type: string + maxLength: 249 + - type: integer + - type: number + - type: boolean example: { "key": "value" } maxProperties: 100 \ No newline at end of file diff --git a/schemas/orders/update_order_tax_request.yml b/schemas/orders/update_order_tax_request.yml index eaec2e2..68f2767 100644 --- a/schemas/orders/update_order_tax_request.yml +++ b/schemas/orders/update_order_tax_request.yml @@ -10,10 +10,15 @@ properties: description: type: string example: "testing" - minLength: 2 + minLength: 3 description: description or tax's name metadata: type: object additionalProperties: - type: object + anyOf: + - type: string + maxLength: 249 + - type: integer + - type: number + - type: boolean maxProperties: 100 diff --git a/schemas/orders/update_product.yml b/schemas/orders/update_product.yml index c7fdd6a..0a2a40a 100644 --- a/schemas/orders/update_product.yml +++ b/schemas/orders/update_product.yml @@ -7,11 +7,16 @@ properties: type: object description: type: string - maxLength: 250 + minLength: 3 + maxLength: 249 sku: type: string + minLength: 1 + maxLength: 249 name: type: string + minLength: 3 + maxLength: 249 example: "Box of Cohiba S1s" unit_price: type: integer @@ -25,11 +30,22 @@ properties: minimum: 1 tags: type: array + minItems: 1 items: type: string + minLength: 2 + maxLength: 249 brand: type: string + minLength: 2 + maxLength: 249 metadata: type: object + maxProperties: 100 additionalProperties: - type: string \ No newline at end of file + anyOf: + - type: string + maxLength: 249 + - type: integer + - type: number + - type: boolean \ No newline at end of file