Two · Schema

OrderResponseSchema

CompanyB2B PaymentsFinTechAPI PlatformCheckoutTrade Accounts

Properties

Name Type Description
id object A globally unique ID set by Two.
order_placed_date string Date the order was placed (UTC)
gross_amount string net_amount + tax_amount
payable_amount object invoice_amount - prepaid_amount
invoice_amount object total of invoice
prepaid_amount object amount paid upfront
net_amount string (quantity * unit_price) - discount_amount
currency object Currency code in ISO 4217 format. E.g. 'NOK'
discount_amount string Deprecated, discount amount is only applicable at line item level
discount_rate string Deprecated, discount rate is only applicable at line item level
tax_amount string net_amount * tax_rate
invoice_type object FUNDED_INVOICE: Two will handle the invoice and transfer the funds to the merchant as per the factoring agreement. The invoice_details field will be populated by Two. DIRECT_INVOICE: Two generates and
order_type object Type of order (Buyer or Merchant initiated)
sale_country_code object Optional sale country code (ISO 3166 Alpha-2) to use for this order, if null defaults to buyer country code.
merchant_payout_account_alias object Optional payee account alias account identifier for multiple accounts setup.
percentage_fee object Percentage fee
fixed_fee object Fixed fee
total_fee object Total fee
state object Current Order State
status object Order approval status
recurring object If set to true, an invoice will be generated periodically according to the specification provided in recurring_details
buyer object Fields representing the buyer
buyer_department object Department the purchase is to be registered on
buyer_project object Project the purchase is to be registered on
buyer_purchase_order_number object Purchase order number to attribute to the order
buyer_reference object General buyer reference field for information that is not covered by the specific reference fields, e.g. PO-number. Note: Maximum 140 characters
buyer_vat_number object Vat number associated with the buyer company
electronic_invoice_recipient object Electronic invoice recipient
line_items array List of the line items that constitute the order
merchant_order_id string Your order ID registered in your solution
merchant_reference object Field set by merchant for adding a reference to be used internally by the merchant. Does not appear on invoice.
merchant_user_id object Your internal ID of the user (the employee of your business customer) registered for one-click purchase through the Two Trade Account Onboarding API.
billing_account_id object ID for the billing account linked to this order. Can be set on order creation or order edit while the order is still editable. A null value means no billing account is linked. When set, billing accoun
date_created object Order creation date (UTC)
date_updated object Order update date (UTC)
merchant_additional_info object Additional info the merchant can connect to the order
recurring_details object Currently not available
invoice_details object Invoice details are provided by the merchant via Merchant Portal when invoice_type is DIRECT_INVOICE, Two Bank or a 3rd-party bank when invoice_type is FUNDED_INVOICE and empty when invoice_type is CA
merchant_id string A globally unique merchant ID set by Two.
merchant_short_name object The short form name of the merchant
merchant_logo_path object The logo URL of the merchant
merchant_urls object List of urls hosted by the merchant.
payment_url object 'Redirect the user to Two hosted page to verify the payment.
invoice_url object Link to the invoice pdf. E.g.
credit_note_url object Link to the credit note pdf
event_log_url object This url returns a list of all events that are associated with the order
shipping_details object Optional shipping details to track the shipment
original_order_id object The original order id has been deprecated in favor of root_order_id, please use root_order_id instead
root_order_id object The root order id
parent_order_id object The parent order id
external_order_id object Your external order id
external_order_status object Your external order status
decline_reason object Reason for order being declined
recourse_decision_reason object Reason for recourse decision
order_note object General note/message from the buyer to the merchant
order_origination object IN_STORE orders are not enabled by default. Please reach out to us if you would like to discuss IN_STORE orders.
billing_address object Order billing address
shipping_address object Order shipping address
date_fulfilled object Date when the order was fulfilled (UTC)
tracking_id object The tracking_id from `POST /order_intent`
vendor_id object The id of the vendor
refunds object Refunds attached to this order
order_revision object Order revision
vendor_name object The name of the vendor
elapsed_time_ms object
invoice_insurance_provider object The insurance provider
tax_subtotals object List of tax subtotals for unique tax brackets
approved_on_recourse object
recourse_fallback_enabled object
merchant_display_name object The display name of the merchant
terms object The terms of this order
lending_terms object The lending terms of this order associated with a credit line
credit_line_id object ID of the credit line used to fund the order, created through the Two Credit Line API.
invoice_distributed_by_merchant object If set to true, the invoice is distributed by the merchant
principal_amount object Total principal amount to be paid back for this order
buyer_finance_charge_amount object Total amount of interest/fees the buyer will pay back by fully paying off this order
preferred_distribution_method object Allows merchant to set the method of distribution for the invoice and credit notes of the order, if not set will default to all methods
View JSON Schema on GitHub

JSON Schema

two-order-response-schema-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/two/json-schema/two-order-response-schema-schema.json",
  "title": "OrderResponseSchema",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/two-openapi.yaml#/components/schemas/OrderResponseSchema",
  "properties": {
    "id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "A globally unique ID set by Two.",
      "title": "Id"
    },
    "order_placed_date": {
      "description": "Date the order was placed (UTC)",
      "format": "date-time",
      "title": "Order Placed Date",
      "type": "string"
    },
    "gross_amount": {
      "description": "net_amount + tax_amount",
      "format": "decimal",
      "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
      "title": "Gross Amount",
      "type": "string"
    },
    "payable_amount": {
      "anyOf": [
        {
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "invoice_amount - prepaid_amount",
      "title": "Payable Amount"
    },
    "invoice_amount": {
      "anyOf": [
        {
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "total of invoice",
      "title": "Invoice Amount"
    },
    "prepaid_amount": {
      "anyOf": [
        {
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "amount paid upfront",
      "title": "Prepaid Amount"
    },
    "net_amount": {
      "description": "(quantity * unit_price) - discount_amount",
      "format": "decimal",
      "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
      "title": "Net Amount",
      "type": "string"
    },
    "currency": {
      "$ref": "#/$defs/CurrencyEnum",
      "description": "Currency code in ISO 4217 format. E.g. 'NOK'"
    },
    "discount_amount": {
      "deprecated": true,
      "description": "Deprecated, discount amount is only applicable at line item level",
      "format": "decimal",
      "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
      "title": "Discount Amount",
      "type": "string"
    },
    "discount_rate": {
      "deprecated": true,
      "description": "Deprecated, discount rate is only applicable at line item level",
      "format": "decimal",
      "pattern": "^-?[0-9]+(\\.[0-9]{0,6})?",
      "title": "Discount Rate",
      "type": "string"
    },
    "tax_amount": {
      "description": "net_amount * tax_rate",
      "format": "decimal",
      "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
      "title": "Tax Amount",
      "type": "string"
    },
    "invoice_type": {
      "$ref": "#/$defs/InvoiceTypeEnum",
      "description": "FUNDED_INVOICE: Two will handle the invoice and transfer the funds to the merchant as per the factoring agreement. The invoice_details field will be populated by Two. DIRECT_INVOICE: Two generates and sends the invoice to the customer based on the bank account provided by the merchant, but the merchant takes the full credit and fraud risk on direct invoices and they will not receive a payout."
    },
    "order_type": {
      "$ref": "#/$defs/OrderTypeEnum",
      "description": "Type of order (Buyer or Merchant initiated)"
    },
    "sale_country_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional sale country code (ISO 3166 Alpha-2) to use for this order, if null defaults to buyer country code.",
      "title": "Sale Country Code"
    },
    "merchant_payout_account_alias": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional payee account alias account identifier for multiple accounts setup.",
      "title": "Merchant Payout Account Alias"
    },
    "percentage_fee": {
      "anyOf": [
        {
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,6})?",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Percentage fee",
      "title": "Percentage Fee"
    },
    "fixed_fee": {
      "anyOf": [
        {
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Fixed fee",
      "title": "Fixed Fee"
    },
    "total_fee": {
      "anyOf": [
        {
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Total fee",
      "title": "Total Fee"
    },
    "state": {
      "anyOf": [
        {
          "$ref": "#/$defs/OrderStateEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Current Order State"
    },
    "status": {
      "anyOf": [
        {
          "$ref": "#/$defs/OrderStatusEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Order approval status"
    },
    "recurring": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "If set to true, an invoice will be generated periodically according to the specification provided in recurring_details",
      "title": "Recurring"
    },
    "buyer": {
      "$ref": "#/$defs/LaxBuyerSchema",
      "description": "Fields representing the buyer"
    },
    "buyer_department": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Department the purchase is to be registered on",
      "title": "Buyer Department"
    },
    "buyer_project": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Project the purchase is to be registered on",
      "title": "Buyer Project"
    },
    "buyer_purchase_order_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Purchase order number to attribute to the order",
      "title": "Buyer Purchase Order Number"
    },
    "buyer_reference": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "General buyer reference field for information that is not covered by the specific reference fields, e.g. PO-number. Note: Maximum 140 characters",
      "title": "Buyer Reference"
    },
    "buyer_vat_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vat number associated with the buyer company",
      "title": "Buyer Vat Number"
    },
    "electronic_invoice_recipient": {
      "anyOf": [
        {
          "$ref": "#/$defs/ElectronicInvoiceRecipient"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Electronic invoice recipient"
    },
    "line_items": {
      "description": "List of the line items that constitute the order",
      "items": {
        "$ref": "#/$defs/LineItemResponseSchema"
      },
      "title": "Line Items",
      "type": "array"
    },
    "merchant_order_id": {
      "description": "Your order ID registered in your solution",
      "title": "Merchant Order Id",
      "type": "string"
    },
    "merchant_reference": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Field set by merchant for adding a reference to be used internally by the merchant. Does not appear on invoice.",
      "title": "Merchant Reference"
    },
    "merchant_user_id": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Your internal ID of the user (the employee of your business customer) registered for one-click purchase through the Two Trade Account Onboarding API.",
      "title": "Merchant User Id"
    },
    "billing_account_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "ID for the billing account linked to this order. Can be set on order creation or order edit while the order is still editable. A null value means no billing account is linked. When set, billing account payment terms control repayment scheduling.",
      "title": "Billing Account Id"
    },
    "date_created": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Order creation date (UTC)",
      "title": "Date Created"
    },
    "date_updated": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Order update date (UTC)",
      "title": "Date Updated"
    },
    "merchant_additional_info": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Additional info the merchant can connect to the order",
      "title": "Merchant Additional Info"
    },
    "recurring_details": {
      "anyOf": [
        {
          "$ref": "#/$defs/RecurringDetailsSchema"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Currently not available"
    },
    "invoice_details": {
      "anyOf": [
        {
          "$ref": "#/$defs/InvoiceDetailsSchema"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Invoice details are provided by the merchant via Merchant Portal when invoice_type is DIRECT_INVOICE, Two Bank or a 3rd-party bank when invoice_type is FUNDED_INVOICE and empty when invoice_type is CARD."
    },
    "merchant_id": {
      "description": "A globally unique merchant ID set by Two.",
      "format": "uuid",
      "title": "Merchant Id",
      "type": "string"
    },
    "merchant_short_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The short form name of the merchant",
      "title": "Merchant Short Name"
    },
    "merchant_logo_path": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The logo URL of the merchant",
      "title": "Merchant Logo Path"
    },
    "merchant_urls": {
      "anyOf": [
        {
          "$ref": "#/$defs/OrderMerchantUrlsSchema"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "List of urls hosted by the merchant."
    },
    "payment_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "'Redirect the user to Two hosted page to verify the payment.",
      "title": "Payment Url"
    },
    "invoice_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Link to the invoice pdf. E.g.",
      "title": "Invoice Url"
    },
    "credit_note_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Link to the credit note pdf",
      "title": "Credit Note Url"
    },
    "event_log_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "This url returns a list of all events that are associated with the order",
      "title": "Event Log Url"
    },
    "shipping_details": {
      "anyOf": [
        {
          "$ref": "#/$defs/ShippingDetailsSchema"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional shipping details to track the shipment"
    },
    "original_order_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "deprecated": true,
      "description": "The original order id has been deprecated in favor of root_order_id, please use root_order_id instead",
      "title": "Original Order Id"
    },
    "root_order_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The root order id",
      "title": "Root Order Id"
    },
    "parent_order_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The parent order id",
      "title": "Parent Order Id"
    },
    "external_order_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Your external order id",
      "title": "External Order Id"
    },
    "external_order_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Your external order status",
      "title": "External Order Status"
    },
    "decline_reason": {
      "anyOf": [
        {
          "$ref": "#/$defs/DeclineReasonEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Reason for order being declined"
    },
    "recourse_decision_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Reason for recourse decision",
      "title": "Recourse Decision Reason"
    },
    "order_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "General note/message from the buyer to the merchant",
      "title": "Order Note"
    },
    "order_origination": {
      "anyOf": [
        {
          "$ref": "#/$defs/OrderOriginationEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "IN_STORE orders are not enabled by default. Please reach out to us if you would like to discuss IN_STORE orders."
    },
    "billing_address": {
      "$ref": "#/$defs/AddressResponseSchema",
      "description": "Order billing address"
    },
    "shipping_address": {
      "$ref": "#/$defs/AddressResponseSchema",
      "description": "Order shipping address"
    },
    "date_fulfilled": {
      "anyOf": [
        {
          "format": "date",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Date when the order was fulfilled (UTC)",
      "title": "Date Fulfilled"
    },
    "tracking_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The tracking_id from `POST /order_intent` ",
      "title": "Tracking Id"
    },
    "vendor_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The id of the vendor",
      "title": "Vendor Id"
    },
    "refunds": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CreateRefundResponseSchema"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Refunds attached to this order",
      "title": "Refunds"
    },
    "order_revision": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Order revision",
      "title": "Order Revision"
    },
    "vendor_name": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The name of the vendor",
      "title": "Vendor Name"
    },
    "elapsed_time_ms": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Elapsed Time Ms"
    },
    "invoice_insurance_provider": {
      "anyOf": [
        {
          "$ref": "#/$defs/InvoiceInsuranceDecisionEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The insurance provider"
    },
    "tax_subtotals": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TaxSubtotalSchema"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "List of tax subtotals for unique tax brackets",
      "title": "Tax Subtotals"
    },
    "approved_on_recourse": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Approved On Recourse"
    },
    "recourse_fallback_enabled": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": "Deprecated. Use approved_on_recourse.",
      "deprecated": true,
      "title": "Recourse Fallback Enabled"
    },
    "merchant_display_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The display name of the merchant",
      "title": "Merchant Display Name"
    },
    "terms": {
      "anyOf": [
        {
          "description": "For backwards compatibility, `type` can be omitted for instalment terms, if the fields period and number_of_instalments are populated. It is recommended that that clients always provide a type value.",
          "oneOf": [
            {
              "$ref": "#/$defs/OrderInstalmentTerms"
            },
            {
              "$ref": "#/$defs/OrderNetTerms"
            }
          ]
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The terms of this order",
      "title": "Terms"
    },
    "lending_terms": {
      "anyOf": [
        {
          "$ref": "#/$defs/OrderLendingTermsSchema"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The lending terms of this order associated with a credit line"
    },
    "credit_line_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "ID of the credit line used to fund the order, created through the Two Credit Line API.",
      "title": "Credit Line Id"
    },
    "invoice_distributed_by_merchant": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "If set to true, the invoice is distributed by the merchant",
      "title": "Invoice Distributed By Merchant"
    },
    "principal_amount": {
      "anyOf": [
        {
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Total principal amount to be paid back for this order",
      "title": "Principal Amount"
    },
    "buyer_finance_charge_amount": {
      "anyOf": [
        {
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Total amount of interest/fees the buyer will pay back by fully paying off this order",
      "title": "Buyer Finance Charge Amount"
    },
    "preferred_distribution_method": {
      "anyOf": [
        {
          "$ref": "#/$defs/DistributionMethodEnum"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Allows merchant to set the method of distribution for the invoice and credit notes of the order, if not set will default to all methods"
    }
  },
  "required": [
    "order_placed_date",
    "gross_amount",
    "payable_amount",
    "invoice_amount",
    "prepaid_amount",
    "net_amount",
    "currency",
    "discount_amount",
    "discount_rate",
    "tax_amount",
    "invoice_type",
    "order_type",
    "buyer",
    "line_items",
    "merchant_order_id",
    "merchant_id",
    "billing_address",
    "shipping_address"
  ],
  "type": "object",
  "$defs": {
    "AddressResponseSchema": {
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "organization_name": {
          "title": "Organization Name",
          "type": "string"
        },
        "street_address": {
          "title": "Street Address",
          "type": "string"
        },
        "postal_code": {
          "title": "Postal Code",
          "type": "string"
        },
        "city": {
          "title": "City",
          "type": "string"
        },
        "region": {
          "title": "Region",
          "type": "string"
        },
        "country": {
          "$ref": "#/$defs/CountryCodeEnum"
        },
        "preferred": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Preferred"
        }
      },
      "required": [
        "id",
        "organization_name",
        "street_address",
        "postal_code",
        "city",
        "region",
        "country"
      ],
      "title": "AddressResponseSchema",
      "type": "object"
    },
    "BankAccountSchema": {
      "properties": {
        "id": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "bban": {
          "anyOf": [
            {
              "maxLength": 30,
              "minLength": 7,
              "pattern": "^[0-9A-Za-z]*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Bban"
        },
        "iban": {
          "anyOf": [
            {
              "maxLength": 34,
              "minLength": 15,
              "pattern": "^[0-9A-Za-z]*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Iban"
        },
        "bic": {
          "anyOf": [
            {
              "maxLength": 12,
              "minLength": 8,
              "pattern": "^[0-9A-Za-z]*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Bic"
        },
        "country_code": {
          "anyOf": [
            {
              "$ref": "#/$defs/CountryCodeEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "branch_sort_code": {
          "anyOf": [
            {
              "maxLength": 9,
              "pattern": "^[0-9]*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Branch Sort Code"
        },
        "local_account_number": {
          "anyOf": [
            {
              "maxLength": 12,
              "minLength": 8,
              "pattern": "^[0-9]*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Local Account Number"
        },
        "organization_name": {
          "anyOf": [
            {
              "maxLength": 140,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Organization Name"
        },
        "organization_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Organization Number"
        },
        "description": {
          "anyOf": [
            {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "kid_type": {
          "anyOf": [
            {
              "$ref": "#/$defs/KidTypeEnum"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "title": "BankAccountSchema",
      "type": "object"
    },
    "BarCodeSchema": {
      "properties": {
        "value": {
          "description": "The identifier as a string",
          "title": "Value",
          "type": "string"
        },
        "type": {
          "description": "Type of the identifier. Can be either \"SKU\" or a Global Trade Item Number (GTIN) type like \"UPC\", \"EAN\", \"GS1\".",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "value",
        "type"
      ],
      "title": "BarCodeSchema",
      "type": "object"
    },
    "BuyerRefundSurcharge": {
      "properties": {
        "surcharge_type": {
          "$ref": "#/$defs/BuyerSurchargeType",
          "description": "Type of surcharge"
        },
        "amount": {
          "description": "Amount of the surcharge, excluding VAT/tax. Must be greater than zero.",
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "title": "Amount",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Human readable text included in the credit note",
          "title": "Description"
        },
        "tax_rate": {
          "anyOf": [
            {
              "format": "decimal",
              "pattern": "^-?[0-9]+(\\.[0-9]{0,6})?",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": "0.00",
          "description": "Tax rate of the surcharge if applicable.",
          "title": "Tax Rate"
        }
      },
      "required": [
        "surcharge_type",
        "amount"
      ],
      "title": "BuyerRefundSurcharge",
      "type": "object"
    },
    "BuyerSurchargeType": {
      "enum": [
        "return_fee",
        "neglected_order_fee",
        "handling_fee",
        "processing_fee",
        "missing_or_damaged_items_fee",
        "return_shipping_fee",
        "discount_reversal_fee",
        "other_fee"
      ],
      "title": "BuyerSurchargeType",
      "type": "string"
    },
    "CallbackAuthTypeEnum": {
      "enum": [
        "BEARER"
      ],
      "title": "CallbackAuthTypeEnum",
      "type": "string"
    },
    "CountryCodeEnum": {
      "enum": [
        "AD",
        "AE",
        "AL",
        "AM",
        "AO",
        "AR",
        "AT",
        "AU",
        "AZ",
        "BA",
        "BB",
        "BD",
        "BE",
        "BF",
        "BG",
        "BH",
        "BI",
        "BJ",
        "BN",
        "BO",
        "BR",
        "BS",
        "BW",
        "CA",
        "CG",
        "CH",
        "CL",
        "CM",
        "CO",
        "CR",
        "CY",
        "CZ",
        "DE",
        "DJ",
        "DK",
        "DO",
        "DZ",
        "EC",
        "EE",
        "EG",
        "ES",
        "ET",
        "FI",
        "FJ",
        "FR",
        "GA",
        "GB",
        "GE",
        "GH",
        "GN",
        "GQ",
        "GR",
        "GT",
        "GY",
        "HN",
        "HR",
        "HT",
        "HU",
        "ID",
        "IE",
        "IL",
        "IN",
        "IQ",
        "IS",
        "IT",
        "JM",
        "JO",
        "JP",
        "KE",
        "KG",
        "KH",
        "KR",
        "KW",
        "KZ",
        "LA",
        "LB",
        "LI",
        "LK",
        "LT",
        "LU",
        "LV",
        "LR",
        "MA",
        "MC",
        "MD",
        "ME",
        "MG",
        "MK",
        "MN",
        "MR",
        "MT",
        "MU",
        "MV",
        "MW",
        "MX",
        "MY",
        "MZ",
        "NA",
        "NE",
        "NG",
        "NL",
        "NO",
        "NP",
        "NZ",
        "OM",
        "PA",
        "PE",
        "PG",
        "PH",
        "PK",
        "PL",
        "PT",
        "PY",
        "QA",
        "RO",
        "RS",
        "RW",
        "SA",
        "SE",
        "SG",
        "SI",
        "SK",
        "SL",
        "SN",
        "SR",
        "SV",
        "SZ",
        "TD",
        "TG",
        "TH",
        "TJ",
        "TM",
        "TN",
        "TR",
        "TT",
        "TZ",
        "UA",
        "UG",
        "US",
        "UY",
        "UZ",
        "VN",
        "ZA",
        "ZM"
      ],
      "title": "CountryCodeEnum",
      "type": "string"
    },
    "CreateRefundResponseSchema": {
      "additionalProperties": true,
      "properties": {
        "id": {
          "description": "A globally unique ID set by Two.",
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "amount": {
          "deprecated": true,
          "description": "payable amount being refunded",
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "title": "Amount",
          "type": "string"
        },
        "total_amount": {
          "description": "payable_amount + prepaid_amount",
          "format": "decimal",
          "pattern": "^-?[0-9]+(\\.[0-9]{0,2})?",
          "title": "Total Amount",
          "type": "string"
        },
        "payable_amount": {
          "description": "Amount due from the buyer to Two. Formula: invoice_amount - prepaid_amount. This is the 

# --- truncated at 32 KB (70 KB total) ---
# Full source: https://artifacts.apis.io/two/json-schema/two-order-response-schema-schema.json

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/two-order-response-schema"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.