{
  "swagger": "2.0",
  "info": {
    "version": "v2",
    "title": "Payment API V2"
  },
  "host": "api.mypay.gr",
  "schemes": [
    "https"
  ],
  "paths": {
    "/v2/BillingAddonUsage/GetAll": {
      "post": {
        "tags": [
          "BillingAddonUsage"
        ],
        "summary": "Retrieves all billing addon notifications",
        "description": "- Goods/Service\r\n \r\n<a href=\"maomao_json\">\r{\r  \"addonCode\": \"BILLING_ADDON_CODE\",\r  \"billableAddonNotificationType\": \"Transaction\",\r  \"transactionCode\": \"TRANSACTION_CODE\"\r}\r</a>\r\n\r\n\r\n- Subscription\r\n \r\n<a href=\"maomao_json\">\r{\r  \"addonCode\": \"BILLING_ADDON_CODE\",\r  \"billableAddonNotificationType\": \"Subscription\",\r  \"transactionCode\": \"SUBSCRIPTION_CODE\"\r}\r</a>\r\n",
        "operationId": "BillingAddonUsage_GetAll",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "billingAddon",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingAddonDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BillableAddonNotificationDTO"
              }
            }
          }
        }
      }
    },
    "/v2/BillingAddonUsage/GetPending": {
      "post": {
        "tags": [
          "BillingAddonUsage"
        ],
        "summary": "Retrieves pending (not yet billed) billing addon notifications",
        "description": " \r\n<a href=\"maomao_json\">\r{\r  \"addonCode\": \"BILLING_ADDON_CODE\",\r  \"billableAddonNotificationType\": \"Transaction\",\r  \"transactionCode\": \"TRANSACTION_CODE\"\r}\r            </a>\r\n            ",
        "operationId": "BillingAddonUsage_GetPending",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "billingAddon",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingAddonDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BillableAddonNotificationDTO"
              }
            }
          }
        }
      }
    },
    "/v2/BillingAddonUsage/UpdateUsage": {
      "put": {
        "tags": [
          "BillingAddonUsage"
        ],
        "summary": "Updates the good's/subscription's billing addon's usage",
        "description": " \r\n<a href=\"maomao_json\">\r{\r  \"addonCode\": \"BILLING_ADDON_CODE\",\r  \"usage\": 50,\r  \"billableAddonNotificationType\": \"Transaction\",\r  \"transactionCode\": \"TRANSACTION_CODE\"\r}\r            </a>\r\n            ",
        "operationId": "BillingAddonUsage_UpdateUsage",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "updateBillingAddon",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingAddonDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "format": "double",
              "type": "number"
            }
          }
        }
      }
    },
    "/v2/Charge": {
      "get": {
        "tags": [
          "Charge"
        ],
        "operationId": "Charge_GetRandomIpAddress",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Charge"
        ],
        "summary": "Charges a customer with a specific amount",
        "description": "1. Add your server IP to Management Console -&gt; Security -&gt; ALLOWED IPs\r\n2. Using the `HMAC CHARGE KEY` obtained through Management Console -&gt; Security, you must calculate the **HMACSHA256** hash of the request body and include it in an **HMAC** header in your request\r\n\r\n### HMAC calculation examples\r\n\r\n \r\n<a href=\"maomao_php\">\rhash_hmac('sha256', 'JSON_STRING_REQUEST_BODY', 'HMAC_CHARGE_KEY');\r</a>\r\n \r\n<a href=\"maomao_cs\">\rvar requestBytes = Encoding.UTF8.GetBytes(\"JSON_STRING_REQUEST_BODY\");\rvar chargeKeyBytes = Encoding.UTF8.GetBytes(\"HMAC_CHARGE_KEY\");\rvar hmac = BitConverter.ToString(new HMACSHA256(chargeKeyBytes).ComputeHash(requestBytes)).Replace(\"-\", \"\").ToLower();\r</a>\r\n\r\n\r\n### Request Examples\r\n\r\n- with payment token (credit card/bank account/paypal)\r\n \r\n<a href=\"maomao_json\">\r{\r  \"PaymentToken\": \"CUSTOMER'S_PAYMENT_TOKEN\",\r  \"Amount\": 55.55,\r  \"Currency\": \"USD\",\r  \"ProductTitle\": \"Small TV\",\r  \"ProductDescription\": \"with HDMI\"\r}\r</a>\r\n\r\n\r\n- with payment token (credit card/bank account/paypal) and vendor\r\n \r\n<a href=\"maomao_json\">\r{\r  \"PaymentToken\": \"CUSTOMER'S_PAYMENT_TOKEN\",\r  \"Amount\": 55.55,\r  \"Currency\": \"USD\",\r  \"ProductTitle\": \"Small TV\",\r  \"ProductDescription\": \"with HDMI\",\r  \"Vendors\": [\r    {\r      \"ID\": YOUR_VENDOR_ID\r    }\r  ]\r}\r</a>\r\n\r\n\r\n- with payment token (credit card/bank account/paypal) and vendor with custom amount or percentage\r\n \r\n<a href=\"maomao_json\">\r{\r  \"PaymentToken\": \"CUSTOMER'S_PAYMENT_TOKEN\",\r  \"Amount\": 55.55,\r  \"Currency\": \"USD\",\r  \"ProductTitle\": \"Small TV\",\r  \"ProductDescription\": \"with HDMI\",\r  \"Vendors\": [\r    {\r      \"ID\": YOUR_VENDOR_ID,\r      \"Amount\": 5.67,\r      \"Percentage\": 90\r    }\r  ]\r}\r</a>\r\n\r\n\r\n- with credit card\r\n \r\n<a href=\"maomao_json\">\r{\r  \"Customer\": {\r    \"Token\": \"CUSTOMER'S_TOKEN\"\r  },\r  \"CreditCard\": {\r    \"Token\": \"CUSTOMER'S_CREDIT_CARD_TOKEN\"\r  },\r  \"Amount\": 55.55,\r  \"Currency\": \"USD\",\r  \"ProductTitle\": \"Small TV\",\r  \"ProductDescription\": \"with HDMI\"\r}\r</a>\r\n\r\n\r\n- with bank account\r\n \r\n<a href=\"maomao_json\">\r{\r  \"Customer\": {\r    \"Token\": \"CUSTOMER'S_TOKEN\"\r  },\r  \"BankAccount\": {\r    \"Token\": \"CUSTOMER'S_BANK_ACCOUNT_TOKEN\"\r  },\r  \"Amount\": 55.55,\r  \"Currency\": \"USD\",\r  \"ProductTitle\": \"Small TV\",\r  \"ProductDescription\": \"with HDMI\"\r}\r</a>\r\n\r\n\r\n- with paypal account\r\n \r\n<a href=\"maomao_json\">\r{\r  \"Customer\": {\r    \"Token\": \"CUSTOMER'S_TOKEN\"\r  },\r  \"PaypalToken\": \"CUSTOMER'S_PAYPAL_ACCOUNT_TOKEN\",\r  \"Amount\": 55.55,\r  \"Currency\": \"USD\",\r  \"ProductTitle\": \"Small TV\",\r  \"ProductDescription\": \"with HDMI\"\r}\r</a>\r\n\r\n\r\n- with existing product\r\n \r\n<a href=\"maomao_json\">\r{\r  \"PaymentToken\": \"CUSTOMER'S_PAYMENT_TOKEN\",\r  \"Currency\": \"USD\",\r  \"Products\": [\r    {\r      \"ID\": YOUR_PRODUCT_ID,\r      \"Quantity\": YOUR_PRODUCT_QUANTITY\r    }\r  ]\r}\r</a>\r\n\r\n\r\n- with existing product and override amount in product's currency\r\n \r\n<a href=\"maomao_json\">\r{\r  \"PaymentToken\": \"CUSTOMER'S_PAYMENT_TOKEN\",\r  \"Currency\": \"USD\",\r  \"Products\": [\r    {\r      \"ID\": YOUR_PRODUCT_ID,\r      \"Quantity\": YOUR_PRODUCT_QUANTITY,\r      \"OverrideAmount\": 50\r    }\r  ]\r}\r</a>\r\n\r\n\r\n- with existing product and override amount and currency\r\n \r\n<a href=\"maomao_json\">\r{\r  \"PaymentToken\": \"CUSTOMER'S_PAYMENT_TOKEN\",\r  \"Currency\": \"USD\",\r  \"Products\": [\r    {\r      \"ID\": YOUR_PRODUCT_ID,\r      \"Quantity\": YOUR_PRODUCT_QUANTITY,\r      \"OverrideAmount\": 50,\r      \"OverrideCurrency\": \"GBP\"\r    }\r  ]\r}\r</a>\r\n",
        "operationId": "Charge_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "ch",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChargeDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TransactionNotification"
            }
          }
        }
      }
    },
    "/v2/Charge/Charge3DS": {
      "post": {
        "tags": [
          "Charge"
        ],
        "operationId": "Charge_Charge3DS",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "ch",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChargeDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TransactionNotification"
            }
          }
        }
      }
    },
    "/v2/Charge/TokenizeCard": {
      "post": {
        "tags": [
          "Charge"
        ],
        "operationId": "Charge_TokenizeCard",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "card",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TokenCardDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TokenCardDTO"
            }
          }
        }
      }
    },
    "/v2/Checkout/Token": {
      "post": {
        "tags": [
          "Checkout"
        ],
        "summary": "Creates a checkout token",
        "description": "- Product selection\r\n \r\n<a href=\"maomao_json\">\r{\r  \"PublicCheckoutPage.ID\": \"YOUR_CHECKOUT_PAGE_ID\"\r}\r</a>\r\n\r\n\r\n- Customer info (with selected product)\r\n \r\n<a href=\"maomao_json\">\r{\r  \"PublicCheckoutPage.ID\": \"YOUR_CHECKOUT_PAGE_ID\",\r  \"CartProducts[0].ID\": \"YOUR_PRODUCT_ID\",\r  \"CartProducts[0].Quantity\": \"YOUR_PRODUCT_QUANTITY\"\r}\r</a>\r\n\r\n\r\n- Payment method selection (with selected product and customer)\r\n \r\n<a href=\"maomao_json\">\r{\r  \"PublicCheckoutPage.ID\": \"YOUR_CHECKOUT_PAGE_ID\",\r  \"CartProducts[0].ID\": \"YOUR_PRODUCT_ID\",\r  \"CartProducts[0].Quantity\": \"YOUR_PRODUCT_QUANTITY\",\r  \"Customer.Token\": \"YOUR_CUSTOMER_TOKEN\"\r}\r</a>\r\n",
        "operationId": "Checkout_CreateToken",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "checkoutParameters",
            "in": "body",
            "description": "Checkout parameters",
            "required": true,
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Companies/{companyID}/Products": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Retrieves the company's products",
        "operationId": "Companies_GetProducts",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "companyID",
            "in": "path",
            "description": "The ID of the company",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ProductDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Companies/{companyID}/Customers": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Retrieves the company's customers",
        "operationId": "Companies_GetCustomers",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "companyID",
            "in": "path",
            "description": "The ID of the company",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Companies/{companyID}/Transactions": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Retrieves the company's transactions",
        "operationId": "Companies_GetTransactions",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "companyID",
            "in": "path",
            "description": "The ID of the company",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TransactionDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Companies/{companyID}/Invoices": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Retrieves the company's invoices",
        "operationId": "Companies_GetInvoices",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "companyID",
            "in": "path",
            "description": "The ID of the company",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/InvoiceDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Customers/{customerID}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Retrieves the details of an existing customer",
        "operationId": "Customers_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerID",
            "in": "path",
            "description": "The ID of the customer to be retrieved",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerDTO"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Deletes a customer",
        "operationId": "Customers_Delete",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerID",
            "in": "path",
            "description": "The ID of the customer to be deleted",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Customers/GetByToken/{token}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Retrieves the details of an existing customer",
        "operationId": "Customers_GetByToken",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "description": "The ID of the customer to be retrieved",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerDTO"
            }
          }
        }
      }
    },
    "/v2/Customers/GetByUniqueCustomerID/{uniqueCustomerID}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Retrieves the details of an existing customer",
        "operationId": "Customers_GetByUniqueCustomerID",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "uniqueCustomerID",
            "in": "path",
            "description": "The unique customer ID of the customer (or business) to be retrieved",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerDTO"
            }
          }
        }
      }
    },
    "/v2/Customers": {
      "put": {
        "tags": [
          "Customers"
        ],
        "summary": "Update a customer by id/token",
        "description": " \r\n<a href=\"maomao_json\">\r{\r  \"ID\": \"YOUR_CUSTOMER_ID\",\r  \"Token\": \"YOUR_CUSTOMER_TOKEN\",\r  \"FirstName\": \"John\",\r  \"BillingAddress1\": \"1st Street\",\r  \"BillingCountry\": \"AL\"\r}\r            </a>\r\n            ",
        "operationId": "Customers_Put",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "cust",
            "in": "body",
            "description": "The customer object",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CustomerDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerDTO"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Creates a new customer",
        "description": " \r\n<a href=\"maomao_json\">\r{\r  \"Email\": \"YOUR_CUSTOMER_EMAIL\",\r  \"ProjectSubdomain\": \"https://YOUR_SUBDOMAIN\",\r  \"FirstName\": \"John\",\r  \"LastName\": \"Smith\",\r  \"Phone\": \"1234567890\",\r  \"ShippingAddress1\": \"1700-1712 Cadiz St\",\r  \"ShippingCountry\": \"US\",\r  \"ShippingState\": \"TX\",\r  \"ShippingCity\": \"Dallas\",\r  \"ShippingZip\": \"167 77\",\r  \"UseSameAsBilling\": true,\r  \"BillingAddress1\": \"1700-1712 Cadiz St\",\r  \"BillingCountry\": \"US\",\r  \"BillingState\": \"TX\",\r  \"BillingCity\": \"Dallas\",\r  \"BillingZip\": \"75201\",\r}\r            </a>\r\n            ",
        "operationId": "Customers_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customer",
            "in": "body",
            "description": "The customer object",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CustomerDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerDTO"
            }
          }
        }
      }
    },
    "/v2/Customers/CreateCustomerEtable": {
      "post": {
        "tags": [
          "Customers"
        ],
        "operationId": "Customers_CreateCustomerEtable",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customer",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CustomerEtableDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CustomerEtableDTO"
            }
          }
        }
      }
    },
    "/v2/Customers/CreateCustomerBusinessEtable": {
      "post": {
        "tags": [
          "Customers"
        ],
        "operationId": "Customers_CreateCustomerBusinessEtable",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "business",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BusinessDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/BusinessDTO"
            }
          }
        }
      }
    },
    "/v2/Customers/{customerID}/Transactions": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Retrieves the customer's transactions",
        "operationId": "Customers_GetTransactions",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerID",
            "in": "path",
            "description": "The ID of the customer",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TransactionDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Customers/{customerID}/Subscriptions": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Retrieves the customer's subscriptions",
        "operationId": "Customers_GetSubscriptions",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerID",
            "in": "path",
            "description": "The ID of the customer",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SubscriptionDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Customers/{customerID}/Invoices": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Retrieves the customer's invoices",
        "operationId": "Customers_GetInvoices",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "customerID",
            "in": "path",
            "description": "The ID of the customer",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/InvoiceDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Customers/DeleteCreditCard/{token}": {
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Deletes a credit card",
        "operationId": "Customers_DeleteCreditCard",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "description": "The token of the credit card to be deleted",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Customers/CancelSubscription/{code}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Cancels a customer's subscription",
        "operationId": "Customers_CancelSubscription",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "The code of the subscription",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Invoices/{invoiceID}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Retrieves the details of an existing invoice",
        "operationId": "Invoices_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "invoiceID",
            "in": "path",
            "description": "The ID of the invoice to be retrieved",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InvoiceDTO"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Invoices"
        ],
        "summary": "Deletes an invoice",
        "operationId": "Invoices_Delete",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "invoiceID",
            "in": "path",
            "description": "The ID of the invoice to be deleted",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Invoices": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Creates a new invoice",
        "description": "- for customer\r\n \r\n<a href=\"maomao_json\">\r{\r  \"CustomerEmail\": \"YOUR_CUSTOMER_EMAIL\",\r  \"Currency\": \"USD\",\r  \"InvoiceProducts\": [\r    {\r      \"ID\": YOUR_PRODUCT_ID,\r      \"Quantity\": YOUR_PRODUCT_QUANTITY\r    }\r  ],\r  \"Title\": \"Invoice title\",\r  \"Description\": \"Invoice description\",\r  \"Date\": \"2019-01-01\",\r  \"DueDate\": \"2019-01-01\"\r}\r</a>\r\n\r\n- for customer with new products\r\n \r\n<a href=\"maomao_json\">\r{\r  \"CustomerEmail\": \"YOUR_CUSTOMER_EMAIL\",\r  \"Currency\": \"USD\",\r  \"InvoiceProducts\": [\r    {\r      \"ProductType\": \"Service\",\r      \"Title\": \"YOUR_PRODUCT_TITLE\",\r      \"Description\": \"YOUR_PRODUCT_DESCRIPTION\",\r      \"Price\": YOUR_PRODUCT_PRICE,\r      \"Tax\": YOUR_PRODUCT_TAX,\r      \"Quantity\": YOUR_PRODUCT_QUANTITY,\r      \"SetupFee\": YOUR_PRODUCT_SETUP_FEE,\r      \"SecurityDeposit\": YOUR_PRODUCT_SECURITY_DEPOSIT\r    }\r  ],\r  \"Title\": \"Invoice title\",\r  \"Description\": \"Invoice description\",\r  \"Date\": \"2019-01-01\",\r  \"DueDate\": \"2019-01-01\"\r}\r</a>\r\n\r\n- for vendor\r\n \r\n<a href=\"maomao_json\">\r{\r  \"VendorEmail\": \"YOUR_VENDOR_EMAIL\",\r  \"Currency\": \"USD\",\r  \"InvoiceOrderUnits\": [\r    {\r      \"ID\": YOUR_ORDER_UNIT_ID\r    }\r  ],\r  \"Title\": \"Invoice title\",\r  \"Description\": \"Invoice description\",\r  \"Date\": \"2019-01-01\",\r  \"DueDate\": \"2019-01-01\",\r  \"InvoiceStatus\": \"Paid\"\r}\r</a>\r\n",
        "operationId": "Invoices_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "invoice",
            "in": "body",
            "description": "The product object",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateInvoiceRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/InvoiceDTO"
            }
          }
        }
      }
    },
    "/v2/PrepaidUsage/GetAll": {
      "post": {
        "tags": [
          "PrepaidUsage"
        ],
        "summary": "Retrieves all prepaid usage notifications",
        "description": " \r\n<a href=\"maomao_json\">\r{\r  \"addonCode\": \"PREPAID_USAGE_CODE\",\r  \"transactionCode\": \"TRANSACTION_CODE\"\r}\r            </a>\r\n            ",
        "operationId": "PrepaidUsage_GetAll",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "billingAddon",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingAddonDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/BillableAddonNotificationDTO"
              }
            }
          }
        }
      }
    },
    "/v2/PrepaidUsage/UpdateUsage": {
      "put": {
        "tags": [
          "PrepaidUsage"
        ],
        "summary": "Updates the prepaid usage",
        "description": " \r\n<a href=\"maomao_json\">\r{\r  \"addonCode\": \"PREPAID_USAGE_CODE\",\r  \"transactionCode\": \"TRANSACTION_CODE\",\r  \"usage\": YOUR_USAGE\r}\r            </a>\r\n            ",
        "operationId": "PrepaidUsage_UpdateUsage",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "updateBillingAddon",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingAddonDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "format": "double",
              "type": "number"
            }
          }
        }
      }
    },
    "/v2/Products/{productID}": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Retrieves the details of an existing product",
        "operationId": "Products_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "productID",
            "in": "path",
            "description": "The ID of the product to be retrieved",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ProductDTO"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Products"
        ],
        "summary": "Deletes a product",
        "operationId": "Products_Delete",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "productID",
            "in": "path",
            "description": "The ID of the product to be deleted",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Products": {
      "post": {
        "tags": [
          "Products"
        ],
        "summary": "Creates a new product",
        "description": "### Examples\r\n\r\n- Goods/Service\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ProjectSubdomain\": \"https://YOUR_SUBDOMAIN\",\r  \"Title\": \"YOUR_PRODUCT_TITLE\",\r  \"Description\": \"YOUR_PRODUCT_DESCRIPTION\",\r  \"Quantity\": 500,\r  \"EditableQuantity\": true,\r  \"Price\": 50,\r  \"Tax\": 15,\r  \"Shipping\": 7,\r  \"Currency\": \"USD\",\r  \"ProductType\": \"Goods\"\r}\r</a>\r\n\r\n\r\n- Subscription\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ProjectSubdomain\": \"https://YOUR_SUBDOMAIN\",\r  \"Title\": \"YOUR_SUBSCRIPTION_TITLE\",\r  \"Description\": \"YOUR_SUBSCRIPTION_DESCRIPTION\",\r  \"Quantity\": 1,\r  \"EditableQuantity\": false,\r  \"Price\": 150,\r  \"Tax\": 15,\r  \"Currency\": \"USD\",\r  \"ProductType\": \"Subscription\",\r  \"PaymentCollectionMethod\": \"Automatic\",\r  \"CalendarBilling\": \"SignupDate\",\r  \"Period\": \"Month\",\r  \"PeriodInterval\": 1,\r  \"PeriodNeverEnds\": true\r}\r</a>\r\n\r\n\r\n- Goods/Service with a vendor\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ProjectSubdomain\": \"https://YOUR_SUBDOMAIN\",\r  \"Title\": \"YOUR_PRODUCT_TITLE\",\r  \"Description\": \"YOUR_PRODUCT_DESCRIPTION\",\r  \"Quantity\": 500,\r  \"EditableQuantity\": true,\r  \"Price\": 50,\r  \"Tax\": 15,\r  \"Shipping\": 7,\r  \"Currency\": \"USD\",\r  \"ProductType\": \"Goods\",\r  \"Vendors\": [\r    {\r      \"ID\": YOUR_VENDOR_ID\r    }\r  ]\r}\r</a>\r\n",
        "operationId": "Products_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "product",
            "in": "body",
            "description": "The product object",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ProductDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ProductDTO"
            }
          }
        }
      }
    },
    "/v2/Products/{productID}/AssignToVendor/{vendorID}": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Assigns a vendor to a product",
        "operationId": "Products_AssignToVendor",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "productID",
            "in": "path",
            "description": "The ID of the product",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "vendorID",
            "in": "path",
            "description": "The ID of vendor",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Projects/{projectID}/Products": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Retrieves the project's products",
        "operationId": "Projects_GetProducts",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "projectID",
            "in": "path",
            "description": "The ID of the project",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ProductDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Projects/{projectID}/Customers": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Retrieves the project's customers",
        "operationId": "Projects_GetCustomers",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "projectID",
            "in": "path",
            "description": "The ID of the project",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CustomerDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Projects/{projectID}/Transactions": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Retrieves the project's transactions",
        "operationId": "Projects_GetTransactions",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "projectID",
            "in": "path",
            "description": "The ID of the project",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TransactionDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Projects/{projectID}/Invoices": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Retrieves the project's invoices",
        "operationId": "Projects_GetInvoices",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "projectID",
            "in": "path",
            "description": "The ID of the project",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/InvoiceDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Subscriptions/{subscriptionID}": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Retrieves a subscription",
        "operationId": "Subscriptions_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "subscriptionID",
            "in": "path",
            "description": "The ID of the subscription",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SubscriptionDTO"
            }
          }
        }
      }
    },
    "/v2/Subscriptions/{subscriptionID}/CalculateChange/{productID}": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Calculates the change cost of change subscription to another product",
        "operationId": "Subscriptions_CalculateChange",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "subscriptionID",
            "in": "path",
            "description": "The ID of the subscription to change from",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "productID",
            "in": "path",
            "description": "The ID of the product to change to",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CalculateChangeSubscriptionDTO"
            }
          }
        }
      }
    },
    "/v2/Subscriptions/{subscriptionID}/Change/{productID}/{now}": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Change a subscription to another product",
        "operationId": "Subscriptions_Change",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "subscriptionID",
            "in": "path",
            "description": "The ID of the subscription to change from",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "productID",
            "in": "path",
            "description": "The ID of the product to change to",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "now",
            "in": "path",
            "description": "Change now or later",
            "required": true,
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Subscriptions/{subscriptionID}/Cancel": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Cancels a subscription",
        "operationId": "Subscriptions_Cancel",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "subscriptionID",
            "in": "path",
            "description": "The ID of the subscription to cancel",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Subscriptions/ChangeCreditCard": {
      "put": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Changes a credit card of subscriptions",
        "description": " \r\n<a href=\"maomao_json\">\r{\r  \"SubscriptionIDs\": [\r    YOUR_SUBSCRIPTION_ID1,\r    YOUR_SUBSCRIPTION_ID2\r  ],\r  \"CreditCardToken\": \"YOUR_CREDIT_CARD_TOKEN\"\r}\r            </a>\r\n            ",
        "operationId": "Subscriptions_ChangeCreditCard",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "changeCreditCardData",
            "in": "body",
            "description": "The ChangeCreditCardData object",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangeCreditCardData"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SubscriptionDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Tax/Calculate": {
      "post": {
        "tags": [
          "Tax"
        ],
        "summary": "Calculates tax percentage by project and customer details",
        "description": "You can either provide customer id or customer details (billing country/state and vat number if present)\r\n\r\n- Example with customer details:  \r\n \r\n<a href=\"maomao_json\">\r{  \r     \"ProjectSubdomain\": \"https://YOUR_PROJECT_SUBDOMAIN\",\r     \"Customer\": {  \r         \"VatNumber\": \"CUSTOMER_VAT_NUMBER\",  \r         \"BillingCountry\": \"US\",  \r         \"BillingState\": \"FL\",  \r     },  \r     \"TaxType\": \"DigitalProduct\"  \r}  \r </a>\r\n \r\n\r\n- Example with customer Token:\r\n \r\n<a href=\"maomao_json\">\r{  \r     \"ProjectSubdomain\": \"https://YOUR_PROJECT_SUBDOMAIN\",\r     \"Customer\": {  \r         \"Token\": \"YOUR_CUSTOMER_TOKEN\"  \r     }  \r}\r </a>\r\n ",
        "operationId": "Tax_Calculate",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "req",
            "in": "body",
            "description": "Calculate tax request object",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CalculateTaxDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/VatTaxCheck"
            }
          }
        }
      }
    },
    "/v2/Token": {
      "post": {
        "tags": [
          "Token"
        ],
        "summary": "Api request for token",
        "description": "Send a **POST** request to /v2/Token with Content-Type: **application/json**.  \r\nNote that users registered through an external provider (Google, Facebook etc), should obtain their password through **MANAGEMENT CONSOLE -&gt; Security -&gt; Api Password**\r\n\r\n \r\n<a href=\"maomao_json\">\r{\r    \"username\": \"YOUR_USERNAME\",\r    \"password\": \"YOUR_PASSWORD\"\r}\r</a>\r\n",
        "operationId": "Token_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "tokenRequest",
            "in": "body",
            "description": "The token request object",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApiTokenRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/v2/Transactions/{transactionID}": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Retrieves a transaction",
        "operationId": "Transactions_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "transactionID",
            "in": "path",
            "description": "The ID of the transaction",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TransactionDTO"
            }
          }
        }
      }
    },
    "/v2/Transactions/GetPendings": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "operationId": "Transactions_GetPendings",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "ppid",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "type": "number",
            "format": "double"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TransactionDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Transactions/GetAll": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "operationId": "Transactions_GetAll",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "ppid",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "type": "number",
            "format": "double"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TransactionDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Transactions/GetProviderCode": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "operationId": "Transactions_GetProviderCode",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "ppid",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "type": "number",
            "format": "double"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sessionID",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TransactionDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Transactions/GetPendings2": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "operationId": "Transactions_GetPendings2",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "ppid",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TransactionDTO"
              }
            }
          }
        }
      }
    },
    "/v2/Transactions/Check": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "operationId": "Transactions_Check",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "uniqueID",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TransactionNotification"
            }
          }
        }
      }
    },
    "/v2/Transactions/CheckInternalID": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "operationId": "Transactions_CheckInternalID",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "uniqueID",
            "in": "query",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TransactionNotification"
            }
          }
        }
      }
    },
    "/v2/Transactions/Reconciliation": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Returns all transactions on a specific time frame",
        "description": "The `DateFrom` and `DateTo` fields must be in **UTC (Zulu) format**: `yyyy-MM-ddTHH:mm:ssZ`.\r\nExample:\r\n\r\n```json\r\n{\r\n\"DateFrom\": \"2025-09-08T10:00:00Z\",\r\n\"DateTo\": \"2025-09-08T23:59:00Z\"\r\n}\r\n```",
        "operationId": "Transactions_Reconciliation",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "tq",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TransactionQuery"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ReconciliationResponse"
            }
          }
        }
      }
    },
    "/v2/Transactions/Capture": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Captures a transaction",
        "description": "### Request Examples\r\n\r\n- with ID\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ID\": TRANSACTION_ID,\r}\r</a>\r\n\r\n\r\n- with vendors\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ID\": TRANSACTION_ID,\r  \"Products\": [\r    {\r      \"ID\": YOUR_PRODUCT_ID,\r      \"Vendors\": [\r        {\r          \"ID\": YOUR_VENDOR_ID\r      ]\r    }\r  ]\r}\r</a>\r\n\r\n\r\n- with vendors and custom amount\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ID\": TRANSACTION_ID,\r  \"Products\": [\r    {\r      \"ID\": YOUR_PRODUCT_ID,\r      \"Vendors\": [\r        {\r          \"ID\": YOUR_VENDOR_ID,\r          \"Amount\": YOUR_VENDOR_AMOUNT\r        }\r      ]\r    }\r  ]\r}\r</a>\r\n\r\n\r\n- with vendors and custom percentage\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ID\": TRANSACTION_ID,\r  \"Products\": [\r    {\r      \"ID\": YOUR_PRODUCT_ID,\r      \"Vendors\": [\r        {\r          \"ID\": YOUR_VENDOR_ID,\r          \"Percentage\": YOUR_VENDOR_PERCENTAGE\r        }\r      ]\r    }\r  ]\r}\r</a>\r\n",
        "operationId": "Transactions_Capture",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "req",
            "in": "body",
            "description": "The capture transation request",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TransactionModify"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TransactionDTO"
            }
          }
        }
      }
    },
    "/v2/Transactions/Refund": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Refunds a transaction",
        "description": "### Request Examples\r\n\r\n- with ID\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ID\": TRANSACTION_ID,\r}\r</a>\r\n\r\n\r\n- with custom amount, and vendors custom amount\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ID\": TRANSACTION_ID,\r  \"Amount\": YOUR_AMOUNT,\r  \"Vendors\": [\r    {\r      \"ID\": YOUR_VENDOR_ID,\r      \"Amount\": YOUR_AMOUNT\r    }\r  ]\r}\r</a>\r\n",
        "operationId": "Transactions_Refund",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "req",
            "in": "body",
            "description": "The refund transation request",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TransactionModify"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TransactionDTO"
            }
          }
        }
      }
    },
    "/v2/Transactions/Void": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Vois a transaction",
        "operationId": "Transactions_Void",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "req",
            "in": "body",
            "description": "The void transation request",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TransactionModify"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TransactionDTO"
            }
          }
        }
      }
    },
    "/v2/Vendors/{vendorID}": {
      "get": {
        "tags": [
          "Vendors"
        ],
        "summary": "Retrieves the details of an existing vendor",
        "operationId": "Vendors_Get",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "vendorID",
            "in": "path",
            "description": "The ID of the vendor to be retrieved",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/VendorDTO"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Vendors"
        ],
        "summary": "Deletes a vendor",
        "operationId": "Vendors_Delete",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "vendorID",
            "in": "path",
            "description": "The ID of the vendor to be deleted",
            "required": true,
            "type": "integer",
            "format": "int64"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/v2/Vendors": {
      "put": {
        "tags": [
          "Vendors"
        ],
        "summary": "Mofify a vendor",
        "description": "- US vendor\r\n\r\n \r\n<a href=\"maomao_json\">\r{\r\t\"ID\": YOUR_VENDOR_ID,\r\t\"VendorType\": \"Individual\",\r\t\"Email\": \"john.smith@example.com\",\r\t\"FirstName\": \"John\",\r\t\"LastName\": \"Smith\",\r\t\"DateOfBirth\": \"01/01/2001\",\r\t\"IdentificationNumber\": \"X 326587\",\r\t\"PassportNumber\": \"AB2659587\",\r\t\"Phone\": \"123456789\",\r\t\"Address1\": \"Main st. 2\",\r\t\"Country\": \"US\",\r\t\"State\": \"TX\",\r\t\"City\": \"Dallas\",\r\t\"Zip\": \"23156\",\r\t\"ShopName\": \"Next Company Ltd.\",\r\t\"CompanyCountry\": \"US\",\r\t\"CompanyState\": \"TX\",\r\t\"CompanyCity\": \"Dallas\",\r\t\"CompanyVat\": 10,\r\t\"CommisionPercent\": 90,\r\t\"SubscriptionCommision\": true,\r\t\"DefaultPayoutCurrency\": \"USD\",\r\t\"PayoutFrequency\": \"Weekly\",\r\t\"PayoutFrequencyInterval\": 1,\r\t\"PayoutDelay\": 8,\r\t\"PayShipping\": \"Vendor\",\r\t\"PayTax\": \"Vendor\",\r\t\"PayoutInfos\": [\r\t\t{\r\t\t\t\"PayoutType\": \"ACH\",\r\t\t\t\"MinimumPayoutAmount\": 0,\r\t\t\t\"ReserveBalance\": 0,\r\t\t\t\"BankAccount\": {\r\t\t\t\t\"FirstName\": \"John\",\r\t\t\t\t\"LastName\": \"Smith\",\r\t\t\t\t\"RoutingNumber\": \"659759856\",\r\t\t\t\t\"AccountNumber\": \"258745698542658\",\r\t\t\t\t\"Currency\": \"USD\",\r\t\t\t\t\"BankAccountClass\": \"Personal\",\r\t\t\t\t\"BankAccountType\": \"Checking\",\r\t\t\t\t\"BankName\": \"TheBank\",\r\t\t\t\t\"Country\": \"US\",\r\t\t\t\t\"State\": \"TX\"\r\t\t\t}\r\t\t}\r\t]\r}\r</a>\r\n\r\n\r\n- EU vendor\r\n\r\n \r\n<a href=\"maomao_json\">\r{\r\t\"ID\": YOUR_VENDOR_ID,\r\t\"VendorType\": \"Individual\",\r\t\"Email\": \"john.doe@example.com\",\r\t\"FirstName\": \"John\",\r\t\"LastName\": \"Doe\",\r\t\"DateOfBirth\": \"01/01/2001\",\r\t\"IdentificationNumber\": \"X 326587\",\r\t\"PassportNumber\": \"AB2659587\",\r\t\"Phone\": \"123456789\",\r\t\"Address1\": \"Main st. 22\",\r\t\"Country\": \"GR\",\r\t\"City\": \"Athens\",\r\t\"Zip\": \"10563\",\r\t\"ShopName\": \"Next Company Ltd.\",\r\t\"CompanyCountry\": \"GR\",\r\t\"CompanyCity\": \"Athens\",\r\t\"CompanyVat\": 24,\r\t\"CommisionPercent\": 90,\r\t\"SubscriptionCommision\": true,\r\t\"DefaultPayoutCurrency\": \"EUR\",\r\t\"PayoutFrequency\": \"Weekly\",\r\t\"PayoutFrequencyInterval\": 1,\r\t\"PayoutDelay\": 8,\r\t\"PayShipping\": \"Vendor\",\r\t\"PayTax\": \"Vendor\",\r\t\"PayoutInfos\": [\r\t\t{\r\t\t\t\"PayoutType\": \"SEPA\",\r\t\t\t\"MinimumPayoutAmount\": 0,\r\t\t\t\"ReserveBalance\": 0,\r\t\t\t\"BankAccount\": {\r\t\t\t\t\"FirstName\": \"John\",\r\t\t\t\t\"LastName\": \"Doe\",\r\t\t\t\t\"IBAN\": \"AB12345678901234567890\",\r\t\t\t\t\"Currency\": \"EUR\",\r\t\t\t\t\"BankAccountClass\": \"Personal\",\r\t\t\t\t\"BankAccountType\": \"Checking\",\r\t\t\t\t\"BankName\": \"TheBank\",\r\t\t\t\t\"Country\": \"GR\",\r\t\t\t\t\"SwiftBic\": \"THEBANK\"\r\t\t\t}\r\t\t}\r\t]\r}\r</a>\r\n",
        "operationId": "Vendors_Put",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "vendor",
            "in": "body",
            "description": "The vendor object",
            "required": true,
            "schema": {
              "$ref": "#/definitions/VendorDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/VendorDTO"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Vendors"
        ],
        "summary": "Creates a new vendor",
        "description": "- US vendor\r\n\r\n \r\n<a href=\"maomao_json\">\r{\r\t\"ProjectSubdomain\": \"https://YOUR_SUBDOMAIN\",\r\t\"VendorType\": \"Individual\",\r\t\"Email\": \"john.smith@example.com\",\r\t\"FirstName\": \"John\",\r\t\"LastName\": \"Smith\",\r\t\"DateOfBirth\": \"01/01/2001\",\r\t\"IdentificationNumber\": \"X 326587\",\r\t\"PassportNumber\": \"AB2659587\",\r\t\"Phone\": \"123456789\",\r\t\"Address1\": \"Main st. 2\",\r\t\"Country\": \"US\",\r\t\"State\": \"TX\",\r\t\"City\": \"Dallas\",\r\t\"Zip\": \"23156\",\r\t\"ShopName\": \"Next Company Ltd.\",\r\t\"CompanyCountry\": \"US\",\r\t\"CompanyState\": \"TX\",\r\t\"CompanyCity\": \"Dallas\",\r\t\"CompanyVat\": 10,\r\t\"CommisionPercent\": 90,\r\t\"SubscriptionCommision\": true,\r\t\"DefaultPayoutCurrency\": \"USD\",\r\t\"PayoutFrequency\": \"Weekly\",\r\t\"PayoutFrequencyInterval\": 1,\r\t\"PayoutDelay\": 8,\r\t\"PayShipping\": \"Vendor\",\r\t\"PayTax\": \"Vendor\",\r\t\"PayoutInfos\": [\r\t\t{\r\t\t\t\"PayoutType\": \"ACH\",\r\t\t\t\"MinimumPayoutAmount\": 0,\r\t\t\t\"ReserveBalance\": 0,\r\t\t\t\"BankAccount\": {\r\t\t\t\t\"FirstName\": \"John\",\r\t\t\t\t\"LastName\": \"Smith\",\r\t\t\t\t\"RoutingNumber\": \"659759856\",\r\t\t\t\t\"AccountNumber\": \"258745698542658\",\r\t\t\t\t\"Currency\": \"USD\",\r\t\t\t\t\"BankAccountClass\": \"Personal\",\r\t\t\t\t\"BankAccountType\": \"Checking\",\r\t\t\t\t\"BankName\": \"TheBank\",\r\t\t\t\t\"Country\": \"US\",\r\t\t\t\t\"State\": \"TX\"\r\t\t\t}\r\t\t}\r\t]\r}\r</a>\r\n\r\n\r\n- EU vendor\r\n\r\n \r\n<a href=\"maomao_json\">\r{\r\t\"ProjectSubdomain\": \"https://YOUR_SUBDOMAIN\",\r\t\"VendorType\": \"Individual\",\r\t\"Email\": \"john.doe@example.com\",\r\t\"FirstName\": \"John\",\r\t\"LastName\": \"Doe\",\r\t\"DateOfBirth\": \"01/01/2001\",\r\t\"IdentificationNumber\": \"X 326587\",\r\t\"PassportNumber\": \"AB2659587\",\r\t\"Phone\": \"123456789\",\r\t\"Address1\": \"Main st. 22\",\r\t\"Country\": \"GR\",\r\t\"City\": \"Athens\",\r\t\"Zip\": \"10563\",\r\t\"ShopName\": \"Next Company Ltd.\",\r\t\"CompanyCountry\": \"GR\",\r\t\"CompanyCity\": \"Athens\",\r\t\"CompanyVat\": 24,\r\t\"CommisionPercent\": 90,\r\t\"SubscriptionCommision\": true,\r\t\"DefaultPayoutCurrency\": \"EUR\",\r\t\"PayoutFrequency\": \"Weekly\",\r\t\"PayoutFrequencyInterval\": 1,\r\t\"PayoutDelay\": 8,\r\t\"PayShipping\": \"Vendor\",\r\t\"PayTax\": \"Vendor\",\r\t\"PayoutInfos\": [\r\t\t{\r\t\t\t\"PayoutType\": \"SEPA\",\r\t\t\t\"MinimumPayoutAmount\": 0,\r\t\t\t\"ReserveBalance\": 0,\r\t\t\t\"BankAccount\": {\r\t\t\t\t\"FirstName\": \"John\",\r\t\t\t\t\"LastName\": \"Doe\",\r\t\t\t\t\"IBAN\": \"AB12345678901234567890\",\r\t\t\t\t\"Currency\": \"EUR\",\r\t\t\t\t\"BankAccountClass\": \"Personal\",\r\t\t\t\t\"BankAccountType\": \"Checking\",\r\t\t\t\t\"BankName\": \"TheBank\",\r\t\t\t\t\"Country\": \"GR\",\r\t\t\t\t\"SwiftBic\": \"THEBANK\"\r\t\t\t}\r\t\t}\r\t]\r}\r</a>\r\n",
        "operationId": "Vendors_Post",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "vendor",
            "in": "body",
            "description": "The vendor object",
            "required": true,
            "schema": {
              "$ref": "#/definitions/VendorDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/VendorDTO"
            }
          }
        }
      }
    },
    "/v2/Vendors/ReleaseFunds": {
      "post": {
        "tags": [
          "Vendors"
        ],
        "summary": "Releases an amount for vendor payout",
        "description": "- With amount\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ID\": VENDOR_ID,\r  \"Amount\": 55.55\r}\r</a>\r\n\r\n\r\n- For transaction\r\n \r\n<a href=\"maomao_json\">\r{\r  \"ID\": VENDOR_ID,\r  \"TransactionID\": TRANSACTION_ID\r}\r</a>\r\n",
        "operationId": "Vendors_ReleaseFunds",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded",
          "application/xml",
          "text/xml"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "req",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReleaseFundsDTO"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "BillingAddonDTO": {
      "required": [
        "addonCode",
        "usage",
        "billableAddonNotificationType",
        "transactionCode"
      ],
      "type": "object",
      "properties": {
        "addonCode": {
          "description": "Billing addon code",
          "type": "string"
        },
        "usage": {
          "format": "double",
          "description": "Usage to be billed",
          "type": "number"
        },
        "billableAddonNotificationType": {
          "description": "Transaction, Subscription",
          "type": "string"
        },
        "transactionCode": {
          "description": "The transaction code of the transaction/subscription that purchased billing addon belongs to",
          "type": "string"
        }
      }
    },
    "BillableAddonNotificationDTO": {
      "type": "object",
      "properties": {
        "Amount": {
          "format": "double",
          "type": "number"
        },
        "CreatedDatetime": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "ChargeDTO": {
      "required": [
        "Amount",
        "Currency"
      ],
      "type": "object",
      "properties": {
        "PaymentToken": {
          "type": "string"
        },
        "PaymentType": {
          "type": "string"
        },
        "cvv": {
          "type": "string"
        },
        "Customer": {
          "$ref": "#/definitions/CustomerDTO"
        },
        "CreditCard": {
          "$ref": "#/definitions/CreditCardDTO"
        },
        "BankAccount": {
          "$ref": "#/definitions/BankAccountDTO"
        },
        "PaypalToken": {
          "type": "string"
        },
        "Amount": {
          "format": "double",
          "type": "number"
        },
        "Currency": {
          "description": "ISO4217 currency code",
          "type": "string"
        },
        "ClientIP": {
          "type": "string"
        },
        "ProductTitle": {
          "type": "string"
        },
        "ProductDescription": {
          "type": "string"
        },
        "MerchantUniqueID": {
          "description": "Identification of the transaction inside your internal system. Use MerchantUniqueID or CustomFields, not both.",
          "type": "string"
        },
        "okurl": {
          "type": "string"
        },
        "notokurl": {
          "type": "string"
        },
        "CustomFields": {
          "description": "Used for more parameters than MerchantUniqueID. Use MerchantUniqueID or CustomFields, not both.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "Tax": {
          "format": "double",
          "description": "Tax percentage e.g. 15%",
          "type": "number"
        },
        "Vendors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VendorDTO"
          }
        },
        "Products": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ChargeProductDTO"
          }
        }
      }
    },
    "CustomerDTO": {
      "required": [
        "Email",
        "ProjectSubdomain",
        "FirstName",
        "LastName",
        "BillingAddress1",
        "BillingCountry",
        "BillingZip"
      ],
      "type": "object",
      "properties": {
        "GeoLookupResult": {
          "$ref": "#/definitions/GeoLookupResult"
        },
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "Token": {
          "type": "string"
        },
        "Active": {
          "type": "boolean"
        },
        "Email": {
          "type": "string"
        },
        "Username": {
          "type": "string"
        },
        "Referrer": {
          "type": "string"
        },
        "ProjectSubdomain": {
          "description": "Project subdomain where customer belongs to",
          "type": "string"
        },
        "FirstName": {
          "type": "string"
        },
        "LastName": {
          "type": "string"
        },
        "Company": {
          "type": "string"
        },
        "Phone": {
          "type": "string"
        },
        "UniqueCustomerID": {
          "type": "string"
        },
        "ShippingAddress1": {
          "type": "string"
        },
        "ShippingAddress2": {
          "type": "string"
        },
        "ShippingCountry": {
          "type": "string"
        },
        "ShippingState": {
          "type": "string"
        },
        "ShippingCity": {
          "type": "string"
        },
        "ShippingZip": {
          "type": "string"
        },
        "VatNumber": {
          "type": "string"
        },
        "VatCountry": {
          "type": "string"
        },
        "UseSameAsBilling": {
          "type": "boolean"
        },
        "BillingAddress1": {
          "type": "string"
        },
        "BillingAddress2": {
          "type": "string"
        },
        "BillingCountry": {
          "type": "string"
        },
        "BillingState": {
          "type": "string"
        },
        "BillingCity": {
          "type": "string"
        },
        "customerIP": {
          "type": "string"
        },
        "BillingZip": {
          "type": "string"
        },
        "IsDeleted": {
          "type": "boolean"
        },
        "CustomerAreaLink": {
          "type": "string"
        },
        "CreditCards": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreditCardDTO"
          }
        },
        "BankAccounts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BankAccountDTO"
          }
        },
        "ProviderData": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ProviderDataDTO"
          }
        }
      }
    },
    "CreditCardDTO": {
      "type": "object",
      "properties": {
        "Token": {
          "type": "string"
        },
        "Active": {
          "type": "boolean"
        },
        "CardType": {
          "type": "string"
        },
        "ExpirationMonth": {
          "format": "int32",
          "type": "integer"
        },
        "ExpirationYear": {
          "format": "int32",
          "type": "integer"
        },
        "FirstName": {
          "type": "string"
        },
        "LastName": {
          "type": "string"
        },
        "Number": {
          "type": "string"
        },
        "BillingAddress1": {
          "type": "string"
        },
        "BillingAddress2": {
          "type": "string"
        },
        "Country": {
          "type": "string"
        },
        "State": {
          "type": "string"
        },
        "Zip": {
          "type": "string"
        },
        "NumberFirst6": {
          "type": "string"
        },
        "NumberLast4": {
          "type": "string"
        },
        "Cvv": {
          "type": "string"
        }
      }
    },
    "BankAccountDTO": {
      "required": [
        "FirstName",
        "LastName",
        "Currency",
        "BankAccountClass",
        "BankAccountType",
        "Country"
      ],
      "type": "object",
      "properties": {
        "Token": {
          "type": "string"
        },
        "Active": {
          "type": "boolean"
        },
        "FirstName": {
          "type": "string"
        },
        "LastName": {
          "type": "string"
        },
        "IBAN": {
          "type": "string"
        },
        "RoutingNumber": {
          "type": "string"
        },
        "AccountNumber": {
          "type": "string"
        },
        "Currency": {
          "type": "string"
        },
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "BankAccountClass": {
          "description": "Personal, Corporate, International",
          "type": "string"
        },
        "BankAccountType": {
          "description": "Checking, Savings",
          "type": "string"
        },
        "BankName": {
          "type": "string"
        },
        "Country": {
          "type": "string"
        },
        "State": {
          "type": "string"
        },
        "SwiftBic": {
          "type": "string"
        },
        "City": {
          "type": "string"
        },
        "Address": {
          "type": "string"
        },
        "Zip": {
          "type": "string"
        },
        "IsDeleted": {
          "type": "boolean"
        },
        "IBANLast4": {
          "type": "string"
        },
        "RoutingNumberLast4": {
          "type": "string"
        },
        "AccountNumberLast4": {
          "type": "string"
        }
      }
    },
    "VendorDTO": {
      "required": [
        "Email",
        "Country",
        "CommisionPercent",
        "DefaultPayoutCurrency"
      ],
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "ProjectSubdomain": {
          "type": "string"
        },
        "Active": {
          "type": "boolean"
        },
        "VendorType": {
          "description": "Individual, Business",
          "type": "string"
        },
        "Email": {
          "type": "string"
        },
        "FirstName": {
          "type": "string"
        },
        "LastName": {
          "type": "string"
        },
        "DateOfBirth": {
          "format": "date-time",
          "type": "string"
        },
        "Gender": {
          "description": "Male, Female",
          "type": "string"
        },
        "IdentificationNumber": {
          "type": "string"
        },
        "DriverLisenceNumber": {
          "type": "string"
        },
        "PassportNumber": {
          "type": "string"
        },
        "Phone": {
          "type": "string"
        },
        "Address1": {
          "type": "string"
        },
        "Address2": {
          "type": "string"
        },
        "Country": {
          "type": "string"
        },
        "State": {
          "type": "string"
        },
        "City": {
          "type": "string"
        },
        "Zip": {
          "type": "string"
        },
        "ShopName": {
          "type": "string"
        },
        "VatCountry": {
          "type": "string"
        },
        "VatNumber": {
          "type": "string"
        },
        "CompanyTaxNumber": {
          "type": "string"
        },
        "CompanyEmail": {
          "type": "string"
        },
        "CompanyName": {
          "type": "string"
        },
        "CompanyPhone": {
          "type": "string"
        },
        "CompanyURL": {
          "type": "string"
        },
        "CompanyAddress1": {
          "type": "string"
        },
        "CompanyAddress2": {
          "type": "string"
        },
        "CompanyCountry": {
          "type": "string"
        },
        "CompanyState": {
          "type": "string"
        },
        "CompanyCity": {
          "type": "string"
        },
        "CompanyZip": {
          "type": "string"
        },
        "CompanyVat": {
          "format": "double",
          "type": "number"
        },
        "CommisionPercent": {
          "format": "double",
          "type": "number"
        },
        "SubscriptionCommision": {
          "type": "boolean"
        },
        "DefaultPayoutCurrency": {
          "type": "string"
        },
        "PayoutFrequency": {
          "description": "Daily, Weekly, Semimonthly, Monthly",
          "type": "string"
        },
        "PayoutFrequencyInterval": {
          "format": "int32",
          "type": "integer"
        },
        "PayoutDelay": {
          "format": "int32",
          "type": "integer"
        },
        "PayShipping": {
          "description": "Split, Vendor, Marketplace",
          "type": "string"
        },
        "PayTax": {
          "description": "Split, Vendor, Marketplace",
          "type": "string"
        },
        "VendorStatus": {
          "type": "string"
        },
        "PayoutInfos": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PayoutInfoDTO"
          }
        },
        "Products": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ProductDTO"
          }
        },
        "Persons": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PersonDTO"
          }
        },
        "ExtraData": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "Amount": {
          "format": "double",
          "description": "Total amount in vendor's default currency",
          "type": "number"
        },
        "Percentage": {
          "format": "double",
          "type": "number"
        }
      }
    },
    "ChargeProductDTO": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "Quantity": {
          "format": "int32",
          "type": "integer"
        },
        "OverrideAmount": {
          "format": "double",
          "description": "Custom payment/subscription amount",
          "type": "number"
        },
        "OverrideCurrency": {
          "description": "Custom payment/subscription currency",
          "type": "string"
        }
      }
    },
    "GeoLookupResult": {
      "type": "object",
      "properties": {
        "Address": {
          "type": "string",
          "readOnly": true
        },
        "StatusCode": {
          "description": "<statusCode>OK</statusCode>",
          "type": "string"
        },
        "StatusMessage": {
          "description": "<statusMessage />",
          "type": "string"
        },
        "IpAddress": {
          "description": "<ipAddress>91.140.88.160</ipAddress>",
          "type": "string"
        },
        "CountryCode": {
          "description": "<countryCode>GR</countryCode>",
          "type": "string"
        },
        "CountryName": {
          "description": "<countryName>Greece</countryName>",
          "type": "string"
        },
        "RegionName": {
          "description": "<regionName>Kentriki Makedonia</regionName>",
          "type": "string"
        },
        "CityName": {
          "description": "<cityName>Menemeni</cityName>",
          "type": "string"
        },
        "ZipCode": {
          "description": "<zipCode>561 22</zipCode>",
          "type": "string"
        },
        "Latitude": {
          "description": "<latitude>40.6569</latitude>",
          "type": "string"
        },
        "Longitude": {
          "description": "<longitude>22.96589</longitude>",
          "type": "string"
        },
        "TimeZone": {
          "description": "<timeZone>+03:00</timeZone>",
          "type": "string"
        },
        "CountryImage": {
          "type": "string"
        }
      }
    },
    "ProviderDataDTO": {
      "type": "object",
      "properties": {
        "PaymentMethod": {
          "type": "string"
        },
        "Token": {
          "type": "string"
        }
      }
    },
    "PayoutInfoDTO": {
      "type": "object",
      "properties": {
        "PayoutType": {
          "description": "ACH, CHAPS, SEPA, WIRE",
          "type": "string"
        },
        "MinimumPayoutAmount": {
          "format": "double",
          "type": "number"
        },
        "PaymentReference": {
          "type": "string"
        },
        "ReserveBalance": {
          "format": "double",
          "type": "number"
        },
        "BankAccount": {
          "$ref": "#/definitions/BankAccountDTO"
        }
      }
    },
    "ProductDTO": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "ProjectSubdomain": {
          "description": "The project's subdomain where product belongs to",
          "type": "string"
        },
        "Title": {
          "type": "string"
        },
        "Description": {
          "type": "string"
        },
        "Code": {
          "type": "string"
        },
        "Quantity": {
          "format": "int32",
          "description": "Stock available quantity",
          "type": "integer"
        },
        "EditableQuantity": {
          "description": "Editable quantity at checkout",
          "type": "boolean"
        },
        "Price": {
          "format": "double",
          "type": "number"
        },
        "Tax": {
          "format": "double",
          "description": "Tax percentage",
          "type": "number"
        },
        "Discount": {
          "format": "double",
          "description": "Discount percentage",
          "type": "number"
        },
        "Shipping": {
          "format": "double",
          "type": "number"
        },
        "Currency": {
          "description": "ISO4217 currency code",
          "type": "string"
        },
        "ProductType": {
          "description": "Service, Subscription, Goods",
          "type": "string"
        },
        "PaymentCollectionMethod": {
          "description": "Automatic, Manual (via email invoice)",
          "type": "string"
        },
        "CalendarBilling": {
          "description": "Used for monthly billed subcriptions. Values:\r\n\r\n SignupDate, \r\n Day01, Day02, Day03, Day04, Day05, Day06, Day07, Day08, Day09, Day10, Day11, Day12, Day13, Day14, Day15, Day16, Day17, Day18, Day19, Day20, Day21, Day22, Day23, Day24, Day25, Day26, Day27, Day28, \r\n DayLast",
          "type": "string"
        },
        "DimensionUnit": {
          "description": "Centimeters, Inches",
          "type": "string"
        },
        "Length": {
          "format": "double",
          "type": "number"
        },
        "Width": {
          "format": "double",
          "type": "number"
        },
        "Height": {
          "format": "double",
          "type": "number"
        },
        "MassUnit": {
          "description": "Kg, Pounds",
          "type": "string"
        },
        "Weight": {
          "format": "double",
          "type": "number"
        },
        "ProductCategoryID": {
          "format": "int64",
          "type": "integer"
        },
        "IsDeleted": {
          "type": "boolean"
        },
        "Enabled": {
          "type": "boolean"
        },
        "IsDummy": {
          "description": "Used for direct checkout with predifined amount/currency",
          "type": "boolean"
        },
        "Period": {
          "description": "Subscription charge period. Values:\r\nDay, Month, Term, Semester, Year",
          "type": "string"
        },
        "PeriodInterval": {
          "format": "int32",
          "type": "integer"
        },
        "PeriodNeverEnds": {
          "type": "boolean"
        },
        "PeriodDuration": {
          "format": "int32",
          "type": "integer"
        },
        "HasTrialPeriod": {
          "type": "boolean"
        },
        "TrialPeriodType": {
          "description": "Paid, Free",
          "type": "string"
        },
        "TrialPeriod": {
          "description": "Subscription trial charge period. Values:\r\nDay, Month, Term, Semester, Year",
          "type": "string"
        },
        "TrialPeriodPrice": {
          "format": "double",
          "type": "number"
        },
        "TrialPeriodDuration": {
          "format": "int32",
          "type": "integer"
        },
        "FreeTrialPeriod": {
          "description": "Subscription free trial period. Values:\r\nDay, Month, Term, Semester, Year",
          "type": "string"
        },
        "FreeTrialPeriodDuration": {
          "format": "int32",
          "type": "integer"
        },
        "TrialAuthType": {
          "description": "Amount which will be used to auth credit card. Values: \r\nWholeAmount, ZeroAmount",
          "type": "string"
        },
        "AvailableInCountries": {
          "type": "boolean"
        },
        "AvailableCountries": {
          "description": "Countries code 2 letter array",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "RequireBillingAddress": {
          "type": "boolean"
        },
        "RequireShippingAddress": {
          "type": "boolean"
        },
        "Images": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "BillableAddons": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BillableAddonDTO"
          }
        },
        "Vendors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VendorDTO"
          }
        }
      }
    },
    "PersonDTO": {
      "type": "object",
      "properties": {
        "Email": {
          "type": "string"
        },
        "FirstName": {
          "type": "string"
        },
        "IDnumber": {
          "type": "string"
        },
        "LastName": {
          "type": "string"
        },
        "Phone": {
          "type": "string"
        },
        "Director": {
          "type": "boolean"
        },
        "Owner": {
          "type": "boolean"
        },
        "PercentOwnership": {
          "format": "double",
          "type": "number"
        },
        "City": {
          "type": "string"
        },
        "Country": {
          "type": "string"
        },
        "Address": {
          "type": "string"
        },
        "Address1": {
          "type": "string"
        },
        "PostalCode": {
          "type": "string"
        },
        "IdentificationNumber": {
          "type": "string"
        },
        "State": {
          "type": "string"
        },
        "Dob": {
          "format": "date-time",
          "type": "string"
        },
        "Gender": {
          "enum": [
            "Male",
            "Female"
          ],
          "type": "string"
        }
      }
    },
    "BillableAddonDTO": {
      "type": "object",
      "properties": {
        "BillableAddonType": {
          "description": "FixedPrice, UsageBased",
          "type": "string"
        },
        "Name": {
          "type": "string"
        },
        "Code": {
          "type": "string"
        },
        "PricingModel": {
          "description": "PerUnit, Percentage",
          "type": "string"
        },
        "MeasuredUnitName": {
          "type": "string"
        },
        "Price": {
          "format": "double",
          "type": "number"
        },
        "Percentage": {
          "format": "double",
          "type": "number"
        },
        "IncludedMeasuredUnits": {
          "format": "double",
          "type": "number"
        },
        "Period": {
          "description": "Billable addon charge period. Values:\r\nDay, Month, Term, Semester, Year",
          "type": "string"
        },
        "PeriodInterval": {
          "format": "int32",
          "type": "integer"
        },
        "Optional": {
          "description": "If true, customer can exclude this billable addon at checkout",
          "type": "boolean"
        }
      }
    },
    "TransactionNotification": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "Amount": {
          "$ref": "#/definitions/NotificationAmount"
        },
        "Card": {
          "$ref": "#/definitions/NotificationCreditCard"
        },
        "CustomerData": {
          "$ref": "#/definitions/NotificationCustomer"
        },
        "CustomerTransactionCode": {
          "type": "string"
        },
        "CustomResponseText": {
          "type": "string"
        },
        "IsLive": {
          "type": "boolean"
        },
        "PaymentDate": {
          "format": "date-time",
          "type": "string"
        },
        "PaymentProviderName": {
          "type": "string"
        },
        "Products": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/NotificationOrderUnit"
          }
        },
        "ProviderChargeID": {
          "type": "string"
        },
        "Signature": {
          "type": "string"
        },
        "Status": {
          "type": "string"
        },
        "BankAccount": {
          "$ref": "#/definitions/BankAccountDTO"
        },
        "Metadata": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TransactionMetadata"
          }
        },
        "PaypalToken": {
          "type": "string"
        },
        "Business": {
          "type": "string"
        },
        "Invoice": {
          "$ref": "#/definitions/InvoiceDTO"
        },
        "SubscriptionID": {
          "format": "int64",
          "type": "integer"
        },
        "OtherCharges": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TransactionNotification"
          }
        },
        "threedSecure": {
          "$ref": "#/definitions/CreditCard3DS"
        },
        "WebhookType": {
          "enum": [
            "Charge",
            "Capture",
            "Dispute",
            "Refund",
            "InvoiceCreated",
            "SubscriptionCreated",
            "SubscriptionPaymentSuccess",
            "SubscriptionPaymentFailure",
            "SubscriptionCancel",
            "CreditCardExpired",
            "PrepaidUsageEnded",
            "CustomerCreated",
            "VendorCreated",
            "VendorUpdated",
            "PrepaidUsageLowCredits"
          ],
          "type": "string"
        },
        "NotificationType": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "NotificationAmount": {
      "type": "object",
      "properties": {
        "Amount": {
          "format": "double",
          "type": "number"
        },
        "Currency": {
          "type": "string"
        },
        "Discount": {
          "format": "double",
          "type": "number"
        },
        "Fee": {
          "format": "double",
          "type": "number"
        },
        "GiftCode": {
          "type": "string"
        },
        "NetAmount": {
          "format": "double",
          "type": "number"
        },
        "Shipping": {
          "format": "double",
          "type": "number"
        },
        "Tax": {
          "format": "double",
          "type": "number"
        }
      }
    },
    "NotificationCreditCard": {
      "type": "object",
      "properties": {
        "AVSResult": {
          "type": "string"
        },
        "CardCountry": {
          "type": "string"
        },
        "CVCResult": {
          "type": "string"
        },
        "Expiry": {
          "type": "string"
        },
        "First6": {
          "type": "string"
        },
        "Last4": {
          "type": "string"
        },
        "NameOnCard": {
          "type": "string"
        },
        "Token": {
          "type": "string"
        }
      }
    },
    "NotificationCustomer": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "Address": {
          "type": "string"
        },
        "City": {
          "type": "string"
        },
        "CodiceFiscale": {
          "type": "string"
        },
        "CodiceUffico": {
          "type": "string"
        },
        "Country": {
          "type": "string"
        },
        "CustomerAreaLink": {
          "type": "string"
        },
        "Email": {
          "type": "string"
        },
        "FullName": {
          "type": "string"
        },
        "IPCountry": {
          "type": "string"
        },
        "MainActivity": {
          "type": "string"
        },
        "PecEmail": {
          "type": "string"
        },
        "Phone": {
          "type": "string"
        },
        "ShippingAddress": {
          "type": "string"
        },
        "ShippingCity": {
          "type": "string"
        },
        "ShippingCountry": {
          "type": "string"
        },
        "ShippingState": {
          "type": "string"
        },
        "ShippingZIP": {
          "type": "string"
        },
        "State": {
          "type": "string"
        },
        "TaxAuthority": {
          "type": "string"
        },
        "Token": {
          "type": "string"
        },
        "UniqueCustomerID": {
          "type": "string"
        },
        "Website": {
          "type": "string"
        },
        "ZIP": {
          "type": "string"
        }
      }
    },
    "NotificationOrderUnit": {
      "type": "object",
      "properties": {
        "OrderUnitID": {
          "format": "int64",
          "type": "integer"
        },
        "Price": {
          "format": "double",
          "type": "number"
        },
        "Tax": {
          "format": "double",
          "type": "number"
        },
        "ProductID": {
          "format": "int64",
          "type": "integer"
        },
        "Title": {
          "type": "string"
        },
        "Quantity": {
          "format": "double",
          "type": "number"
        },
        "Shipping": {
          "format": "double",
          "type": "number"
        },
        "ShippingMethod": {
          "type": "string"
        },
        "TotalCost": {
          "format": "double",
          "type": "number"
        },
        "Type": {
          "type": "string"
        },
        "BillingModel": {
          "type": "string"
        },
        "PrepaidUsageCode": {
          "type": "string"
        },
        "PrepaidUsage": {
          "type": "boolean"
        },
        "Vendors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VendorData"
          }
        }
      }
    },
    "TransactionMetadata": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string"
        },
        "Value": {
          "type": "string"
        }
      }
    },
    "InvoiceDTO": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "URL": {
          "description": "Navigate to this URL to retrieve invoice as PDF",
          "type": "string"
        },
        "InvoiceCode": {
          "type": "string"
        },
        "Title": {
          "type": "string"
        },
        "Description": {
          "type": "string"
        },
        "CustomerID": {
          "format": "int64",
          "type": "integer"
        },
        "Customer": {
          "$ref": "#/definitions/CustomerDTO"
        },
        "VendorID": {
          "format": "int64",
          "type": "integer"
        },
        "Vendor": {
          "$ref": "#/definitions/VendorDTO"
        },
        "OrderNumber": {
          "type": "string"
        },
        "Currency": {
          "type": "string"
        },
        "ProjectGateWayID": {
          "format": "int64",
          "type": "integer"
        },
        "Date": {
          "format": "date-time",
          "type": "string"
        },
        "DueOn": {
          "format": "date-time",
          "type": "string"
        },
        "InvoiceType": {
          "type": "string"
        },
        "Status": {
          "type": "string"
        },
        "UseCustomShippingAddress": {
          "type": "boolean"
        },
        "ShippingAddress1": {
          "type": "string"
        },
        "ShippingAddress2": {
          "type": "string"
        },
        "ShippingCountry": {
          "type": "string"
        },
        "ShippingState": {
          "type": "string"
        },
        "ShippingZip": {
          "type": "string"
        },
        "UseCustomBillingAddress": {
          "type": "boolean"
        },
        "BillingAddress1": {
          "type": "string"
        },
        "BillingAddress2": {
          "type": "string"
        },
        "BillingCountry": {
          "type": "string"
        },
        "BillingState": {
          "type": "string"
        },
        "BillingZip": {
          "type": "string"
        },
        "IsDeleted": {
          "type": "boolean"
        },
        "Total": {
          "format": "double",
          "type": "number"
        },
        "CanBePaid": {
          "type": "boolean"
        },
        "Metadata": {
          "type": "string"
        },
        "OrderUnits": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OrderUnitDTO"
          }
        },
        "InvoiceNoDisplay": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "CreditCard3DS": {
      "type": "object",
      "properties": {
        "ID": {
          "type": "string"
        },
        "Currency": {
          "type": "string"
        },
        "Amount": {
          "format": "double",
          "type": "number"
        },
        "FormAction": {
          "type": "string"
        },
        "Method": {
          "type": "string"
        },
        "Data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreditCard3DSData"
          }
        },
        "getData": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreditCard3DSData"
          }
        }
      }
    },
    "VendorData": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "CommisionPercent": {
          "format": "double",
          "type": "number"
        },
        "CommisionPercentOverride": {
          "format": "double",
          "type": "number"
        },
        "CommisionAmountOverride": {
          "format": "double",
          "type": "number"
        }
      }
    },
    "OrderUnitDTO": {
      "type": "object",
      "properties": {
        "Title": {
          "type": "string"
        },
        "Description": {
          "type": "string"
        },
        "ProductID": {
          "format": "int64",
          "type": "integer"
        },
        "ProductType": {
          "description": "Service, Subscription, Goods",
          "type": "string"
        },
        "Price": {
          "format": "double",
          "type": "number"
        },
        "Quantity": {
          "format": "int32",
          "type": "integer"
        },
        "Currency": {
          "type": "string"
        },
        "Tax": {
          "format": "double",
          "type": "number"
        },
        "Total": {
          "format": "double",
          "type": "number"
        },
        "BillingModel": {
          "description": "FixedPrice, Volume, Tier",
          "type": "string"
        },
        "PrepaidUsage": {
          "type": "boolean"
        },
        "PrepaidUsageCode": {
          "type": "string"
        },
        "Vendors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VendorData"
          }
        }
      }
    },
    "CreditCard3DSData": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string"
        },
        "Value": {
          "type": "string"
        }
      }
    },
    "TokenCardDTO": {
      "required": [
        "firstName",
        "lastName",
        "billingAddress",
        "zip",
        "email",
        "number",
        "month",
        "year",
        "cvv"
      ],
      "type": "object",
      "properties": {
        "publicKey": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "Amount": {
          "type": "string"
        },
        "Currency": {
          "type": "string"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "billingAddress": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "number": {
          "type": "string"
        },
        "month": {
          "type": "string"
        },
        "year": {
          "type": "string"
        },
        "cvv": {
          "type": "string"
        },
        "customerIP": {
          "type": "string"
        },
        "subdomain": {
          "type": "string"
        },
        "threedSecure": {
          "$ref": "#/definitions/CreditCard3DS"
        }
      }
    },
    "TransactionDTO": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "TransactionCode": {
          "type": "string"
        },
        "ProviderTransactionCode": {
          "type": "string"
        },
        "ProviderMandateID": {
          "description": "Used for SEPA transactions",
          "type": "string"
        },
        "Project": {
          "$ref": "#/definitions/ProjectDTO"
        },
        "ProjectGateWay": {
          "$ref": "#/definitions/ProjectGateWayDTO"
        },
        "PublicCheckoutPage": {
          "$ref": "#/definitions/PublicCheckoutPageDTO"
        },
        "Customer": {
          "$ref": "#/definitions/CustomerDTO"
        },
        "CreditCard": {
          "$ref": "#/definitions/CreditCardDTO"
        },
        "PaymentType": {
          "type": "string"
        },
        "BankAccount": {
          "$ref": "#/definitions/BankAccountDTO"
        },
        "InvoiceID": {
          "format": "int64",
          "type": "integer"
        },
        "CouponCode": {
          "type": "string"
        },
        "CouponCodeRedeemed": {
          "type": "boolean"
        },
        "OrderUnits": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OrderUnitDTO"
          }
        },
        "TransactionStatus": {
          "description": "Successful, Authorized, Unsuccessful, InProcess, Refunded, Dispute, Change, Error",
          "type": "string"
        },
        "TransactionType": {
          "description": "Payment, Subscription, BillableAddon, Test",
          "type": "string"
        },
        "AmountToReceive": {
          "format": "double",
          "type": "number"
        },
        "Fee": {
          "format": "double",
          "type": "number"
        },
        "Gross": {
          "format": "double",
          "type": "number"
        },
        "AmountReceived": {
          "format": "double",
          "type": "number"
        },
        "ClientIP": {
          "type": "string"
        },
        "CurrencyCustomer": {
          "type": "string"
        },
        "CurrencyOriginal": {
          "type": "string"
        },
        "CurrencyPaid": {
          "type": "string"
        },
        "IsDeleted": {
          "type": "boolean"
        },
        "ProviderResponse": {
          "type": "string"
        },
        "CVVResponse": {
          "type": "string"
        },
        "AVSResponse": {
          "type": "string"
        },
        "CAVVResponse": {
          "type": "string"
        },
        "IPCountryName": {
          "type": "string"
        },
        "IPCityName": {
          "type": "string"
        },
        "IPZipCode": {
          "type": "string"
        },
        "IPLatitude": {
          "type": "string"
        },
        "IPLongitude": {
          "type": "string"
        },
        "IsLive": {
          "type": "boolean"
        },
        "ProviderDateTime": {
          "format": "date-time",
          "type": "string"
        },
        "CreatedDatetime": {
          "format": "date-time",
          "type": "string"
        },
        "Metadata": {
          "type": "string"
        }
      }
    },
    "ProjectDTO": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "Subdomain": {
          "type": "string"
        }
      }
    },
    "ProjectGateWayDTO": {
      "type": "object",
      "properties": {
        "FriendlyName": {
          "type": "string"
        },
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "isCascadable": {
          "type": "boolean"
        },
        "isTrusted": {
          "type": "boolean"
        }
      }
    },
    "PublicCheckoutPageDTO": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "PageNickname": {
          "type": "string"
        }
      }
    },
    "CustomerEtableDTO": {
      "required": [
        "ProjectSubdomain",
        "BillingAddress1",
        "BillingCountry",
        "BillingZip"
      ],
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "Token": {
          "type": "string"
        },
        "Active": {
          "type": "boolean"
        },
        "Email": {
          "type": "string"
        },
        "ProjectSubdomain": {
          "description": "Project subdomain where customer belongs to",
          "type": "string"
        },
        "FirstName": {
          "type": "string"
        },
        "LastName": {
          "type": "string"
        },
        "Company": {
          "type": "string"
        },
        "Phone": {
          "type": "string"
        },
        "Website": {
          "pattern": "^http(s?)\\:\\/\\/[0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*(\\:(0-9)*)*(\\/?)([a-zA-Z0-9\\-\\.\\?\\,\\'\\/\\\\\\+&%\\$#=_]*)?$",
          "type": "string"
        },
        "MainActivity": {
          "type": "string"
        },
        "TaxAuthority": {
          "type": "string"
        },
        "UniqueCustomerID": {
          "type": "string"
        },
        "ShippingAddress1": {
          "type": "string"
        },
        "ShippingAddress2": {
          "type": "string"
        },
        "ShippingCountry": {
          "type": "string"
        },
        "ShippingState": {
          "type": "string"
        },
        "ShippingCity": {
          "type": "string"
        },
        "ShippingZip": {
          "type": "string"
        },
        "VatNumber": {
          "type": "string"
        },
        "VatCountry": {
          "type": "string"
        },
        "UseSameAsBilling": {
          "type": "boolean"
        },
        "BillingAddress1": {
          "type": "string"
        },
        "BillingAddress2": {
          "type": "string"
        },
        "BillingCountry": {
          "type": "string"
        },
        "BillingState": {
          "type": "string"
        },
        "BillingCity": {
          "type": "string"
        },
        "BillingZip": {
          "type": "string"
        },
        "CustomerAreaLink": {
          "type": "string"
        },
        "CreditCards": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreditCardDTO"
          }
        },
        "BankAccounts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BankAccountDTO"
          }
        },
        "ProviderData": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ProviderDataDTO"
          }
        }
      }
    },
    "BusinessDTO": {
      "required": [
        "Name",
        "customerVatNumber"
      ],
      "type": "object",
      "properties": {
        "Name": {
          "type": "string"
        },
        "customerVatNumber": {
          "type": "string"
        },
        "Email": {
          "pattern": "^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",
          "type": "string"
        },
        "FirstName": {
          "type": "string"
        },
        "LastName": {
          "type": "string"
        },
        "Company": {
          "type": "string"
        },
        "Phone": {
          "pattern": "^[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$",
          "type": "string"
        },
        "UniqueCustomerID": {
          "type": "string"
        }
      }
    },
    "SubscriptionDTO": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "TransactionCode": {
          "type": "string"
        },
        "InvoiceCode": {
          "type": "string"
        },
        "ProviderID": {
          "type": "string"
        },
        "OrderUnit": {
          "$ref": "#/definitions/OrderUnitDTO"
        },
        "CreditCard": {
          "$ref": "#/definitions/CreditCardDTO"
        },
        "BankAccount": {
          "$ref": "#/definitions/BankAccountDTO"
        },
        "PaymentType": {
          "type": "string"
        },
        "CouponCode": {
          "type": "string"
        },
        "Created": {
          "format": "date-time",
          "type": "string"
        },
        "IsLive": {
          "type": "boolean"
        },
        "Active": {
          "type": "boolean"
        },
        "CancelDateTime": {
          "format": "date-time",
          "type": "string"
        },
        "IsCanceled": {
          "type": "boolean"
        },
        "CancelReason": {
          "type": "string"
        }
      }
    },
    "CreateInvoiceRequest": {
      "required": [
        "Currency",
        "Title",
        "Date",
        "DueDate"
      ],
      "type": "object",
      "properties": {
        "CustomerID": {
          "format": "int64",
          "type": "integer"
        },
        "CustomerEmail": {
          "type": "string"
        },
        "VendorID": {
          "format": "int64",
          "type": "integer"
        },
        "VendorEmail": {
          "type": "string"
        },
        "Currency": {
          "description": "Currency code in ISO4217 format",
          "type": "string"
        },
        "InvoiceProducts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InvoiceProduct"
          }
        },
        "InvoiceOrderUnits": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InvoiceOrderUnit"
          }
        },
        "Title": {
          "type": "string"
        },
        "Description": {
          "type": "string"
        },
        "Date": {
          "format": "date-time",
          "type": "string"
        },
        "DueDate": {
          "format": "date-time",
          "type": "string"
        },
        "InvoiceStatus": {
          "description": "Draft, InProcess, Paid, Failed, PastDue, Voided, Refunded",
          "enum": [
            "Draft",
            "InProcess",
            "Paid",
            "Failed",
            "PastDue",
            "Voided",
            "Refunded"
          ],
          "type": "string"
        },
        "Metadata": {
          "description": "Custom data for invoice (name: value)",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "InvoiceProduct": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "ProductType": {
          "description": "Product type (Service, Subscription, Goods)",
          "type": "string"
        },
        "Title": {
          "type": "string"
        },
        "Description": {
          "type": "string"
        },
        "Price": {
          "format": "double",
          "type": "number"
        },
        "Tax": {
          "format": "double",
          "description": "Product vat rate",
          "type": "number"
        },
        "Quantity": {
          "format": "int32",
          "type": "integer"
        },
        "SetupFee": {
          "format": "double",
          "type": "number"
        },
        "SecurityDeposit": {
          "format": "double",
          "type": "number"
        },
        "Period": {
          "description": "Subscription charge period (Day, Month, Term, Semester, Year)",
          "type": "string"
        },
        "PeriodInterval": {
          "format": "int32",
          "description": "Subscription charge period interval",
          "type": "integer"
        },
        "CalendarBilling": {
          "description": "Subscription calendar billing in case of Month period (SignupDate, Day01, Day02, ... Day28, DayLast)",
          "type": "string"
        }
      }
    },
    "InvoiceOrderUnit": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        }
      }
    },
    "CalculateChangeSubscriptionDTO": {
      "type": "object",
      "properties": {
        "Text": {
          "type": "string"
        },
        "FirstChargeAmount": {
          "format": "double",
          "type": "number"
        },
        "ChangeDate": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "ChangeCreditCardData": {
      "type": "object",
      "properties": {
        "SubscriptionIDs": {
          "description": "The subscription ids",
          "type": "array",
          "items": {
            "format": "int64",
            "type": "integer"
          }
        },
        "CreditCardToken": {
          "description": "Credit card temp token obtained through nummuspay.js",
          "type": "string"
        }
      }
    },
    "CalculateTaxDTO": {
      "required": [
        "ProjectSubdomain",
        "Customer",
        "TaxType"
      ],
      "type": "object",
      "properties": {
        "ProjectSubdomain": {
          "type": "string"
        },
        "Customer": {
          "$ref": "#/definitions/CustomerDTO"
        },
        "TaxType": {
          "description": "DigitalProduct, PhysicalProduct, Unknown",
          "enum": [
            "DigitalProduct",
            "PhysicalProduct",
            "Unknown"
          ],
          "type": "string"
        }
      }
    },
    "VatTaxCheck": {
      "type": "object",
      "properties": {
        "Tax": {
          "format": "double",
          "description": "Tax percentage %",
          "type": "number"
        },
        "CompanyName": {
          "description": "Company name obtained via vat check system",
          "type": "string"
        },
        "TaxDisplay": {
          "description": "Tax diplay text in project's culture",
          "type": "string"
        }
      }
    },
    "ApiTokenRequest": {
      "required": [
        "username",
        "password"
      ],
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "TransactionQuery": {
      "type": "object",
      "properties": {
        "DateFrom": {
          "format": "date-time",
          "type": "string"
        },
        "DateTo": {
          "format": "date-time",
          "type": "string"
        },
        "transactionID": {
          "type": "string"
        }
      }
    },
    "ReconciliationResponse": {
      "type": "object",
      "properties": {
        "TotalTransactions": {
          "type": "string"
        },
        "ErrorMessage": {
          "type": "string"
        },
        "Transactions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TransactionReconciliationDTO"
          }
        }
      }
    },
    "TransactionReconciliationDTO": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "TransactionCode": {
          "type": "string"
        },
        "ProviderTransactionCode": {
          "type": "string"
        },
        "ProviderMandateID": {
          "type": "string"
        },
        "Project": {
          "$ref": "#/definitions/ProjectDTO"
        },
        "ProjectGateWay": {
          "$ref": "#/definitions/ProjectGateWayDTO"
        },
        "Customer": {
          "$ref": "#/definitions/CustomerReconciliationDTO"
        },
        "CreditCard": {
          "$ref": "#/definitions/CreditCardDTO"
        },
        "PaymentType": {
          "type": "string"
        },
        "TransactionStatus": {
          "type": "string"
        },
        "TransactionType": {
          "type": "string"
        },
        "AmountToReceive": {
          "format": "double",
          "type": "number"
        },
        "Fee": {
          "format": "double",
          "type": "number"
        },
        "Gross": {
          "format": "double",
          "type": "number"
        },
        "AmountReceived": {
          "format": "double",
          "type": "number"
        },
        "ClientIP": {
          "type": "string"
        },
        "CurrencyCustomer": {
          "type": "string"
        },
        "CurrencyOriginal": {
          "type": "string"
        },
        "CurrencyPaid": {
          "type": "string"
        },
        "IsDeleted": {
          "type": "boolean"
        },
        "ProviderResponse": {
          "type": "string"
        },
        "CVVResponse": {
          "type": "string"
        },
        "AVSResponse": {
          "type": "string"
        },
        "CAVVResponse": {
          "type": "string"
        },
        "IPCountryName": {
          "type": "string"
        },
        "IPCityName": {
          "type": "string"
        },
        "IPZipCode": {
          "type": "string"
        },
        "IPLatitude": {
          "type": "string"
        },
        "IPLongitude": {
          "type": "string"
        },
        "IsLive": {
          "type": "boolean"
        },
        "ProviderDateTime": {
          "format": "date-time",
          "type": "string"
        },
        "CreatedDatetime": {
          "format": "date-time",
          "type": "string"
        },
        "Metadata": {
          "type": "string"
        }
      }
    },
    "CustomerReconciliationDTO": {
      "required": [
        "Email",
        "FirstName",
        "LastName",
        "BillingAddress1",
        "BillingCountry",
        "BillingZip"
      ],
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "Token": {
          "type": "string"
        },
        "Active": {
          "type": "boolean"
        },
        "Email": {
          "type": "string"
        },
        "FirstName": {
          "type": "string"
        },
        "LastName": {
          "type": "string"
        },
        "Phone": {
          "type": "string"
        },
        "BillingAddress1": {
          "type": "string"
        },
        "BillingAddress2": {
          "type": "string"
        },
        "BillingCountry": {
          "type": "string"
        },
        "BillingState": {
          "type": "string"
        },
        "BillingCity": {
          "type": "string"
        },
        "customerIP": {
          "type": "string"
        },
        "BillingZip": {
          "type": "string"
        }
      }
    },
    "TransactionModify": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "TransactionCode": {
          "type": "string"
        },
        "Vendors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VendorDTO"
          }
        },
        "Products": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TransactionModifyProduct"
          }
        },
        "Amount": {
          "format": "double",
          "description": "Amount for partial refund",
          "type": "number"
        }
      }
    },
    "TransactionModifyProduct": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "type": "integer"
        },
        "Vendors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VendorDTO"
          }
        }
      }
    },
    "ReleaseFundsDTO": {
      "type": "object",
      "properties": {
        "ID": {
          "format": "int64",
          "description": "Vendor ID",
          "type": "integer"
        },
        "Amount": {
          "format": "double",
          "description": "Total amount in vendor's default currency",
          "type": "number"
        },
        "TransactionID": {
          "format": "int64",
          "description": "Transaction ID",
          "type": "integer"
        }
      }
    }
  },
  "securityDefinitions": {
    "Token": {
      "type": "apiKey",
      "description": "Bearer token",
      "name": "Authorization",
      "in": "header"
    }
  }
}
