<?xml version='1.0' encoding='UTF-8'?>
<FilingSummary>
  <Version>3.3.1.900</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>381</ContextCount>
  <ElementCount>651</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>107</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>10</UnitCount>
  <MyReports>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00100 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00105 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00200 - Statement - Consolidated Statements of Income and Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedStatementsOfIncomeAndComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Income and Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00300 - Statement - Consolidated Statements of Changes in Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedStatementsOfChangesInStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00305 - Statement - Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedStatementsOfChangesInStockholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Changes in Stockholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>00400 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>10101 - Disclosure - Summary of significant accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of significant accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>10201 - Disclosure - Merger accounting</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureMergerAccounting</Role>
      <ShortName>Merger accounting</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>10301 - Disclosure - Cash and due from banks</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureCashAndDueFromBanks</Role>
      <ShortName>Cash and due from banks</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>10401 - Disclosure - Investment securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecurities</Role>
      <ShortName>Investment securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>10501 - Disclosure - Loans, net and allowance for loan losses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLosses</Role>
      <ShortName>Loans, net and allowance for loan losses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>10601 - Disclosure - Off-balance sheet financial instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOffBalanceSheetFinancialInstruments</Role>
      <ShortName>Off-balance sheet financial instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>10701 - Disclosure - Premises and equipment, net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosurePremisesAndEquipmentNet</Role>
      <ShortName>Premises and equipment, net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>10801 - Disclosure - Intangible assets, net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIntangibleAssetsNet</Role>
      <ShortName>Intangible assets, net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>10901 - Disclosure - Other assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherAssets</Role>
      <ShortName>Other assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>11001 - Disclosure - Deposits</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureDeposits</Role>
      <ShortName>Deposits</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>11101 - Disclosure - Short-term borrowings</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureShortTermBorrowings</Role>
      <ShortName>Short-term borrowings</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>11201 - Disclosure - Long-term debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLongTermDebt</Role>
      <ShortName>Long-term debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>11301 - Disclosure - Fair value of financial instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueOfFinancialInstruments</Role>
      <ShortName>Fair value of financial instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>11401 - Disclosure - Stock plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureStockPlans</Role>
      <ShortName>Stock plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>11501 - Disclosure - Employee benefit plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlans</Role>
      <ShortName>Employee benefit plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>11601 - Disclosure - Income taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>11701 - Disclosure - Parent Company financial statements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureParentCompanyFinancialStatements</Role>
      <ShortName>Parent Company financial statements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>11801 - Disclosure - Regulatory matters</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureRegulatoryMatters</Role>
      <ShortName>Regulatory matters</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>11901 - Disclosure - Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureContingencies</Role>
      <ShortName>Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>12001 - Disclosure - Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureComprehensiveIncome</Role>
      <ShortName>Comprehensive Income</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>12101 - Disclosure - Summary of quarterly financial information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfQuarterlyFinancialInformation</Role>
      <ShortName>Summary of quarterly financial information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>20102 - Disclosure - Summary of significant accounting policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of significant accounting policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>30103 - Disclosure - Summary of significant accounting policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of significant accounting policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>30203 - Disclosure - Merger accounting (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureMergerAccountingTables</Role>
      <ShortName>Merger accounting (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureMergerAccounting</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>30403 - Disclosure - Investment securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecuritiesTables</Role>
      <ShortName>Investment securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecurities</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>30503 - Disclosure - Loans, net and allowance for loan losses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesTables</Role>
      <ShortName>Loans, net and allowance for loan losses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLosses</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>30603 - Disclosure - Off-balance sheet financial instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOffBalanceSheetFinancialInstrumentsTables</Role>
      <ShortName>Off-balance sheet financial instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureOffBalanceSheetFinancialInstruments</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>30703 - Disclosure - Premises and equipment, net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosurePremisesAndEquipmentNetTables</Role>
      <ShortName>Premises and equipment, net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosurePremisesAndEquipmentNet</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>30803 - Disclosure - Intangible assets, net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIntangibleAssetsNetTables</Role>
      <ShortName>Intangible assets, net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureIntangibleAssetsNet</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>30903 - Disclosure - Other assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherAssetsTables</Role>
      <ShortName>Other assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureOtherAssets</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>31003 - Disclosure - Deposits (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureDepositsTables</Role>
      <ShortName>Deposits (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureDeposits</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>31103 - Disclosure - Short-term borrowings (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureShortTermBorrowingsTables</Role>
      <ShortName>Short-term borrowings (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureShortTermBorrowings</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>31203 - Disclosure - Long-term debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLongTermDebtTables</Role>
      <ShortName>Long-term debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureLongTermDebt</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>31303 - Disclosure - Fair value of financial instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueOfFinancialInstrumentsTables</Role>
      <ShortName>Fair value of financial instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureFairValueOfFinancialInstruments</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>31403 - Disclosure - Stock plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureStockPlansTables</Role>
      <ShortName>Stock plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureStockPlans</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>31503 - Disclosure - Employee benefit plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansTables</Role>
      <ShortName>Employee benefit plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlans</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>31603 - Disclosure - Income taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIncomeTaxesTables</Role>
      <ShortName>Income taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureIncomeTaxes</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>31703 - Disclosure - Parent Company financial statements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureParentCompanyFinancialStatementsTables</Role>
      <ShortName>Parent Company financial statements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureParentCompanyFinancialStatements</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>31803 - Disclosure - Regulatory matters (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureRegulatoryMattersTables</Role>
      <ShortName>Regulatory matters (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureRegulatoryMatters</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>32003 - Disclosure - Comprehensive Income (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureComprehensiveIncomeTables</Role>
      <ShortName>Comprehensive Income (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureComprehensiveIncome</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>32103 - Disclosure - Summary of quarterly financial information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfQuarterlyFinancialInformationTables</Role>
      <ShortName>Summary of quarterly financial information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://imetrix.edgar-online.com/role/DisclosureSummaryOfQuarterlyFinancialInformation</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>40101 - Disclosure - Summary of significant accounting policies - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformationDetails</Role>
      <ShortName>Summary of significant accounting policies - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>40102 - Disclosure - Summary of significant accounting policies - Estimated Useful Lives of Related Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfSignificantAccountingPoliciesEstimatedUsefulLivesOfRelatedAssetsDetails</Role>
      <ShortName>Summary of significant accounting policies - Estimated Useful Lives of Related Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>40103 - Disclosure - Summary of significant accounting policies - Schedule of Earnings per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfSignificantAccountingPoliciesScheduleOfEarningsPerShareDetails</Role>
      <ShortName>Summary of significant accounting policies - Schedule of Earnings per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>40201 - Disclosure - Merger accounting - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureMergerAccountingAdditionalInformationDetails</Role>
      <ShortName>Merger accounting - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>40202 - Disclosure - Merger accounting - Calculation of Consideration Effectively Transferred (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureMergerAccountingCalculationOfConsiderationEffectivelyTransferredDetails</Role>
      <ShortName>Merger accounting - Calculation of Consideration Effectively Transferred (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>40203 - Disclosure - Merger accounting - Calculation of Consideration Effectively Transferred (Parenthetical) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureMergerAccountingCalculationOfConsiderationEffectivelyTransferredParentheticalDetails</Role>
      <ShortName>Merger accounting - Calculation of Consideration Effectively Transferred (Parenthetical) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>40204 - Disclosure - Merger accounting - Schedule of Acquired Assets and Assumed Liabilities Measured at Estimated Fair Values (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureMergerAccountingScheduleOfAcquiredAssetsAndAssumedLiabilitiesMeasuredAtEstimatedFairValuesDetails</Role>
      <ShortName>Merger accounting - Schedule of Acquired Assets and Assumed Liabilities Measured at Estimated Fair Values (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>55</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>40205 - Disclosure - Merger accounting - Summary of Acquired Nonimpaired and Impaired Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureMergerAccountingSummaryOfAcquiredNonimpairedAndImpairedLoansDetails</Role>
      <ShortName>Merger accounting - Summary of Acquired Nonimpaired and Impaired Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>56</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>40206 - Disclosure - Merger accounting - Summary of Merger Related Costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureMergerAccountingSummaryOfMergerRelatedCostsDetails</Role>
      <ShortName>Merger accounting - Summary of Merger Related Costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>57</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>40207 - Disclosure - Merger accounting - Schedule of Pro Forma Condensed Combined Financial Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureMergerAccountingScheduleOfProFormaCondensedCombinedFinancialInformationDetails</Role>
      <ShortName>Merger accounting - Schedule of Pro Forma Condensed Combined Financial Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>40301 - Disclosure - Cash and due from banks - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureCashAndDueFromBanksAdditionalInformationDetails</Role>
      <ShortName>Cash and due from banks - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>40401 - Disclosure - Investment securities - Amortized Cost and Fair Value of Investment Securities Aggregated by Investment Category (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecuritiesAmortizedCostAndFairValueOfInvestmentSecuritiesAggregatedByInvestmentCategoryDetails</Role>
      <ShortName>Investment securities - Amortized Cost and Fair Value of Investment Securities Aggregated by Investment Category (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>40402 - Disclosure - Investment securities - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecuritiesAdditionalInformationDetails</Role>
      <ShortName>Investment securities - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>40403 - Disclosure - Investment securities - Maturity Distribution of Debt Securities Classified as Available-for-Sale (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecuritiesMaturityDistributionOfDebtSecuritiesClassifiedAsAvailableForSaleDetails</Role>
      <ShortName>Investment securities - Maturity Distribution of Debt Securities Classified as Available-for-Sale (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>40404 - Disclosure - Investment securities - Summary of Amortized Cost and Fair Value of Securities by Contractual Maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecuritiesSummaryOfAmortizedCostAndFairValueOfSecuritiesByContractualMaturityDetails</Role>
      <ShortName>Investment securities - Summary of Amortized Cost and Fair Value of Securities by Contractual Maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>40405 - Disclosure - Investment securities - Fair Value and Unrealized Losses of Investment Securities in Continuous Unrealized Loss Position (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureInvestmentSecuritiesFairValueAndUnrealizedLossesOfInvestmentSecuritiesInContinuousUnrealizedLossPositionDetails</Role>
      <ShortName>Investment securities - Fair Value and Unrealized Losses of Investment Securities in Continuous Unrealized Loss Position (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>40501 - Disclosure - Loans, net and allowance for loan losses - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesAdditionalInformationDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>40502 - Disclosure - Loans, net and allowance for loan losses - Major Classifications of Loans Outstanding (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesMajorClassificationsOfLoansOutstandingDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Major Classifications of Loans Outstanding (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>40503 - Disclosure - Loans, net and allowance for loan losses - Changes in Allowance for Loan Losses Account by Major Classification of Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesChangesInAllowanceForLoanLossesAccountByMajorClassificationOfLoansDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Changes in Allowance for Loan Losses Account by Major Classification of Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>40504 - Disclosure - Loans, net and allowance for loan losses - Major Classification of Loans Portfolio Summarized by Credit Quality (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesMajorClassificationOfLoansPortfolioSummarizedByCreditQualityDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Major Classification of Loans Portfolio Summarized by Credit Quality (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>40505 - Disclosure - Loans, net and allowance for loan losses - Information Concerning Nonaccrual Loans by Major Loan Classification (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesInformationConcerningNonaccrualLoansByMajorLoanClassificationDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Information Concerning Nonaccrual Loans by Major Loan Classification (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>40506 - Disclosure - Loans, net and allowance for loan losses - Major Classification of Loans by Past Due Status (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesMajorClassificationOfLoansByPastDueStatusDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Major Classification of Loans by Past Due Status (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>40507 - Disclosure - Loans, net and allowance for loan losses - Summarize Information in Concerning to Impaired Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesSummarizeInformationInConcerningToImpairedLoansDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Summarize Information in Concerning to Impaired Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>40508 - Disclosure - Loans, net and allowance for loan losses - Summary of Changes in Accretible Yield and Nonaccretible Difference of Acquired Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesSummaryOfChangesInAccretibleYieldAndNonaccretibleDifferenceOfAcquiredLoansDetails</Role>
      <ShortName>Loans, net and allowance for loan losses - Summary of Changes in Accretible Yield and Nonaccretible Difference of Acquired Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>40509 - Disclosure - Loans, Net And Allowance For Loan Losses - Summary of Loans Terms Modified Resulting in Troubled Debt Restructurings (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLoansNetAndAllowanceForLoanLossesSummaryOfLoansTermsModifiedResultingInTroubledDebtRestructuringsDetails</Role>
      <ShortName>Loans, Net And Allowance For Loan Losses - Summary of Loans Terms Modified Resulting in Troubled Debt Restructurings (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>40601 - Disclosure - Off-balance sheet financial instruments - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOffBalanceSheetFinancialInstrumentsAdditionalInformationDetails</Role>
      <ShortName>Off-balance sheet financial instruments - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>40602 - Disclosure - Off-balance sheet financial instruments - Summary of Contractual Amounts of Off-balance Sheet Commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOffBalanceSheetFinancialInstrumentsSummaryOfContractualAmountsOfOffBalanceSheetCommitmentsDetails</Role>
      <ShortName>Off-balance sheet financial instruments - Summary of Contractual Amounts of Off-balance Sheet Commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>40701 - Disclosure - Premises and equipment, net - Summary of Premises and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosurePremisesAndEquipmentNetSummaryOfPremisesAndEquipmentDetails</Role>
      <ShortName>Premises and equipment, net - Summary of Premises and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>40702 - Disclosure - Premises and equipment, net - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosurePremisesAndEquipmentNetAdditionalInformationDetails</Role>
      <ShortName>Premises and equipment, net - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>40703 - Disclosure - Premises and equipment, net - Summary of Future Minimum Rental Commitments Under Operating Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosurePremisesAndEquipmentNetSummaryOfFutureMinimumRentalCommitmentsUnderOperatingLeasesDetails</Role>
      <ShortName>Premises and equipment, net - Summary of Future Minimum Rental Commitments Under Operating Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>40801 - Disclosure - Intangible assets, net - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIntangibleAssetsNetAdditionalInformationDetails</Role>
      <ShortName>Intangible assets, net - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>40802 - Disclosure - Intangible assets, net - Summary of Estimated Amortization Expense on Intangible Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIntangibleAssetsNetSummaryOfEstimatedAmortizationExpenseOnIntangibleAssetsDetails</Role>
      <ShortName>Intangible assets, net - Summary of Estimated Amortization Expense on Intangible Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>40901 - Disclosure - Other assets - Components of Other Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherAssetsComponentsOfOtherAssetsDetails</Role>
      <ShortName>Other assets - Components of Other Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>40902 - Disclosure - Other assets - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureOtherAssetsAdditionalInformationDetails</Role>
      <ShortName>Other assets - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>41001 - Disclosure - Deposits - Components of Interest-bearing and Noninterest-bearing Deposits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureDepositsComponentsOfInterestBearingAndNoninterestBearingDepositsDetails</Role>
      <ShortName>Deposits - Components of Interest-bearing and Noninterest-bearing Deposits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>41002 - Disclosure - Deposits - Schedule of Maturities of Time Deposits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureDepositsScheduleOfMaturitiesOfTimeDepositsDetails</Role>
      <ShortName>Deposits - Schedule of Maturities of Time Deposits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>41003 - Disclosure - Deposits - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureDepositsAdditionalInformationDetails</Role>
      <ShortName>Deposits - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>41101 - Disclosure - Short-term borrowings - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureShortTermBorrowingsAdditionalInformationDetails</Role>
      <ShortName>Short-term borrowings - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>41102 - Disclosure - Short-term borrowings - Summary of Short-term Borrowings (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureShortTermBorrowingsSummaryOfShortTermBorrowingsDetails</Role>
      <ShortName>Short-term borrowings - Summary of Short-term Borrowings (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>41201 - Disclosure - Long-term debt - Schedule of Long-term Debt Consisting of Advances (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLongTermDebtScheduleOfLongTermDebtConsistingOfAdvancesDetails</Role>
      <ShortName>Long-term debt - Schedule of Long-term Debt Consisting of Advances (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>41202 - Disclosure - Long-term debt - Schedule of Maturities of Long-term Debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLongTermDebtScheduleOfMaturitiesOfLongTermDebtDetails</Role>
      <ShortName>Long-term debt - Schedule of Maturities of Long-term Debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>41203 - Disclosure - Long-term debt - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureLongTermDebtAdditionalInformationDetails</Role>
      <ShortName>Long-term debt - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>41301 - Disclosure - Fair value of financial instruments - Schedule of Assets and Liabilities Measured at Fair Value on Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueOfFinancialInstrumentsScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair value of financial instruments - Schedule of Assets and Liabilities Measured at Fair Value on Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>41302 - Disclosure - Fair value of financial instruments - Schedule of Assets and Liabilities Measured at Fair Value on Nonrecurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueOfFinancialInstrumentsScheduleOfAssetsAndLiabilitiesMeasuredAtFairValueOnNonrecurringBasisDetails</Role>
      <ShortName>Fair value of financial instruments - Schedule of Assets and Liabilities Measured at Fair Value on Nonrecurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>41303 - Disclosure - Fair value of financial instruments - Additional Quantitative Information about Assets Measured at Fair Value on Nonrecurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueOfFinancialInstrumentsAdditionalQuantitativeInformationAboutAssetsMeasuredAtFairValueOnNonrecurringBasisDetails</Role>
      <ShortName>Fair value of financial instruments - Additional Quantitative Information about Assets Measured at Fair Value on Nonrecurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>41304 - Disclosure - Fair value of financial instruments - Carrying and Fair Values of Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureFairValueOfFinancialInstrumentsCarryingAndFairValuesOfFinancialInstrumentsDetails</Role>
      <ShortName>Fair value of financial instruments - Carrying and Fair Values of Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>94</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>41401 - Disclosure - Stock Plans - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureStockPlansAdditionalInformationDetails</Role>
      <ShortName>Stock Plans - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>95</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>41402 - Disclosure - Stock Plans - Summary of Stock Option Plan (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureStockPlansSummaryOfStockOptionPlanDetails</Role>
      <ShortName>Stock Plans - Summary of Stock Option Plan (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>96</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>41403 - Disclosure - Stock Plans - Schedule of Activity Related to Restricted Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureStockPlansScheduleOfActivityRelatedToRestrictedStockDetails</Role>
      <ShortName>Stock Plans - Schedule of Activity Related to Restricted Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>97</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>41501 - Disclosure - Employee benefit plans - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansAdditionalInformationDetails</Role>
      <ShortName>Employee benefit plans - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>98</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>41502 - Disclosure - Employee benefit plans - Summary of Pension and Postretirement Life Insurance Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansSummaryOfPensionAndPostretirementLifeInsurancePlansDetails</Role>
      <ShortName>Employee benefit plans - Summary of Pension and Postretirement Life Insurance Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>99</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>41503 - Disclosure - Employee benefit plans - Schedule of Amounts Recognized in Accumulated Other Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansScheduleOfAmountsRecognizedInAccumulatedOtherComprehensiveIncomeDetails</Role>
      <ShortName>Employee benefit plans - Schedule of Amounts Recognized in Accumulated Other Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>100</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>41504 - Disclosure - Employee benefit plans - Components of Net Periodic Pension Expense (Income) and Other Amounts Recognized in Other Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansComponentsOfNetPeriodicPensionExpenseIncomeAndOtherAmountsRecognizedInOtherComprehensiveIncomeDetails</Role>
      <ShortName>Employee benefit plans - Components of Net Periodic Pension Expense (Income) and Other Amounts Recognized in Other Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>101</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>41505 - Disclosure - Employee benefit plans - Schedule of Weighted-Average Assumptions Used to Determine Benefit Obligations and Related Expenses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansScheduleOfWeightedAverageAssumptionsUsedToDetermineBenefitObligationsAndRelatedExpensesDetails</Role>
      <ShortName>Employee benefit plans - Schedule of Weighted-Average Assumptions Used to Determine Benefit Obligations and Related Expenses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>102</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>41506 - Disclosure - Employee benefit plans - Schedule of Pension Plan Weighted-Average Asset Allocations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansScheduleOfPensionPlanWeightedAverageAssetAllocationsDetails</Role>
      <ShortName>Employee benefit plans - Schedule of Pension Plan Weighted-Average Asset Allocations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>103</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>41507 - Disclosure - Employee benefit plans - Fair Value Measurement of Pension Plan Assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansFairValueMeasurementOfPensionPlanAssetsDetails</Role>
      <ShortName>Employee benefit plans - Fair Value Measurement of Pension Plan Assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>104</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>41508 - Disclosure - Employee benefit plans - Schedule of Benefit Payments Expected to be Paid (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureEmployeeBenefitPlansScheduleOfBenefitPaymentsExpectedToBePaidDetails</Role>
      <ShortName>Employee benefit plans - Schedule of Benefit Payments Expected to be Paid (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>105</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>41601 - Disclosure - Income taxes - Current and Deferred Amounts of Provision for Income Taxes Expense (Benefit) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIncomeTaxesCurrentAndDeferredAmountsOfProvisionForIncomeTaxesExpenseBenefitDetails</Role>
      <ShortName>Income taxes - Current and Deferred Amounts of Provision for Income Taxes Expense (Benefit) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>106</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>41602 - Disclosure - Income taxes - Components of Net Deferred Tax Asset (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIncomeTaxesComponentsOfNetDeferredTaxAssetDetails</Role>
      <ShortName>Income taxes - Components of Net Deferred Tax Asset (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>107</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>41603 - Disclosure - Income taxes - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIncomeTaxesAdditionalInformationDetails</Role>
      <ShortName>Income taxes - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>108</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>41604 - Disclosure - Income taxes - Reconciliation of Effective Income Tax Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureIncomeTaxesReconciliationOfEffectiveIncomeTaxExpenseDetails</Role>
      <ShortName>Income taxes - Reconciliation of Effective Income Tax Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>109</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R110.htm</HtmlFileName>
      <LongName>41701 - Disclosure - Parent Company financial statements - Condensed Balance Sheets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureParentCompanyFinancialStatementsCondensedBalanceSheetsDetails</Role>
      <ShortName>Parent Company financial statements - Condensed Balance Sheets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>110</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R111.htm</HtmlFileName>
      <LongName>41702 - Disclosure - Parent Company financial statements - Condensed Statements of Income and Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureParentCompanyFinancialStatementsCondensedStatementsOfIncomeAndComprehensiveIncomeDetails</Role>
      <ShortName>Parent Company financial statements - Condensed Statements of Income and Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>111</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R112.htm</HtmlFileName>
      <LongName>41703 - Disclosure - Parent Company financial statements - Condensed Statements of Cash Flows (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureParentCompanyFinancialStatementsCondensedStatementsOfCashFlowsDetails</Role>
      <ShortName>Parent Company financial statements - Condensed Statements of Cash Flows (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>112</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R113.htm</HtmlFileName>
      <LongName>41801 - Disclosure - Regulatory matters - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureRegulatoryMattersAdditionalInformationDetails</Role>
      <ShortName>Regulatory matters - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>113</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R114.htm</HtmlFileName>
      <LongName>41802 - Disclosure - Regulatory matters - Schedule of Bank's Capital Amounts and Ratios (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureRegulatoryMattersScheduleOfBankSCapitalAmountsAndRatiosDetails</Role>
      <ShortName>Regulatory matters - Schedule of Bank's Capital Amounts and Ratios (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>114</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R115.htm</HtmlFileName>
      <LongName>42001 - Disclosure - Comprehensive Income - Components of Accumulated Other Comprehensive Income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureComprehensiveIncomeComponentsOfAccumulatedOtherComprehensiveIncomeDetails</Role>
      <ShortName>Comprehensive Income - Components of Accumulated Other Comprehensive Income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>115</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R116.htm</HtmlFileName>
      <LongName>42002 - Disclosure - Comprehensive Income - Other Comprehensive Income (Loss) and Related Tax Effects (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureComprehensiveIncomeOtherComprehensiveIncomeLossAndRelatedTaxEffectsDetails</Role>
      <ShortName>Comprehensive Income - Other Comprehensive Income (Loss) and Related Tax Effects (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>116</Position>
    </Report>
    <Report instance="pfis-20151231.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R117.htm</HtmlFileName>
      <LongName>42101 - Disclosure - Summary of quarterly financial information - Summary of Quarterly Financial Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://imetrix.edgar-online.com/role/DisclosureSummaryOfQuarterlyFinancialInformationSummaryOfQuarterlyFinancialInformationDetails</Role>
      <ShortName>Summary of quarterly financial information - Summary of Quarterly Financial Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>117</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>pfis-20151231.xml</File>
    <File>pfis-20151231.xsd</File>
    <File>pfis-20151231_cal.xml</File>
    <File>pfis-20151231_def.xml</File>
    <File>pfis-20151231_lab.xml</File>
    <File>pfis-20151231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies/>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
