--- openapi: "3.0.3" x-stoplight: id: mpmva0671drqf info: title: Tonder description: Tonder API termsOfService: https://www.google.com/policies/terms/ contact: email: hello@tonder.io version: v1 servers: - url: https://api-stage.tonder.io/api/v1 description: Staging - url: https://api.tonder.io/api/v1 description: Production security: [] paths: "/payments/business/{api_key}": get: description: "" parameters: - in: path description: Your Tonder API Key. You can recover it on Tonder's dashboard. name: api_key required: true schema: type: string responses: "200": description: Successful response content: application/json: schema: type: object properties: business: type: object description: Contains information about the business. properties: pk: type: integer example: 88 description: The primary key or identifier for the business. name: type: string example: QA Test description: The name of the business. categories: type: array description: An array of categories associated with the business. items: type: object properties: pk: type: integer example: 6 description: The primary key or identifier for the category. name: type: string example: E-commerce description: The name of the category. web: type: string format: uri example: http://sitioinformatico.com/tonderwp description: The website URL for the business. logo: type: string format: uri example: https://zplit-stage.s3.amazonaws.com/media/business_logos/ftrain_1.png description: The URL of the business's logo. full_logo_url: type: string format: uri example: https://zplit-stage.s3.amazonaws.com/media/business_logos/ftrain_1.png description: The URL of the business's full logo. background_color: type: string example: "#004080" description: The background color associated with the business. primary_color: type: string example: "#47a76d" description: The primary color associated with the business. checkout_mode: type: boolean example: false description: A boolean indicating whether the business has a checkout mode. textCheckoutColor: type: string example: "#ffffff" description: The text color for the checkout. textDetailsColor: type: string example: "#ed8201" description: The text color for details. checkout_logo: type: string format: uri example: description: The URL of the checkout logo. openpay_keys: type: object description: Contains OpenPay keys for the business. properties: merchant_id: type: string example: mabkc7smuyermmueyxcl description: The merchant ID associated with OpenPay. public_key: type: string example: pk_707d2ac7cc5d43ee881de43be9eea22d description: The public key associated with OpenPay. fintoc_keys: type: object description: Contains Fintoc keys for the business. properties: public_key: type: string example: "" description: The public key associated with Fintoc. vault_id: type: string example: seaf898c927c4ee1a5b2c58315b6ee0d description: The identifier for the vault. vault_url: type: string format: uri example: https://a370a9658141.vault.skyflowapis-preview.com description: The URL for the vault. reference: type: integer example: 520961 description: A reference number associated with the business. is_installments_available: type: boolean example: false description: A boolean indicating whether installments are available. "403": description: Forbidden content: application/json: example: detail: Invalid token. "404": description: Not found content: application/json: example: detail: Not found. tags: - payments "/customer/": post: description: "" parameters: [] requestBody: content: application/json: schema: type: object properties: email: type: string format: email description: The client's email address. required: - email responses: "201": description: Created content: application/jsons: schema: type: object properties: id: type: integer example: 766 description: The newly created client's unique identifier. email: type: string format: email example: jsmith@example.com description: The newly created client's email address. auth_token: type: string example: 86706c507e9ca032c91771a26819d69e91402fc9 description: The authorization token for the client. "400": description: Bad Request content: Bad Request: example: email: - Enter a valid email address. "403": description: Forbidden content: application/json: example: detail: Invalid token. tags: - payments "/orders/": post: description: "" parameters: [] requestBody: content: application/json: schema: type: object properties: business: type: string default: "" example: "" description: Your Tonder API Key. You can retrieve it from the dashboard. client: type: string default: "" example: "" description: "The client authorization token: `auth_token`" billing_address_id: type: string default: example: description: The identifier for the billing address. shipping_address_id: type: string default: example: description: The identifier for the shipping address. amount: type: integer description: The total monetary value of the transaction. status: type: string description: A code indicating the status of the transaction. reference: type: string description: A unique identifier or reference number associated with the transaction. is_oneclick: type: boolean description: A boolean value indicating whether the transaction involves a one-click purchase. items: type: array description: An array containing details about the items included in the transaction. items: type: object properties: description: type: string description: A description for the item. quantity: type: integer description: The quantity of the item added to the cart. price_unit: type: integer description: The unit price of the item. discount: type: integer description: The discount applied to the item. taxes: type: integer description: The taxes associated with the item. product_reference: type: integer description: A reference number or identifier for the product. name: type: string description: " The name or title of the product." amount_total: type: integer description: The total monetary value of this specific cart item. required: - description - quantity - price_unit - discount - taxes - product_reference - name - amount_total required: - business - client - amount - status - reference - is_oneclick - items responses: "201": description: Successful response content: application/json: schema: type: object properties: id: type: integer example: 5910 description: An identifier associated with the order. created: type: string format: date-time example: "2024-01-18T10:09:36.499975-06:00" description: The timestamp indicating the creation date and time of the order. amount: type: string example: "1200.0000" description: The total monetary value of the order. status: type: string example: Activa description: The status of the order. payment_method: type: string example: description: The payment method used in the order. reference: type: string example: "1234556" description: A unique identifier or reference number associated with the order. is_oneclick: type: boolean example: true description: A boolean value indicating whether the order involves a one-click purchase. items: type: array description: An array containing details about the items included in the order. items: type: object properties: description: type: string example: description test description: A description of the item in the order. product_reference: type: string example: "1" description: A reference number or identifier for the product in the order. quantity: type: string example: "1.0000" description: The quantity of the item in the order. price_unit: type: string example: "1.0000" description: The unit price of the item in the order. discount: type: string example: "0.0000" description: The discount applied to the item in the order. taxes: type: string example: "0.0000" description: The taxes associated with the item in the order. amount_total: type: string example: "1200.0000" description: The total monetary value of the specific item in the order. billing_address: type: string description: The billing address information in the order. shipping_address: type: string description: The shipping address information in the order. client: type: object description: Contains information about the client. properties: email: type: string format: email example: pruebas@sdk.com description: The email address of the client. name: type: string example: "" description: The full name of the client. first_name: type: string example: "" description: The first name of the client. last_name: type: string example: "" description: The last name of the client. client_profile: type: object properties: gender: type: string example: "" description: Gender information about the client. date_birth: type: string format: date example: description: Date of birth of the client. terms: type: boolean example: false description: A boolean indicating whether the client has agreed to terms. phone: type: string example: "" description: Phone number of the client. "403": description: Forbidden content: application/json: example: detail: Invalid token. tags: - payments "/business/{business}/payments/": post: description: "" parameters: - in: path name: business description: A business unique identifier. required: true schema: type: string requestBody: content: application/json: schema: type: object properties: amount: type: number example: 1200 description: The total monetary value associated with the order. date: type: string format: date-time example: "2023-12-15T22:45:06.506Z" description: The timestamp representing the date and time of the order. order: type: integer example: 5728 description: The unique identifier number for the order. required: - amount - date - order responses: "201": description: Successful response content: application/json: schema: type: object properties: pk: type: integer example: 5943 description: The primary key or identifier associated with the payment. order: type: integer example: description: The unique identifier number associated with the order. amount: type: string example: "1200.0000" description: The total monetary value of the order. status: type: string example: PENDING description: The current status of the order. date: type: string format: date-time example: "2024-01-18T10:18:39.800536-06:00" description: The timestamp indicating the date and time the payment was created. paid_date: type: string format: date-time example: description: The timestamp indicating the date and time the order was paid, or null if not paid. shipping_address: type: object description: Details of the shipping address in the order. properties: street: type: string example: N/a description: The street address in the shipping information. number: type: string example: N/a description: The house or building number in the shipping information. suburb: type: string example: N/a description: The suburb or district in the shipping information. city: type: object properties: name: type: string example: N/a description: The name of the city in the shipping information. required: - name description: The city information in the shipping details. state: type: object properties: name: type: string example: N/a description: The name of the state or region in the shipping information. country: type: object properties: name: type: string example: N/a description: The name of the country in the shipping information. description: The country information in the shipping details. description: The state information in the shipping details. zip_code: type: string example: N/a description: The ZIP code or postal code in the shipping information. shipping_address_id: type: integer example: description: The identifier associated with the shipping address in the order. billing_address: type: object description: Details of the billing address in the order. properties: street: type: string example: N/a description: The street address in the billing information. number: type: string example: N/a description: The house or building number in the billing information. suburb: type: string example: N/a description: The suburb or district in the billing information. city: type: object properties: name: type: string example: N/a description: The name of the city in the billing information. description: The city information in the billing details. state: type: object properties: name: type: string example: N/a description: The name of the state or region in the billing information. country: type: object properties: name: type: string example: N/a description: The name of the country in the billing information. description: The country information in the billing details. description: The state information in the billing details. zip_code: type: string example: N/a description: The ZIP code or postal code in the billing information. billing_address_id: type: string example: description: The identifier associated with the billing address in the order. client: type: string example: description: The identifier or reference associated with the client or customer. customer_order_reference: type: string example: description: The customer's reference or identifier associated with the order. "403": description: Forbidden content: application/json: example: detail: Invalid token. tags: - payments "/checkout-router/": post: description: "" parameters: [] requestBody: content: application/json: schema: type: object properties: card: type: object description: Contains information related to the payment card used in the transaction. properties: cvv: type: string example: 69f4d206-ceb6-4be8-82d8-7a39dceb9f87 description: The Card Verification Value (CVV) associated with the card. skyflow_id: type: string example: 702faf3c-26f9-41c1-a287-cec20aa43929 description: The unique identifier associated with the card in Skyflow's secure vault. card_number: type: string example: 9230-0892-4469-1474 description: The card number. cardholder_name: type: string example: 3b5d70a9-01b9-4001-8328-9b10168bac25 description: The name of the cardholder. expiration_year: type: string example: 645a3174-340a-4849-ba5c-c4333d2967c9 description: The expiration year of the card. expiration_month: type: string example: 5c6bef6c-9642-4403-9ce6-215b0d3f85b0 description: The expiration month of the card. required: - cvv - skyflow_id - card_number - cardholder_name - expiration_year - expiration_month name: type: string example: Jhon description: The first name of the client. last_name: type: string example: Doe description: The last name of the client. email_client: type: string format: email example: pruebas@sdk.com description: The email address of the client. phone_number: type: string example: "6181234567" description: The phone number of the client. return_url: type: string format: uri example: http://tonder.io description: The URL to which the user will be redirected after completing the transaction. id_product: type: string example: no_id description: The identifier for the product. quantity_product: type: integer example: 1 description: The quantity of the product in the transaction. id_ship: type: string example: "0" description: The identifier for the shipping information. instance_id_ship: type: string example: "0" description: The instance identifier for the shipping information. amount: type: integer example: 1200 description: The total monetary value of the transaction. title_ship: type: string example: shipping description: The title or type of shipping. description: type: string example: transaction description: A description of the transaction. device_session_id: type: string example: VXJLx0H4Fxyz09Ssfbbv0QE8JXDjnKiW description: The identifier for the device session. token_id: type: string example: "" description: A token identifier associated with the transaction. order_id: type: integer example: 5730 description: An identifier or reference number for the order. business_id: type: integer example: 89 description: The identifier for the business. payment_id: type: integer example: 5744 description: The identifier for the payment. source: type: string example: sdk description: The source of the transaction. required: - card - name - last_name - email_client - phone_number - return_url - id_product - quantity_product - id_ship - instance_id_ship - amount - title_ship - description - device_session_id - order_id - business_id - payment_id - source responses: "201": description: Successful response content: application/json: schema: type: object properties: status: type: string example: "200" description: The HTTP status code indicating the success or failure of the response. message: type: string example: Success description: A message providing additional information about the success or failure of the response. psp_response: type: object description: The response from the payment service provider (PSP) containing detailed information about the payment transaction. properties: id: type: string example: ch_3OZyPSK5zRUzLwaW0CyXUIVQ description: A unique identifier for the payment transaction within the payment service provider (PSP) system. object: type: string example: charge description: The type of object, representing the nature of the transaction (e.g., 'charge' for a payment charge). amount: type: integer example: 120000 description: The total amount of the transaction, expressed in the smallest currency unit (e.g., cents or pence). amount_captured: type: integer example: 120000 description: The amount that has been captured or collected from the customer as part of the transaction. amount_refunded: type: integer example: 0 description: The amount that has been refunded to the customer as part of the transaction. application: type: string example: description: The identifier of the application associated with the transaction, if applicable. application_fee: type: string example: description: The application fee, if any, applied to the transaction. application_fee_amount: type: string example: description: The amount of the application fee, if any, applied to the transaction. balance_transaction: type: string example: txn_3OZyPSK5zRUzLwaW0iZIaxjx description: The identifier of the balance transaction associated with the payment charge. billing_details: type: object properties: address: type: object properties: city: type: string example: description: The city associated with the billing address. country: type: string example: description: The country associated with the billing address. line1: type: string example: description: The first line of the billing address. line2: type: string example: description: The second line of the billing address. postal_code: type: string example: description: The postal code associated with the billing address. state: type: string example: description: The state or region associated with the billing address. description: Object containing details about the address in the billing details. email: type: string example: description: The email address associated with the billing details. name: type: string example: description: The name associated with the billing details. phone: type: string example: description: The phone number associated with the billing details. description: Object containing details about the billing information. calculated_statement_descriptor: type: string example: GOLFMANAGER.COM description: The calculated statement descriptor associated with the transaction. captured: type: boolean example: true description: Indicates whether the payment has been captured (true) or not (false). created: type: integer example: 1705595142 description: The timestamp representing the creation date and time of the transaction. currency: type: string example: mxn description: The currency code associated with the transaction. customer: type: string example: cus_PBoeaxFGw6mZFF description: The identifier of the customer associated with the transaction. description: type: string example: transaction description: A description or additional information about the transaction. destination: type: string example: description: The destination of the transaction, if applicable. dispute: type: string example: description: The identifier of any dispute associated with the transaction, if applicable. disputed: type: boolean example: false description: Indicates whether the transaction is disputed (true) or not (false). failure_balance_transaction: type: string example: description: The identifier of the balance transaction in case of failure, if applicable. failure_code: type: string example: description: The code associated with the failure, if applicable. failure_message: type: string example: description: A message providing details about the failure, if applicable. fraud_details: type: object example: {} description: Details about any fraud associated with the transaction, if applicable. invoice: type: string example: description: The identifier of the invoice associated with the transaction, if applicable. livemode: type: boolean example: false description: Indicates whether the transaction was created in live mode (true) or test mode (false). metadata: type: object example: {} description: Additional metadata associated with the transaction. on_behalf_of: type: string example: description: The identifier of the account on behalf of which the transaction is performed, if applicable. order: type: string example: description: The identifier of the order associated with the transaction, if applicable. outcome: type: object description: Details about the outcome of the payment transaction. properties: network_status: type: string example: approved_by_network description: The network status of the payment, indicating whether it was approved by the payment network. reason: type: string example: description: The reason for the outcome, if available. For example, it might contain details if the payment was declined. risk_level: type: string example: normal description: The risk level associated with the payment, indicating the perceived risk of the transaction. risk_score: type: integer example: 15 description: The numerical risk score assigned to the payment transaction, providing a quantitative measure of risk. seller_message: type: string example: Payment complete. description: A message for the seller providing information about the outcome of the payment, typically for display purposes. type: type: string example: authorized description: The type of outcome, indicating the result of the payment authorization process (e.g., 'authorized', 'manual_review', 'issuer_declined'). paid: type: boolean example: true description: A boolean indicating whether the payment has been successfully paid. payment_intent: type: string example: pi_3OZyPSK5zRUzLwaW0xfmGAjx description: The unique identifier of the payment intent associated with this payment transaction. This is relevant for payments using payment methods that involve a two-step confirmation process. payment_method: type: string example: pm_1OZyPRK5zRUzLwaWC5WKIOJC description: The unique identifier of the payment method used for this transaction, such as a credit card or debit card. payment_method_details: type: object description: Details about the payment method used for the transaction, including card details and type. properties: card: type: object properties: amount_authorized: type: integer example: 120000 description: The amount authorized on the card, represented as an integer value. brand: type: string example: visa description: The brand or type of the card used for the payment (e.g., Visa, MasterCard). checks: type: object properties: address_line1_check: type: string example: description: The result of the address line 1 check, indicating if it matches the card's billing address. address_postal_code_check: type: string example: description: The result of the postal code check, indicating if it matches the card's billing postal code. cvc_check: type: string example: description: The result of the card security code (CVC) check. description: Various checks performed on the card details for validation purposes. country: type: string example: US description: The country where the card was issued. exp_month: type: integer example: 11 description: The expiration month of the card. exp_year: type: integer example: 2025 description: The expiration year of the card. extended_authorization: type: object properties: status: type: string example: disabled description: The status of extended authorization, indicating if it is enabled or disabled. description: Information about extended authorization status. fingerprint: type: string example: g8tpcAz042MueZFZ description: A unique identifier (fingerprint) for the card. funding: type: string example: credit description: The funding source of the card, such as 'credit'. incremental_authorization: type: object properties: status: type: string example: unavailable description: The status of incremental authorization, indicating if it is available or unavailable. description: Information about incremental authorization status. installments: type: string example: description: The number of installments for the payment, if applicable. last4: type: string example: "4242" description: The last four digits of the card number. mandate: type: string example: description: The mandate associated with the payment, if applicable. multicapture: type: object properties: status: type: string example: unavailable description: The status of multicapture, indicating if it is available or unavailable. description: Information about multicapture status. network: type: string example: visa description: The card network, such as Visa. network_token: type: object properties: used: type: boolean example: false description: A boolean indicating whether the network token has been used. description: Information about the usage status of the network token. overcapture: type: object properties: maximum_amount_capturable: type: integer example: 120000 description: The maximum amount that can be captured for the payment. status: type: string example: unavailable description: The status of overcapture, indicating if it is available or unavailable. description: Information about overcapture status. three_d_secure: type: string example: description: The status of 3D Secure authentication, if applicable. wallet: type: string example: description: The type of wallet used for the payment, if applicable. description: Details about the card used for the payment, including brand, checks, country, expiration, and more. type: type: string example: card description: The type of payment method, such as 'card'. radar_options: type: object example: {} description: Options related to Stripe Radar, which provides advanced fraud protection. receipt_email: type: string example: description: The email address to which the receipt for the transaction was sent, or null if no receipt was sent. receipt_number: type: string example: description: The receipt number associated with the transaction, or null if no receipt number is available. receipt_url: type: string example: https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xREl5WTRLNXpSVXpMd2FXKIeipa0GMgbREzVbrVQ6LBZdZFnB8ZFMPXXaJlPrlgymIpkqBm3-pd3x-lnhgqwlKAC3AWrN3kEYGDep description: The URL to view the receipt for the payment, or null if no receipt is available. refunded: type: boolean example: false description: A boolean indicating whether the payment has been refunded. review: type: string example: description: The status of the payment review, or null if no review is in progress. shipping: type: object properties: street: type: string example: N/a description: The street address for shipping. If not applicable, set to 'N/a'. number: type: string example: N/a description: The street number for shipping. If not applicable, set to 'N/a'. suburb: type: string example: N/a description: The suburb or neighborhood for shipping. If not applicable, set to 'N/a'. city: type: object properties: name: type: string example: N/a description: The name of the city for shipping. If not applicable, set to 'N/a'. description: The city information for shipping. state: type: object properties: name: type: string example: N/a description: The name of the state for shipping. If not applicable, set to 'N/a'. country: type: object properties: name: type: string example: N/a description: The name of the country for shipping. If not applicable, set to 'N/a'. description: The country information for shipping. description: The state information for shipping. zip_code: type: string example: N/a description: The ZIP code for shipping. If not applicable, set to 'N/a'. description: Information about the shipping address associated with the transaction. source: type: string example: description: The ID of the payment source. If not applicable or available, set to null. source_transfer: type: string example: description: The ID of the transfer made from the payment source. If not applicable or available, set to null. statement_descriptor: type: string example: description: A custom statement descriptor for the payment. If not applicable or available, set to null. statement_descriptor_suffix: type: string example: description: A custom statement descriptor suffix for the payment. If not applicable or available, set to null. status: type: string example: succeeded description: The status of the payment transaction, e.g., 'succeeded'. transfer_data: type: string example: description: Information about the transfer associated with the payment. If not applicable or available, set to null. transfer_group: type: string example: description: The ID of the transfer group. If not applicable or available, set to null. transaction_status: type: string example: Success description: The status of the transaction, e.g., 'Success'. transaction_id: type: integer example: 11044 description: The unique identifier for the transaction. payment_id: type: integer example: 5744 description: The unique identifier for the payment associated with the transaction. provider: type: string example: stripe description: The payment provider used for the transaction, e.g., 'stripe'. next_action: type: object example: {} description: Details about the next action required for the transaction. If not applicable, an empty object is provided. actions: type: array items: type: object properties: name: type: string example: verify_transaction_status description: The name of the action, e.g., 'verify_transaction_status'. url: type: string example: "/api/v1/stripe/business/89/payments/5744/transactions/11044" description: The URL endpoint for the action. method: type: string example: GET description: The HTTP method for the action, e.g., 'GET'. description: An array of actions associated with the transaction. example: - name: verify_transaction_status url: "/api/v1/stripe/business/89/payments/5744/transactions/11044" method: GET - name: refund_transaction url: "/api/v1/stripe/business/89/payments/ch_3OZyPSK5zRUzLwaW0CyXUIVQ/refunds" method: POST description: An array of actions that can be performed for the transaction, each represented by an object with 'name', 'url', and 'method' properties. "403": description: Forbidden content: application/json: example: detail: Invalid token. tags: - payments "/business/{business}/payments/{transaction_reference}/refunds": post: summary: Create a refund for a transaction. parameters: - in: path name: business description: The unique identifier of the business. required: true schema: type: string - in: path name: transaction_reference description: The unique reference of the transaction to be refunded. required: true schema: type: string requestBody: content: application/json: schema: type: object properties: amount: type: number format: float example: 10.50 description: The monetary value to be refunded. required: - amount responses: "200": description: Refund processed successfully content: application/json: schema: type: array items: type: object properties: id: type: integer description: The unique identifier of the refund transaction. example: 17 provider: type: string description: The payment service provider for the transaction. example: "tonder" country: type: string description: The country associated with the refund. example: "N/A" currency_code: type: string description: The currency code used for the transaction. example: "MXN" created: type: string format: date-time description: The timestamp when the refund was created. example: "2024-06-28T08:15:24.600617-05:00" modified: type: string format: date-time description: The timestamp when the refund was last modified. example: "2024-06-28T08:15:24.600654-05:00" operation_date: type: string format: date-time description: The date and time when the refund operation was performed. example: "2024-06-28T13:15:23-05:00" transaction_reference: type: string description: The reference identifier of the original transaction. example: "16566015" response: type: object description: The response details of the refund operation. properties: card_account: type: object description: Details about the card account used in the transaction. properties: issuing_country_code: type: string description: The country code of the card issuer. example: "IL" masked_pan: type: string description: The masked primary account number (PAN) of the card. example: "458000...0059" customer: type: object description: Customer details associated with the transaction. properties: email: type: string description: The email address of the customer. example: "test@email.com" payment_data: type: object description: Details about the payment data. properties: id: type: string description: The unique identifier of the payment data. example: "16563893" remaining_amount: type: number format: float description: The remaining amount after the refund. example: 40.0 refund_data: type: object description: Details about the refund data. properties: amount: type: number format: float description: The amount refunded. example: 5.0 auth_code: type: string description: The authorization code for the refund. example: "gUuMXr" created: type: string format: date-time description: The timestamp when the refund was created. example: "2024-06-28T13:15:23Z" currency: type: string description: The currency used for the refund. example: "MXN" id: type: string description: The unique identifier of the refund transaction. example: "16566015" is_3d: type: boolean description: Indicates if the refund was processed through 3D Secure. example: false status: type: string description: The status of the refund. example: "COMPLETED" payment_method: type: string description: The payment method used for the refund. example: "BANKCARD" merchant_order: type: object description: Details about the merchant order. properties: description: type: string description: A description of the merchant order. example: "Requested by the client" id: type: string description: The unique identifier of the merchant order. example: "TNDR-76b9de76-eeee-42e9-b4bf-255943831ee9" transaction_type: type: string description: The type of transaction (e.g., REFUND). example: "REFUND" status: type: string description: The status of the transaction. example: "Success" amount: type: string description: The amount refunded. example: "5.0000" related_transaction_reference: type: string description: The reference identifier of the related transaction. example: "16563893" reason: type: string nullable: true description: The reason for the refund, if provided. example: null is_refunded: type: boolean nullable: true description: Indicates if the transaction has been refunded. example: null is_disputed: type: boolean nullable: true description: Indicates if the transaction is disputed. example: null number_of_payment_attempts: type: integer nullable: true description: The number of payment attempts made for the transaction. example: null payment_method_old: type: string nullable: true description: The previous payment method, if applicable. example: null is_card_international: type: boolean description: Indicates if the card used is international. example: false card_brand: type: string nullable: true description: The brand of the card used. example: null number_of_installments: type: integer description: The number of installments for the transaction. example: 1 incoming_request: type: string nullable: true description: Details of the incoming request, if any. example: null metadata: type: string nullable: true description: Additional metadata associated with the transaction. example: null tonder_intra_transaction_rate: type: number format: float nullable: true description: The intra-transaction rate for Tonder. example: null tonder_inter_transaction_rate: type: number format: float nullable: true description: The inter-transaction rate for Tonder. example: null tonder_transaction_fee: type: number format: float nullable: true description: The transaction fee charged by Tonder. example: null is_fees_computed: type: boolean description: Indicates if the fees have been computed. example: false fee_amount: type: number format: float nullable: true description: The fee amount charged. example: null net_amount: type: number format: float nullable: true description: The net amount after fees. example: null rolling_reserve_amount: type: number format: float nullable: true description: The rolling reserve amount, if any. example: null has_balance_transaction: type: boolean description: Indicates if there is a balance transaction. example: false business: type: object description: Details about the business associated with the transaction. properties: id: type: integer description: The unique identifier of the business. example: 97 created: type: string format: date-time description: The timestamp when the business was created. example: "2024-02-13T13:34:54.796510-06:00" modified: type: string format: date-time description: The timestamp when the business was last modified. example: "2024-06-26T19:12:49.988659-05:00" name: type: string description: The name of the business. example: "Demo 7" web: type: string description: The website URL of the business. example: "www.google.com" logo: type: string description: The logo URL of the business. example: "https://zplit-stage.s3.amazonaws.com/media/business_logos/Web_1920__13dsjcejd2x.png" checkout_logo: type: string description: The checkout logo URL of the business. example: "https://zplit-stage.s3.amazonaws.com/media/business_checkout_logos/Web_1920__13dsjcejd2x.png" background_color: type: string description: The background color used by the business. example: "#f2f2f2" primary_color: type: string description: The primary color used by the business. example: "#1c202b" textCheckoutColor: type: string description: The text color used for checkout by the business. example: "#ffffff" textDetailsColor: type: string description: The text color used for details by the business. example: "#1c202b" checkout_mode: type: boolean description: Indicates if the business is in checkout mode. example: false total_annual_sales: type: string description: The total annual sales of the business. example: "L" average_order_sale: type: string description: The average order sale amount of the business. example: "0.00" comission: type: string description: The commission percentage charged by the business. example: "5.00" status: type: string description: The status of the business. example: "A" first_time_filled: type: boolean description: Indicates if the business information was filled for the first time. example: true business_info: type: boolean description: Indicates if the business information is provided. example: false business_legal_representation: type: boolean description: Indicates if the legal representation details of the business are provided. example: false business_bank_details: type: boolean description: Indicates if the bank details of the business are provided. example: false show_presentation_data: type: boolean description: Indicates if the presentation data is shown. example: false enabled_smart_routing: type: boolean description: Indicates if smart routing is enabled for the business. example: true enabled_finances: type: boolean description: Indicates if finances are enabled for the business. example: true risk_level: type: string description: The risk level of the business. example: "Low" timezone: type: string description: The timezone of the business. example: "America/Mexico_City" can_change_tonder_psp: type: boolean description: Indicates if the business can change the Tonder payment service provider (PSP). example: false enabled_orchestration: type: boolean description: Indicates if orchestration is enabled for the business. example: true user: type: integer description: The unique identifier of the user associated with the business. example: 792 e_commerce_platform: type: string nullable: true description: The e-commerce platform used by the business, if any. example: null country: type: integer description: The country ID associated with the business. example: 1 currency: type: integer description: The currency ID associated with the business. example: 5 categories: type: array description: The categories associated with the business. items: type: integer description: The category ID. example: 1 payment: type: object description: Details about the payment. properties: id: type: integer description: The unique identifier of the payment. example: 24943 created: type: string format: date-time description: The timestamp when the payment was created. example: "2024-06-27T18:43:37.519849-05:00" modified: type: string format: date-time description: The timestamp when the payment was last modified. example: "2024-06-27T18:43:38.523950-05:00" amount: type: string description: The amount of the payment. example: "45.0000" status: type: string description: The status of the payment. example: "PENDING" date: type: string format: date-time description: The date of the payment. example: "2024-06-27T18:43:37.519966-05:00" paid_date: type: string format: date-time nullable: true description: The date when the payment was paid, if applicable. example: null source: type: string nullable: true description: The source of the payment. example: null customer_order_reference: type: string description: The customer order reference ID. example: "TNDR-76b9de76-eeee-42e9-b4bf-255943831ee9" client: type: integer description: The unique identifier of the client associated with the payment. example: 846 business: type: integer description: The unique identifier of the business associated with the payment. example: 97 shipping_address: type: string nullable: true description: The shipping address for the payment. example: null billing_address: type: string nullable: true description: The billing address for the payment. example: null order: type: integer description: The order ID associated with the payment. example: 28579 currency: type: object description: Details about the currency used. properties: id: type: integer description: The unique identifier of the currency. example: 5 name: type: string description: The name of the currency. example: "Mexican Peso" code: type: string description: The code of the currency. example: "MXN" symbol: type: string description: The symbol of the currency. example: "$" country: type: string nullable: true description: The country associated with the currency. example: null payment_method: type: string nullable: true description: The payment method used. example: null issuing_country: type: string nullable: true description: The issuing country of the payment method. example: null "/secure-token": post: summary: Generate Secure Token description: Generates a secure token (`secureToken`) for authenticating secure card-saving transactions. operationId: generateSecureToken tags: - Token responses: "200": description: Secure token generated successfully. content: application/json: schema: type: object properties: access: type: string description: The generated secure token. example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzI3NzI3MTM3LCJpYXQiOjE3Mjc3MjM1MzcsImp0aSI6IjFjZTBkZmExODgwNzQzNGI4MDk2MzdlNTliNmM1NWMzIiwidXNlcl9pZCI6NDYxfQ.DFGNJr7JT6z3cp976PDBT57uX7LaYJLYBsdK8kaSAOI "/process/": post: summary: Process Transaction description: | Process both payments and withdrawals through a single API call. This unified endpoint handles all transaction types based on the `operation_type` field. operationId: processTransaction tags: - Direct Integration requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/DirectTransactionRequest" examples: card_payment: summary: Card Payment value: operation_type: "payment" amount: 150.00 currency: "MXN" customer: name: "Ana María Rodríguez" email: "ana.rodriguez@email.com" payment_method: type: "CARD" card_number: "9230-0892-4469-1474" cardholder_name: "c05d89b2-299c-4f93-b49a-42be00d3b64b" cvv: "d31f0da3-0ed3-4ad8-8b68-14c2669a99a7" expiration_month: "e401a32e-4174-424f-9688-727005f6a80e" expiration_year: "bd9ccc23-3d00-4109-9626-fc6581389063" client_reference: "order-789" return_url: "https://mystore.com/payment/return" spei_payment: summary: SPEI Payment value: operation_type: "payment" amount: 500.00 currency: "MXN" customer: name: "Carlos Eduardo López" email: "carlos.lopez@empresa.mx" payment_method: type: "SPEI" client_reference: "invoice-456" withdrawal: summary: SPEI Withdrawal value: operation_type: "withdrawal" amount: 750.00 currency: "MXN" reference: "payout-001" transfer_method: "SPEI" description: "Commission payment" beneficiary: account: "012345678901234567" name: "Roberto Martínez García" rfc: "MAGR850920XY1" institution: "40012" email: "roberto.martinez@email.com" responses: "200": description: Transaction processed successfully content: application/json: schema: $ref: "#/components/schemas/DirectTransactionResponse" "201": description: Transaction created successfully content: application/json: schema: $ref: "#/components/schemas/DirectTransactionResponse" "202": description: Transaction accepted for processing content: application/json: schema: $ref: "#/components/schemas/DirectTransactionResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "402": description: Payment Required content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "429": description: Rate Limited content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "500": description: Server Error content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "/transactions/{transaction_id}/": get: summary: Get Transaction Status description: | Retrieve the current status and details of any transaction (payment or withdrawal). This is essential for monitoring transaction progress, especially for asynchronous payment methods like SPEI transfers and cash payments. operationId: getTransactionStatus tags: - Direct Integration parameters: - name: transaction_id in: path required: true description: The unique transaction identifier returned from the `/process/` endpoint schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" responses: "200": description: Transaction status retrieved successfully content: application/json: schema: $ref: "#/components/schemas/DirectTransactionStatusResponse" examples: payment_success: summary: Successful Payment value: id: "550e8400-e29b-41d4-a716-446655440000" operation_type: "payment" status: "success" amount: 150.00 currency: "MXN" merchant_reference: "order-789" created_at: "2024-07-26T10:30:00Z" updated_at: "2024-07-26T10:32:15Z" completion_details: completed_at: "2024-07-26T10:32:15Z" authorization_code: "AUTH123456" withdrawal_processing: summary: Processing Withdrawal value: id: "550e8400-e29b-41d4-a716-446655440001" operation_type: "withdrawal" status: "processing" amount: 750.00 currency: "MXN" merchant_reference: "payout-001" created_at: "2024-07-26T10:30:00Z" updated_at: "2024-07-26T10:35:22Z" transfer_details: transfer_method: "SPEI" beneficiary_account: "***************4567" estimated_completion: "2024-07-26T18:00:00Z" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "404": description: Transaction Not Found content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "500": description: Server Error content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "/tokenization/auth/": get: summary: Get Tokenization Access Token description: | Obtain an access token required for card tokenization requests. This token should be used immediately. Due to PCI DSS requirements, your company must share relevant attestation documents before Tonder activates production endpoint access. operationId: getTokenizationToken tags: - Direct Integration responses: "200": description: Access token retrieved successfully content: application/json: schema: type: object properties: access_token: type: string description: JWT access token for tokenization service example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "/token": post: summary: Tokenize Card Data description: | Securely tokenize card data using Tonder's vault service. This endpoint converts sensitive card information into individual field tokens that can be safely stored and used for payments. **Authentication**: Requires access token from `/tokenization/auth/` endpoint. operationId: tokenizeCardData tags: - Direct Integration servers: - url: https://token-sandbox.tonder.io/v1/gateway/inboundRoutes/f6eb7af640b041b590a0b2f095a83fa4/token description: Tokenization service (sandbox) security: - TokenizationAuth: [] Authorization: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url https://token-sandbox.tonder.io/v1/gateway/inboundRoutes/f6eb7af640b041b590a0b2f095a83fa4/token \ --header 'Authorization: Token YOUR_API_KEY' \ --header 'X-Skyflow-Authorization: YOUR_SKYFLOW_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "card_number": "4242424242424242", "cardholder_name": "John Doe", "cvv": "123", "expiration_month": "07", "expiration_year": "2025" }' requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TokenizationRequest" example: card_number: "4242424242424242" cardholder_name: "John Doe" cvv: "123" expiration_month: "07" expiration_year: "2025" responses: "200": description: Card data tokenized successfully content: application/json: schema: $ref: "#/components/schemas/TokenizationResponse" example: card_number: "9230-0892-4469-1474" cardholder_name: "c05d89b2-299c-4f93-b49a-42be00d3b64b" cvv: "d31f0da3-0ed3-4ad8-8b68-14c2669a99a7" expiration_month: "e401a32e-4174-424f-9688-727005f6a80e" expiration_year: "bd9ccc23-3d00-4109-9626-fc6581389063" "400": description: Bad Request - Invalid card data content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "401": description: Unauthorized - Invalid or expired access token content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "422": description: Validation Error - Card data validation failed content: application/json: schema: $ref: "#/components/schemas/DirectErrorResponse" "/checkout/v1/business/config": post: summary: Set Business Configuration description: | Sets the default UI configuration (logo and styles) for all your Hosted Checkout sessions. This configuration will be applied to all payment sessions unless overridden at the session level. operationId: setBusinessConfig tags: - Hosted Checkout security: - Authorization: [] requestBody: required: false content: application/json: schema: type: object properties: logo_url: type: string format: uri description: A publicly accessible URL for your business logo example: "https://cdn.my-store.com/logo.png" ui_config: $ref: "#/components/schemas/UIConfig" example: logo_url: "https://cdn.my-store.com/logo.png" ui_config: branding: brand_color: "#1A2B3C" theme: shapes: "rounded" responses: "200": description: Configuration saved successfully content: application/json: schema: type: object properties: logo_url: type: string format: uri ui_config: $ref: "#/components/schemas/UIConfig" example: logo_url: "https://cdn.my-store.com/logo.png" ui_config: branding: brand_color: "#1A2B3C" theme: shapes: "rounded" "/checkout/v1/sessions": post: summary: Create a Payment Session description: | Creates a new Hosted Checkout session. Tonder returns a URL for you to redirect your customer to complete the payment. The session tracks the overall payment state and can handle multiple payment attempts if the first one fails. operationId: createCheckoutSession tags: - Hosted Checkout security: - Authorization: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateSessionRequest" example: customer: first_name: "John" last_name: "Doe" email: "john.doe@example.com" amount_total: 35000 currency: "MXN" line_items: - name: "Product 1" quantity: 1 unit_price: 15000 product_id: "prod-001" - name: "Product 2" quantity: 2 unit_price: 10000 product_id: "prod-002" return_url: "https://my-store.com/checkout/complete" external_id: "ORD-12345" responses: "201": description: Session created successfully content: application/json: schema: $ref: "#/components/schemas/CheckoutSession" example: id: "cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d" url: "https://stage-payflow.tonder.io/checkout/cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d" status: "pending" payment_id: 41521 amount_total: 35000 currency: "MXN" expires_at: 1751564943 external_id: "ORD-12345" session_type: "payment" checkout_type: "hosted" return_url: "https://my-store.com/checkout/complete" metadata: {} payment_method_types: ["card"] ui_config: {} ui_config_version: "V1" created_at: 1751478543567 modified_at: 1751478543567 customer: first_name: "John" last_name: "Doe" email: "john.doe@example.com" line_items: - name: "Product 1" quantity: 1 unit_price: 15000 product_id: "prod-001" transaction_status: "Pending" provider: "tonder" "/checkout/v1/sessions/{id}": get: summary: Get a Session description: | Retrieves the details of a payment session by its ID. This is the recommended way to check the final status of a payment after the customer is redirected back to your site. operationId: getCheckoutSession tags: - Hosted Checkout security: - Authorization: [] parameters: - name: id in: path required: true description: The Session ID (e.g., sess_a1b2c3d4e5f6) schema: type: string example: "sess_a1b2c3d4e5f6" responses: "200": description: Session retrieved successfully content: application/json: schema: $ref: "#/components/schemas/CheckoutSession" example: id: "cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d" url: "https://stage-payflow.tonder.io/checkout/cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d" status: "completed" payment_id: 41521 amount_total: 35000 currency: "MXN" expires_at: 1751564943 external_id: "ORD-12345" session_type: "payment" checkout_type: "hosted" return_url: "https://my-store.com/checkout/complete" metadata: {} payment_method_types: ["card"] ui_config: {} ui_config_version: "V1" created_at: 1751478543567 modified_at: 1751478550234 paid_at: 1751478550234 customer: first_name: "John" last_name: "Doe" email: "john.doe@example.com" line_items: - name: "Product 1" quantity: 1 unit_price: 35000 product_id: "prod-001" transaction_status: "Success" provider: "tonder" "/checkout/v1/payments/{payment_id}": get: summary: Get a Payment Transaction description: | Retrieves the details of a specific payment transaction by its payment_id. This provides more granular information about individual payment attempts. operationId: getPaymentTransaction tags: - Hosted Checkout security: - Authorization: [] parameters: - name: payment_id in: path required: true description: The Payment ID (e.g., pay_x1y2z3a4b5) schema: type: string example: "pay_x1y2z3a4b5" responses: "200": description: Payment transaction retrieved successfully content: application/json: schema: $ref: "#/components/schemas/PaymentTransaction" example: payment_id: "pay_x1y2z3a4b5" session_id: "sess_a1b2c3d4e5f6" status: "Success" amount: 35000 currency: "MXN" payment_method_type: "card" created_at: "2025-10-20T14:30:00Z" card_details: brand: "visa" last4: "4242" customer: name: "John Doe" email: "john.doe@example.com" components: schemas: GeneralError: type: object properties: code: type: integer format: int32 message: type: string # Direct Integration Schemas DirectTransactionRequest: type: object required: - operation_type - amount - customer properties: operation_type: type: string enum: [payment, withdrawal] description: Type of transaction to process amount: type: number format: decimal minimum: 0.01 maximum: 15000000 multipleOf: 0.01 description: Transaction amount currency: type: string default: MXN enum: [MXN, USD] description: Currency code customer: $ref: "#/components/schemas/DirectCustomer" client_reference: type: string maxLength: 255 description: Your reference identifier metadata: type: object additionalProperties: true description: Additional data for your records return_url: type: string format: uri description: URL for redirection after 3DS processing payment_method: $ref: "#/components/schemas/DirectPaymentMethod" transfer_method: type: string enum: [SPEI, DEBIT_CARD] description: Transfer method for withdrawals reference: type: string description: Your withdrawal reference description: type: string maxLength: 500 description: Withdrawal description beneficiary: $ref: "#/components/schemas/DirectBeneficiary" DirectCustomer: type: object required: - name - email properties: name: type: string maxLength: 255 description: Customer full name email: type: string format: email maxLength: 320 description: Customer email address DirectPaymentMethod: type: object required: - type properties: type: type: string enum: [CARD, SPEI, OXXO, mercadopago, SAFETYPAY] description: Payment method type token: type: string description: Tokenized card ID (for card payments) card_number: type: string description: Card number (if not using token) cardholder_name: type: string description: Cardholder name (for raw card data) cvv: type: string description: Security code (for raw card data) expiration_month: type: string description: Expiration month (for raw card data) expiration_year: type: string description: Expiration year (for raw card data) DirectBeneficiary: type: object required: - account - name - rfc - institution - email properties: account: type: string pattern: "^[0-9]{18}$" description: Account number or CLABE (18 digits) name: type: string description: Beneficiary full name rfc: type: string pattern: '^[A-Z&Ñ]{3,4}\\d{6}[A-Z\\d]{3}$' description: Mexican tax ID (RFC) institution: type: string description: Bank institution code email: type: string format: email description: Beneficiary email DirectTransactionResponse: type: object properties: id: type: string format: uuid description: Unique transaction identifier operation_type: type: string enum: [payment, withdrawal] description: Type of transaction status: type: string enum: [ pending, on_hold, processing, sent_to_provider, success, paid_full, in_transit, authorized, canceled, declined, rejected, failed, Unknown, expired, ] description: Current transaction status amount: type: number format: decimal description: Transaction amount currency: type: string description: Currency code client_reference: type: string description: Your reference identifier payment_id: type: integer description: Payment ID (for payments) transaction_id: type: string description: Provider transaction ID provider: type: string description: Payment provider used created_at: type: string format: date-time description: ISO 8601 timestamp of creation status_code: type: integer description: HTTP status code next_action: $ref: "#/components/schemas/DirectNextAction" payment_instructions: $ref: "#/components/schemas/DirectPaymentInstructions" DirectTransactionStatusResponse: allOf: - $ref: "#/components/schemas/DirectTransactionResponse" - type: object properties: updated_at: type: string format: date-time description: ISO 8601 timestamp of last update completion_details: $ref: "#/components/schemas/DirectCompletionDetails" transfer_details: $ref: "#/components/schemas/DirectTransferDetails" DirectNextAction: type: object properties: redirect_to_url: type: object properties: url: type: string format: uri description: URL to redirect customer for 3DS authentication return_url: type: string format: uri description: URL to return after 3DS completion verify_transaction_status_url: type: string description: URL to check transaction status after 3DS DirectPaymentInstructions: type: object properties: reference: type: string description: Payment reference code account_number: type: string description: Account number for transfer bank_name: type: string description: Bank name amount: type: number format: decimal description: Amount to pay expires_at: type: string format: date-time description: Payment expiration time reference_code: type: string description: Reference code for cash payments barcode: type: string description: Barcode for cash payments store_name: type: string description: Store name for cash payments expiration_date: type: string format: date-time description: Payment expiration date instructions: type: array items: type: string description: Payment instructions voucher_pdf: type: string format: uri description: URL to payment voucher PDF DirectCompletionDetails: type: object properties: completed_at: type: string format: date-time description: Completion timestamp authorization_code: type: string description: Authorization code DirectTransferDetails: type: object properties: transfer_method: type: string enum: [SPEI, DEBIT_CARD] description: Transfer method used beneficiary_account: type: string description: Masked beneficiary account estimated_completion: type: string format: date-time description: Estimated completion time DirectErrorResponse: type: object required: - error properties: error: type: object required: - code - message - type properties: code: type: string description: A specific, machine-readable code for the error message: type: string description: A human-readable message explaining the error type: type: string enum: [request_error, auth_error, validation_error, server_error] description: The category of the error details: type: object additionalProperties: true description: Additional context about the error request_id: type: string description: A unique identifier for the request # Tokenization Schemas TokenizationRequest: type: object required: - card_number - cardholder_name - cvv - expiration_month - expiration_year properties: card_number: type: string pattern: "^[0-9]{13,19}$" description: The full card number (13-19 digits) example: "4242424242424242" cardholder_name: type: string maxLength: 255 description: The name as it appears on the card example: "John Doe" cvv: type: string pattern: "^[0-9]{3,4}$" description: Card security code (3-4 digits) example: "123" expiration_month: type: string pattern: "^(0[1-9]|1[0-2])$" description: Card expiration month (MM format) example: "07" expiration_year: type: string pattern: "^[0-9]{4}$" description: Card expiration year (YYYY format) example: "2025" TokenizationResponse: type: object properties: card_number: type: string description: Token representing the card number example: "9230-0892-4469-1474" cardholder_name: type: string description: Token representing the cardholder name example: "c05d89b2-299c-4f93-b49a-42be00d3b64b" cvv: type: string description: Token representing the CVV example: "d31f0da3-0ed3-4ad8-8b68-14c2669a99a7" expiration_month: type: string description: Token representing the expiration month example: "e401a32e-4174-424f-9688-727005f6a80e" expiration_year: type: string description: Token representing the expiration year example: "bd9ccc23-3d00-4109-9626-fc6581389063" UIConfig: type: object description: UI configuration for Hosted Checkout customization properties: branding: type: object properties: brand_color: type: string pattern: "^#[0-9A-Fa-f]{6}$" description: Primary brand color (hex code) example: "#1A2B3C" theme: type: object properties: shapes: type: string enum: [rounded, square] description: Shape style for UI elements example: "rounded" CreateSessionRequest: type: object required: - customer - amount_total - currency - line_items properties: customer: type: object required: - first_name - last_name - email properties: first_name: type: string description: Customer's first name example: "John" last_name: type: string description: Customer's last name example: "Doe" email: type: string format: email description: Customer's email address example: "john.doe@example.com" amount_total: type: number description: Total charge amount example: 35000 currency: type: string description: Currency code enum: ["MXN"] example: "MXN" line_items: type: array description: List of order items items: type: object required: - name - quantity - unit_price properties: name: type: string description: Name or title of the product or service being purchased example: "Product 1" quantity: type: number description: Quantity of the item to be purchased (must be >= 1) example: 1 unit_price: type: number description: Unit price of the item example: 15000 product_id: type: string description: Optional product identifier used by the merchant's internal system example: "prod-12345" external_id: type: string description: Unique order reference from the merchant. Used to visually identify/filter the order in dashboard example: "ORD-12345" expires_at: type: integer description: Unix timestamp (seconds). Must be 30 min to 24h in future. Default 24h example: 1751063448 metadata: type: object description: Additional metadata additionalProperties: true success_url: type: string format: uri description: Redirect after successful payment example: "https://my-store.com/order/success" return_url: type: string format: uri description: Required if success_url is not set. If specified, used as fallback for all redirects example: "https://my-store.com/checkout/complete" pending_url: type: string format: uri description: Redirect if payment is under review. Only applicable for future APM support payment_method_types: type: array description: Defaults to ["card"]. Currently only card is supported items: type: string enum: ["card"] example: ["card"] checkout_type: type: string description: Defaults to "hosted" enum: ["hosted"] example: "hosted" session_type: type: string description: Defaults to "payment" enum: ["payment"] example: "payment" ui_config_version: type: string description: Version of the UI config. Defaults to "V1" example: "V1" ui_config: $ref: "#/components/schemas/UIConfig" CheckoutSession: type: object properties: id: type: string description: Unique session identifier example: "cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d" url: type: string format: uri description: Redirect your customer to this URL to begin the payment example: "https://stage-payflow.tonder.io/checkout/cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d" status: type: string enum: [pending, completed, expired] description: Session status example: "pending" payment_id: type: number description: Associated payment ID example: 41521 amount_total: type: number description: Total amount to be charged example: 35000 currency: type: string description: Currency used example: "MXN" expires_at: type: integer description: Expiration time (Unix timestamp in seconds) example: 1751564943 external_id: type: string description: Order reference from the merchant example: "ORD-12345" session_type: type: string description: Type of session example: "payment" checkout_type: type: string description: Checkout method example: "hosted" success_url: type: string format: uri nullable: true description: Success redirect URL return_url: type: string format: uri description: Return/fallback redirect URL pending_url: type: string format: uri nullable: true description: Pending redirect URL metadata: type: object description: Custom data sent by the merchant payment_method_types: type: array items: type: string description: Allowed payment methods example: ["card"] ui_config: type: object description: UI configuration applied ui_config_version: type: string description: Version of UI config example: "V1" created_at: type: integer description: Creation timestamp in milliseconds example: 1751478543567 modified_at: type: integer description: Last modification timestamp in milliseconds example: 1751478543567 paid_at: type: integer nullable: true description: Payment completion timestamp in milliseconds customer: type: object properties: first_name: type: string example: "John" last_name: type: string example: "Doe" email: type: string example: "john.doe@example.com" line_items: type: array items: type: object properties: name: type: string quantity: type: number unit_price: type: number product_id: type: string transaction_status: type: string enum: [Pending, Success, Declined, Expired] description: Result of transaction example: "Pending" provider: type: string description: Gateway used example: "tonder" PaymentTransaction: type: object properties: payment_id: type: string description: Unique payment transaction identifier example: "pay_x1y2z3a4b5" session_id: type: string description: Associated session ID example: "sess_a1b2c3d4e5f6" status: type: string description: Transaction status example: "Success" amount: type: integer description: Payment amount in smallest currency unit example: 35000 currency: type: string description: 3-letter ISO currency code example: "MXN" payment_method_type: type: string description: Type of payment method used example: "card" created_at: type: string format: date-time description: Transaction creation timestamp example: "2025-10-20T14:30:00Z" card_details: type: object properties: brand: type: string example: "visa" last4: type: string example: "4242" customer: type: object properties: name: type: string example: "John Doe" email: type: string example: "john.doe@example.com" parameters: skipParam: name: skip in: query description: number of items to skip required: true schema: type: integer format: int32 responses: GeneralError: description: General Error content: application/json: schema: "$ref": "#/components/schemas/GeneralError" securitySchemes: Authorization: type: apiKey name: Authorization in: header TokenizationAuth: type: apiKey name: X-Skyflow-Authorization in: header description: Access token from /tokenization/auth/ endpoint