<!--
    $Revision$
    $Date$
    
 Open Financial Exchange DTD - Payment module
 Copyright 1997 CheckFree Corp., Intuit Inc., Microsoft Corp.  All rights reserved

-->


<!-- Message Set Wrappers and Profile -->

<!ELEMENT BILLPAYMSGSRQV1	- -	((PAYEETRNRQ | PAYEESYNCRQ)*,
							     ( PMTTRNRQ | RECPMTTRNRQ | PMTINQTRNRQ | PMTMAILTRNRQ |
								   PMTSYNCRQ | RECPMTSYNCRQ | PMTMAILSYNCRQ)*)>

<!ELEMENT BILLPAYMSGSRSV1	- -	((PAYEETRNRS | PAYEESYNCRS)*,
								 ( PMTTRNRS | RECPMTTRNRS | PMTINQTRNRS | PMTMAILTRNRS |
								   PMTSYNCRS | RECPMTSYNCRS | PMTMAILSYNCRS)*)>

<!-- -->
<!ELEMENT BILLPAYMSGSET		- -	(BILLPAYMSGSETV1)>

<!ELEMENT BILLPAYMSGSETV1	- -	(MSGSETCORE,
								 DAYSWITH, DFLTDAYSTOPAY,
                                 XFERDAYSWITH, XFERDFLTDAYSTOPAY, 
                                 PROCDAYSOFF*, PROCENDTM, 
                                 MODELWND, POSTPROCWND, STSVIAMODS,
								 PMTBYADDR, PMTBYXFER, PMTBYPAYEEID,
                                 CANADDPAYEE, HASEXTDPMT, 
                                 CANMODPMTS, CANMODMDLS, DIFFFIRSTPMT, 
                                 DIFFLASTPMT)>

<!ELEMENT DAYSWITH		- o	%INTTYPE>	<!--  number of days before the processing date that funds are withdrawn -->
<!ELEMENT DFLTDAYSTOPAY	- o %INTTYPE>	<!--  the default number of days to pay -->
<!ELEMENT XFERDAYSWITH		- o	%INTTYPE>	<!--  number of days before the processing date that funds are withdrawn for xfers-->
<!ELEMENT XFERDFLTDAYSTOPAY	- o %INTTYPE>	<!--  the default number of days to pay for transfers-->
<!ELEMENT POSTPROCWND	- o	%INTTYPE>	<!--  the number of days after a transaction is processed that it is acessible
											  for status inquiries -->
<!ELEMENT STSVIAMODS	- o	%BOOLTYPE>	<!--  server supports communication of server-initiated payment status changes
											  via the PMTMODRS -->
<!ELEMENT PMTBYADDR		- o	%BOOLTYPE>	<!--  the payment provider supports payments to payees identified by billing
											  address, i.e. the PAYEE aggregate -->
<!ELEMENT PMTBYXFER     - o %BOOLTYPE>  <!--  can pay by transfers -->
<!ELEMENT PMTBYPAYEEID  - o %BOOLTYPE>  <!--  can pay by user supplied payee IDs -->
<!ELEMENT CANADDPAYEE	- o	%BOOLTYPE>	<!--  user can add payees if no, the user is restricted to payees added to the
											  users payee list by the payment system -->
<!ELEMENT HASEXTDPMT	- o	%BOOLTYPE>	<!--  supports the EXTDPMT business payment aggregate -->
<!ELEMENT CANMODPMTS	- o	%BOOLTYPE>	<!--  permit modifications to payments, i.e. PMTMODRQ -->
<!ELEMENT DIFFFIRSTPMT	- o	%BOOLTYPE>	<!--  support for specifying a different amount for the first payment
											  generated by a model -->
<!ELEMENT DIFFLASTPMT	- o	%BOOLTYPE>	<!--  support for specifying a different amount for the last payment generated
											  by a model -->


<!-- Transactions -->


<!ELEMENT PMTTRNRQ      - - (%TRNRQMACRO, (PMTRQ | PMTMODRQ | PMTCANCRQ))>
<!ELEMENT RECPMTTRNRQ   - - (%TRNRQMACRO, (RECPMTRQ | RECPMTMODRQ | RECPMTCANCRQ))>
<!ELEMENT PAYEETRNRQ	- - (%TRNRQMACRO, (PAYEERQ | PAYEEMODRQ | PAYEEDELRQ))>
<!ELEMENT PMTINQTRNRQ	- -	(%TRNRQMACRO, PMTINQRQ)>
<!ELEMENT PMTMAILTRNRQ	- - (%TRNRQMACRO, PMTMAILRQ)>

<!ELEMENT PMTTRNRS      - - (%TRNRSMACRO, (PMTRS | PMTMODRS | PMTCANCRS)?)>
<!ELEMENT RECPMTTRNRS   - - (%TRNRSMACRO, (RECPMTRS | RECPMTMODRS | RECPMTCANCRS)?)>
<!ELEMENT PAYEETRNRS	- - (%TRNRSMACRO, (PAYEERS | PAYEEMODRS | PAYEEDELRS)?)>
<!ELEMENT PMTINQTRNRS	- -	(%TRNRSMACRO, PMTINQRS?)>
<!ELEMENT PMTMAILTRNRS	- - (%TRNRSMACRO, PMTMAILRS?)>


<!-- ============================================================================= -->
<!-- Requests                                                                      -->
<!-- ============================================================================= -->

<!--  payment request -->
<!ELEMENT PMTRQ	- -	(PMTINFO)>		
 

<!--  modification request -->
<!ELEMENT PMTMODRQ	- -	(SRVRTID, PMTINFO)>		
 

<!--  modification request -->
<!ELEMENT PMTCANCRQ	- - (SRVRTID)>


<!--  recurring payment request -->
<!ELEMENT RECPMTRQ	- -	(RECURRINST, PMTINFO, INITIALAMT?, FINALAMT?)>		


<!-- modification request -->
<!ELEMENT RECPMTMODRQ	- -	(RECSRVRTID, RECURRINST, PMTINFO, INITIALAMT?, FINALAMT?, MODPENDING)>		
 

<!--  cancellation request -->
<!ELEMENT RECPMTCANCRQ	- -	(RECSRVRTID, CANPENDING)>

<!-- payment status inquiry request -->
<!ELEMENT PMTINQRQ	- -	(SRVRTID)>
 

<!-- payee request : add a payee to the payee list -->
<!ELEMENT PAYEERQ	- -	((PAYEEID | (PAYEE , BANKACCTTO?)), PAYACCT*)>

<!-- payee modification request -->
<!ELEMENT PAYEEMODRQ	- - (PAYEELSTID, (PAYEE , BANKACCTTO?)?, PAYACCT*)>

<!-- payee deletion request -->
<!ELEMENT PAYEEDELRQ	- - (PAYEELSTID)>

<!-- ============================================================================= -->
<!-- Responses                                                                     -->
<!-- ============================================================================= -->

<!--  payment response -->
<!ELEMENT PMTRS		- - (SRVRTID, PAYEELSTID, CURDEF, PMTINFO, EXTDPAYEE?, 
                         CHECKNUM?, PMTPRCSTS, RECSRVRTID?)>
   

<!-- payment modification response -->
<!ELEMENT PMTMODRS	- -	(SRVRTID, PMTINFO, PMTPRCSTS?)>		


<!-- payment modification response -->
<!ELEMENT PMTCANCRS	- -	(SRVRTID)>		


<!--  recurring payment response -->
<!ELEMENT RECPMTRS	- -	(RECSRVRTID, PAYEELSTID, CURDEF, RECURRINST, PMTINFO, INITIALAMT?, FINALAMT?, EXTDPAYEE?)>
 

<!-- modification response -->
<!ELEMENT RECPMTMODRS	- -	(RECSRVRTID, RECURRINST, PMTINFO, INITIALAMT?, FINALAMT?, MODPENDING)>		


<!-- recurring payment modification response --> 
<!ELEMENT RECPMTCANCRS	- -	(RECSRVRTID, CANPENDING)>		

<!-- payment status inquiry response -->
<!ELEMENT PMTINQRS	- -	(SRVRTID, PMTPRCSTS, CHECKNUM?)>


<!-- payee response : add a payee to the payee list -->
<!ELEMENT PAYEERS	- -	(PAYEELSTID, (PAYEE , BANKACCTTO?)?, EXTDPAYEE?, PAYACCT*)>

<!-- payee modification response -->
<!ELEMENT PAYEEMODRS	- - (PAYEELSTID, (PAYEE , BANKACCTTO?)?, PAYACCT*, EXTDPAYEE?)>

<!-- payee deletion response -->
<!ELEMENT PAYEEDELRS	- - (PAYEELSTID)>
   
<!-- ============================================================================= -->
<!--			Aggregates                                                         -->
<!-- ============================================================================= -->


<!-- BPACCTINFO -->
<!ELEMENT BPACCTINFO  - - (BANKACCTFROM, SVCSTATUS)>

<!-- Payment information aggregate, see section 6.2.1.1 -->
<!ELEMENT PMTINFO	- - (BANKACCTFROM, TRNAMT, 
                         (PAYEEID|PAYEE), PAYEELSTID?, BANKACCTTO?,
                         EXTDPMT*, PAYACCT, 
                         DTDUE, MEMO?, BILLREFINFO?)>
 

<!--  Payment processing status -->
<!ELEMENT PMTPRCSTS	- -	(PMTPRCCODE, DTPMTPRC)>

<!--  Payment processing date; enum for processing date interpretation -->
<!ELEMENT PMTPRCCODE	- o %STRTYPE>		

<!--  Payment processing date; Interpretation depends on <PMTPRCCODE> -->
<!ELEMENT DTPMTPRC	- o %DTTMTYPE>		
 
<!-- billing reference info -->
<!ELEMENT BILLREFINFO - o %STRTYPE>
 
<!--  Extended Payment aggregate -->
<!--  Either extdpmtdsc or extdpmtinv, or both, but at least one required -->
<!ELEMENT EXTDPMT	    - -	(EXTDPMTFOR?, EXTDPMTCHK?, 
                             ((EXTDPMTDSC, EXTDPMTINV?) |
                             (EXTDPMTINV)))>
<!ELEMENT EXTDPMTINV    - - (INVOICE+)>
<!ELEMENT INVOICE       - - (INVNO, INVTOTALAMT, INVPAIDAMT,
                             INVDATE, INVDESC, DISCOUNT?,
                             ADJUSTMENT?, LINEITEM*)>
<!ELEMENT DISCOUNT      - - (DSCRATE, DSCAMT, DSCDATE?, DSCDESC)>
<!ELEMENT ADJUSTMENT    - - (ADJNO?, ADJDESC, ADJAMT, ADJDATE?)>
<!ELEMENT LINEITEM      - - (LITMAMT, LITMDESC)>

<!ELEMENT EXTDPMTFOR    - o %STRTYPE>
<!ELEMENT EXTDPMTCHK    - o %INTTYPE>
<!ELEMENT EXTDPMTDSC    - - %STRTYPE>
<!ELEMENT INVNO         - o %STRTYPE>
<!ELEMENT INVTOTALAMT   - o %AMTTYPE>
<!ELEMENT INVPAIDAMT    - o %AMTTYPE>
<!ELEMENT INVDATE       - o %DTTMTYPE>
<!ELEMENT INVDESC       - o %STRTYPE>
<!ELEMENT DSCRATE       - o %RATETYPE>
<!ELEMENT DSCAMT        - o %AMTTYPE>
<!ELEMENT DSCDATE       - o %DTTMTYPE>
<!ELEMENT DSCDESC       - o %STRTYPE>
<!ELEMENT ADJNO         - o %STRTYPE>
<!ELEMENT ADJDESC       - o %STRTYPE>	
<!ELEMENT ADJAMT        - o %AMTTYPE>
<!ELEMENT ADJDATE       - o %DTTMTYPE>
<!ELEMENT LITMAMT       - o %AMTTYPE>
<!ELEMENT LITMDESC      - o %STRTYPE>
 
<!--  Initial Amount -->
<!ELEMENT INITIALAMT	- o %AMTTYPE>		
 
<!--  Final Amount -->
<!ELEMENT FINALAMT	- o %AMTTYPE>		
 
<!--  standard payee -->
<!ELEMENT EXTDPAYEE	- - ( (PAYEEID, IDSCOPE, NAME)?, DAYSTOPAY)>

<!--  Server-assigned standard payee ID -->		
<!ELEMENT PAYEEID	- o %SRVRIDTYPE>		


<!--  Payee ID scope enumeration ; currently one of {GLOBAL,USER} -->
<!ELEMENT IDSCOPE	- o %STRTYPE>		

<!--  Minimum number of days needed to process -->   
<!ELEMENT DAYSTOPAY	- o %INTTYPE>		

<!-- Check number -->
<!ELEMENT CHECKNUM	- o %IDTYPE>

<!-- Payee aggregate -->
<!ELEMENT PAYEE	- -	(NAME, ADDR1, ADDR2?, ADDR3?, CITY, STATE, POSTALCODE, COUNTRY?, PHONE)>	

<!--  Server-assigned payee list ID -->		
<!ELEMENT PAYEELSTID	- o %SRVRIDTYPE>		

<!--
	synchronization request messages
  -->

<!--  payment synchronization request -->
<!ELEMENT PMTSYNCRQ	- -	(%SYNCRQMACRO, BANKACCTFROM, PMTTRNRQ*)>		
 

<!--  recurring payment synchronization request -->
<!ELEMENT RECPMTSYNCRQ	- -	(%SYNCRQMACRO, BANKACCTFROM, RECPMTTRNRQ*)>
 
<!-- payee list synchronization request -->
<!ELEMENT PAYEESYNCRQ	- - (%SYNCRQMACRO, PAYEETRNRQ*)>


<!-- bill pay mail sync request -->
<!ELEMENT PMTMAILSYNCRQ	- -	(%SYNCRQMACRO, INCIMAGES, USEHTML, PMTMAILTRNRQ*)>


<!--
	synchronization response messages
  -->

<!-- payment synchronization response -->
<!ELEMENT PMTSYNCRS	- -	(%SYNCRSMACRO, BANKACCTFROM, PMTTRNRS*)>		
 

<!--  recurring payment synchronization response -->
<!ELEMENT RECPMTSYNCRS	- -	(%SYNCRSMACRO, BANKACCTFROM, RECPMTTRNRS*)>
 
<!-- payee list synchronization response -->
<!ELEMENT PAYEESYNCRS	- - (%SYNCRSMACRO, PAYEETRNRS*)>


<!-- bill pay mail sync response -->
<!ELEMENT PMTMAILSYNCRS	- -	(%SYNCRSMACRO, PMTMAILTRNRS*)>


<!--
 Payment mail messages
  --> 

<!-- payment inquiry mail message --> 
<!ELEMENT PMTMAILRQ	- -	(MAIL,(SRVRTID,PMTINFO)?)>

<!ELEMENT PMTMAILRS	- -	(MAIL,(SRVRTID,PMTINFO)?)>
