---
updatedAt: 2025-06-16T20:55:42.000Z
agentTools:
  projectIndex: https://docs.payarc.net/llms.txt
---

# Residual Details

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "payarc-sandbox",
    "version": "1.2.0"
  },
  "servers": [
    {
      "url": "https://testapi.payarc.net"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-default": "YourAPIBearerKey",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/residual-details": {
      "get": {
        "summary": "Residual Details",
        "description": "",
        "operationId": "my-residuals-select-bank",
        "parameters": [
          {
            "name": "from_date",
            "in": "query",
            "description": "If it is empty, it takes the 1st day of the current month. Example: 2024-10-01",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "description": "If it is empty, it takes the current day. Example: 2024-10-23",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tsys_mid",
            "in": "query",
            "description": "Nullable | Digits:15",
            "schema": {
              "type": "string",
              "default": "null"
            }
          },
          {
            "name": "agent_id",
            "in": "query",
            "description": "This field is used for filtering merchants. If the Authenticated user is an agent, it takes their id and filters the merchants by it. Alternatively the agent_id can be passed as a parameter to filter. If both are true then the authenticated user's id take precedence.",
            "schema": {
              "type": "string",
              "default": "null"
            }
          },
          {
            "name": "bank",
            "in": "query",
            "description": "If it is empty, it takes all the banks from the lov values for banks",
            "schema": {
              "type": "string",
              "enum": [
                "5670",
                "6719",
                "9267"
              ]
            }
          },
          {
            "name": "view_agent_id",
            "in": "query",
            "description": "Return all of the accounts where view_agent_it is primary agent. And view_agent_id should be secondary to the Authenticated user",
            "schema": {
              "type": "string",
              "default": "null"
            }
          },
          {
            "name": "excel",
            "in": "query",
            "description": "If it set to true, provides additional fields with merchant and template data",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "It limits the results",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": null
            }
          },
          {
            "name": "merchant_id",
            "in": "query",
            "description": "This field is used for filtering results. The value should be crypted account id",
            "schema": {
              "type": "string",
              "default": "null"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"header_data\": [\n        {\n            \"column_name\": \"Merchant ID\",\n            \"sortable\": true,\n            \"column_id\": \"merchant_id\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"DBA Name\",\n            \"sortable\": true,\n            \"column_id\": \"dba_name\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"Fee Category Description\",\n            \"sortable\": true,\n            \"column_id\": \"fee_category_description\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"Sales Count\",\n            \"sortable\": true,\n            \"column_id\": \"sales_count\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Sales Amount\",\n            \"sortable\": true,\n            \"column_id\": \"sales_amount\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Credit Count\",\n            \"sortable\": true,\n            \"column_id\": \"credit_count\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Credit Amount\",\n            \"sortable\": true,\n            \"column_id\": \"credit_amount\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Interchange Fee\",\n            \"sortable\": true,\n            \"column_id\": \"interchange_fee\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Interchange Percent Rate\",\n            \"sortable\": true,\n            \"column_id\": \"interchange_percent_rate\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Interchange Per Item Rate\",\n            \"sortable\": true,\n            \"column_id\": \"interchange_per_item_rate\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Fee Item Name\",\n            \"sortable\": true,\n            \"column_id\": \"fee_item_name\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"Statement Description\",\n            \"sortable\": true,\n            \"column_id\": \"statement_description\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"Report Date\",\n            \"sortable\": true,\n            \"column_id\": \"report_date\",\n            \"type\": \"date\"\n        },\n        {\n            \"column_name\": \"Payarc Calculated Expense\",\n            \"sortable\": true,\n            \"column_id\": \"payarc_calculated_expense\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Payarc Calculated Income\",\n            \"sortable\": true,\n            \"column_id\": \"payarc_calculated_income\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Payarc Calculated Profit\",\n            \"sortable\": true,\n            \"column_id\": \"payarc_calculated_profit\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Payarc Calculated Residual\",\n            \"sortable\": true,\n            \"column_id\": \"payarc_calculated_residual\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Payarc Agent ID\",\n            \"sortable\": true,\n            \"column_id\": \"payarc_agent_id\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"Created At\",\n            \"sortable\": true,\n            \"column_id\": \"created_at\",\n            \"type\": \"date\"\n        },\n        {\n            \"column_name\": \"Updated At\",\n            \"sortable\": true,\n            \"column_id\": \"updated_at\",\n            \"type\": \"date\"\n        },\n        {\n            \"column_name\": \"Template ID\",\n            \"sortable\": true,\n            \"column_id\": \"template_id\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"DBA City\",\n            \"sortable\": true,\n            \"column_id\": \"dba_city\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"DBA State Country\",\n            \"sortable\": true,\n            \"column_id\": \"dba_state\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"DBA ZIP\",\n            \"sortable\": true,\n            \"column_id\": \"dba_zip\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"Merchant Status\",\n            \"sortable\": true,\n            \"column_id\": \"merchant_status\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"Date Closed\",\n            \"sortable\": true,\n            \"column_id\": \"date_closed\",\n            \"type\": \"date\"\n        },\n        {\n            \"column_name\": \"Payarc Calculated Split\",\n            \"sortable\": true,\n            \"column_id\": \"payarc_split_used\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Pricing Fee Item Percent\",\n            \"sortable\": true,\n            \"column_id\": \"pricing_fee_item_percent\",\n            \"type\": \"string\"\n        },\n        {\n            \"column_name\": \"Pricing Fee Item per Item\",\n            \"sortable\": true,\n            \"column_id\": \"pricing_fee_item_per_item\",\n            \"type\": \"currency\"\n        },\n        {\n            \"column_name\": \"Income Amount\",\n            \"sortable\": true,\n            \"column_id\": \"income_amount\",\n            \"type\": \"currency\"\n        }\n    ],\n    \"row_data\": [\n    {\n            \"merchant_id\": \"567000000000018\",\n            \"dba_name\": null,\n            \"fee_category_description\": \"MISC Per Item Fees\",\n            \"sales_count\": \"0000000001\",\n            \"sales_amount\": \"000000000000.00\",\n            \"credit_count\": \"0000000000\",\n            \"credit_amount\": \"000000000000.00\",\n            \"interchange_fee\": \"000000000000.00\",\n            \"interchange_percent_rate\": \"000.0000\",\n            \"interchange_per_item_rate\": \"000000.00000\",\n            \"fee_item_name\": null,\n            \"statement_description\": null,\n            \"report_date\": \"2020-11-01\",\n            \"payarc_calculated_expense\": null,\n            \"payarc_calculated_income\": null,\n            \"payarc_calculated_profit\": null,\n            \"payarc_calculated_residual\": null,\n            \"payarc_agent_id\": null,\n            \"created_at\": \"2020-10-31T12:06:56.000000Z\",\n            \"updated_at\": \"2021-10-25T11:23:37.000000Z\",\n            \"template_id\": null,\n            \"dba_city\": null,\n            \"dba_state\": null,\n            \"dba_zip\": null,\n            \"merchant_status\": null,\n            \"date_closed\": null,\n            \"payarc_split_used\": null,\n            \"pricing_fee_item_percent\": \"000.0000\",\n            \"pricing_fee_item_per_item\": \"000000.00000\",\n            \"income_amount\": \"000000000000.00\",\n            \"object\": \"ResidualRecordType2\",\n            \"id\": \"lwj3enjwdqwm7pka\"\n        }\n    ],\n    \"meta\": {\n        \"include\": [],\n        \"custom\": [],\n        \"pagination\": {\n            \"total\": 0,\n            \"count\": 0,\n            \"per_page\": 10,\n            \"current_page\": 1,\n            \"total_pages\": 1,\n            \"links\": {}\n        }\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "header_data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "column_name": {
                            "type": "string",
                            "example": "Merchant ID"
                          },
                          "sortable": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "column_id": {
                            "type": "string",
                            "example": "merchant_id"
                          },
                          "type": {
                            "type": "string",
                            "example": "string"
                          }
                        }
                      }
                    },
                    "row_data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "merchant_id": {
                            "type": "string",
                            "example": "567000000000018"
                          },
                          "dba_name": {},
                          "fee_category_description": {
                            "type": "string",
                            "example": "MISC Per Item Fees"
                          },
                          "sales_count": {
                            "type": "string",
                            "example": "0000000001"
                          },
                          "sales_amount": {
                            "type": "string",
                            "example": "000000000000.00"
                          },
                          "credit_count": {
                            "type": "string",
                            "example": "0000000000"
                          },
                          "credit_amount": {
                            "type": "string",
                            "example": "000000000000.00"
                          },
                          "interchange_fee": {
                            "type": "string",
                            "example": "000000000000.00"
                          },
                          "interchange_percent_rate": {
                            "type": "string",
                            "example": "000.0000"
                          },
                          "interchange_per_item_rate": {
                            "type": "string",
                            "example": "000000.00000"
                          },
                          "fee_item_name": {},
                          "statement_description": {},
                          "report_date": {
                            "type": "string",
                            "example": "2020-11-01"
                          },
                          "payarc_calculated_expense": {},
                          "payarc_calculated_income": {},
                          "payarc_calculated_profit": {},
                          "payarc_calculated_residual": {},
                          "payarc_agent_id": {},
                          "created_at": {
                            "type": "string",
                            "example": "2020-10-31T12:06:56.000000Z"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2021-10-25T11:23:37.000000Z"
                          },
                          "template_id": {},
                          "dba_city": {},
                          "dba_state": {},
                          "dba_zip": {},
                          "merchant_status": {},
                          "date_closed": {},
                          "payarc_split_used": {},
                          "pricing_fee_item_percent": {
                            "type": "string",
                            "example": "000.0000"
                          },
                          "pricing_fee_item_per_item": {
                            "type": "string",
                            "example": "000000.00000"
                          },
                          "income_amount": {
                            "type": "string",
                            "example": "000000000000.00"
                          },
                          "object": {
                            "type": "string",
                            "example": "ResidualRecordType2"
                          },
                          "id": {
                            "type": "string",
                            "example": "lwj3enjwdqwm7pka"
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "include": {
                          "type": "array"
                        },
                        "custom": {
                          "type": "array"
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "example": 0,
                              "default": 0
                            },
                            "count": {
                              "type": "integer",
                              "example": 0,
                              "default": 0
                            },
                            "per_page": {
                              "type": "integer",
                              "example": 10,
                              "default": 0
                            },
                            "current_page": {
                              "type": "integer",
                              "example": 1,
                              "default": 0
                            },
                            "total_pages": {
                              "type": "integer",
                              "example": 1,
                              "default": 0
                            },
                            "links": {
                              "type": "object",
                              "properties": {}
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"Unauthenticated.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthenticated."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"message\": \"The given data was invalid.\",\n    \"errors\": {\n        \"tsys_mid\": [\n            \"The tsys mid must be 15 digits.\"\n        ]\n    }\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "The given data was invalid."
                        },
                        "errors": {
                          "type": "object",
                          "properties": {
                            "bank": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "example": "Please use only 5670, 6719, 8999, 9267, 9999 bank numbers!"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "The given data was invalid."
                        },
                        "errors": {
                          "type": "object",
                          "properties": {
                            "tsys_mid": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "example": "The tsys mid must be 15 digits."
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```