Banking Example

The following example illustrates the format of a simple but complete banking statement download containing three transactions. SGML is used to enhance readability (since no end tags are required). See the OFX Specification for more examples in each service area.

The request an open-ended statement download (no start/end dates) for savings account # 098-121:

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE

<OFX>
  <SIGNONMSGSRQV1>
    <SONRQ>
      <DTCLIENT>20071015021529.000[-8:PST]
      <USERID>Greg123
      <USERPASS>Greg
      <LANGUAGE>ENG
      <FI>
        <ORG>MYBANK
        <FID>01234
      </FI>
      <APPID>QWIN
      <APPVER>0900
    </SONRQ>
  </SIGNONMSGSRQV1>
  <BANKMSGSRQV1>
    <STMTTRNRQ>
      <TRNUID>23382938
      <STMTRQ>
        <BANKACCTFROM>
          <BANKID>987654321
          <ACCTID>098-121
          <ACCTTYPE>SAVINGS
        </BANKACCTFROM>
        <INCTRAN>
          <INCLUDE>Y
        </INCTRAN>
      </STMTRQ>
    </STMTTRNRQ>
  </BANKMSGSRQV1>
</OFX>

The Response shows three transactions, two credits and a debit (check):

OFXHEADER:100
DATA:OFXSGML
VERSION:103
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE

<OFX>
  <SIGNONMSGSRSV1>
    <SONRS>
      <STATUS>
        <CODE>0
        <SEVERITY>INFO
      </STATUS>
      <DTSERVER>20071015021529.000[-8:PST]
      <LANGUAGE>ENG
      <DTACCTUP>19900101000000
      <FI>
        <ORG>MYBANK
        <FID>01234
      </FI>
    </SONRS>
  </SIGNONMSGSRSV1>
  <BANKMSGSRSV1>
      <STMTTRNRS>
        <TRNUID>23382938
        <STATUS>
          <CODE>0
          <SEVERITY>INFO
        </STATUS>
        <STMTRS>
          <CURDEF>USD
          <BANKACCTFROM>
            <BANKID>987654321
            <ACCTID>098-121
            <ACCTTYPE>SAVINGS
          </BANKACCTFROM>
          <BANKTRANLIST>
            <DTSTART>20070101
            <DTEND>20071015
            <STMTTRN>
              <TRNTYPE>CREDIT
              <DTPOSTED>20070315
              <DTUSER>20070315
              <TRNAMT>200.00
              <FITID>980315001
              <NAME>DEPOSIT
              <MEMO>automatic deposit
            </STMTTRN>
            <STMTTRN>
              <TRNTYPE>CREDIT
              <DTPOSTED>20070329
              <DTUSER>20070329
              <TRNAMT>150.00
              <FITID>980310001
              <NAME>TRANSFER
              <MEMO>Transfer from checking
            </STMTTRN>
            <STMTTRN>
              <TRNTYPE>PAYMENT
              <DTPOSTED>20070709
              <DTUSER>20070709
              <TRNAMT>-100.00
              <FITID>980309001
                <CHECKNUM>1025
              <NAME>John Hancock
            </STMTTRN>
          </BANKTRANLIST>
          <LEDGERBAL>
            <BALAMT>5250.00
            <DTASOF>20071015021529.000[-8:PST]
          </LEDGERBAL>
          <AVAILBAL>
            <BALAMT>5250.00
            <DTASOF>20071015021529.000[-8:PST]
          </AVAILBAL>
        </STMTRS>
      </STMTTRNRS>
  </BANKMSGSRSV1>
</OFX>
About OFX | Developer Information | Press Room | Home
Download Spec | View Schema/DTD | Site Map | OFX.NET

For more information or questions about OFX, please email us at ofxinfo@ofx.net
©2007 Open Financial Exchange, All Rights Reserved