<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.irs.gov/efile" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.irs.gov/efile" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">

	<xsd:annotation>
		<xsd:documentation>
			<Description>IRS e-file Income Tax Schema - IRS Form 8302</Description>
			<TaxYear>2018</TaxYear>
			<MaturityLevel>Final Release</MaturityLevel>
			<ReleaseDate>October 15, 2019</ReleaseDate>
		</xsd:documentation>
	</xsd:annotation>

	<xsd:include schemaLocation="../../../Common/efileTypes.xsd"/>

	<!-- ==================================================== -->
	<!-- ====================  IRS Form 8302 ================ -->
	<!-- ==================================================== -->

	<xsd:element name="IRS8302">
		<xsd:annotation>
			<xsd:documentation>IRS Form 8302</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="IRS8302Type">
					<xsd:attributeGroup ref="DocumentAttributes">
						<xsd:annotation>
							<xsd:documentation>Common return document attributes</xsd:documentation>
						</xsd:annotation>
					</xsd:attributeGroup>
					<xsd:attribute name="documentName" type="xsd:string" fixed="IRS8302">
						<xsd:annotation>
							<xsd:documentation>IRS internal use only. To avoid error in the return, do not include the attribute name or value.</xsd:documentation>
						</xsd:annotation>
					</xsd:attribute>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="IRS8302Type">
		<xsd:annotation>
			<xsd:documentation>Content model for Form 8302</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>

			<!-- Name of Bank -->
			<xsd:element name="BankName" type="BusinessNameType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Name of Bank</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- City of Bank -->
			<xsd:element name="CityNm" type="CityType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>City of bank</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- State of Bank -->
			<xsd:element name="StateCd" type="StateType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>State of bank</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Taxpayer's Phone Number -->
			<xsd:element name="PhoneNum" type="PhoneNumberType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Taxpayer phone number</Description>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Method of Deposit -->
			<xsd:element name="DepositMethodCd" type="DepositMethodCdType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Method of deposit</Description>
						<LineNumber>1</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Routing Number -->
			<xsd:element name="RoutingTransitNum" type="RoutingTransitNumberType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Routing number</Description>
						<LineNumber>2</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Account Number -->
			<xsd:element name="BankAccountNum" type="BankAccountNumberType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Account number</Description>
						<LineNumber>3</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

			<!-- Account Type -->
			<xsd:element name="BankAccountTypeCd" type="BankAccountType">
				<xsd:annotation>
					<xsd:documentation>
						<Description>Type of account</Description>
						<LineNumber>4</LineNumber>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:element>

		</xsd:sequence>
	</xsd:complexType>

	<!-- Type for deposit -->
	<xsd:simpleType name="DepositMethodCdType">
		<xsd:annotation>
			<xsd:documentation>Method of deposit - 1 for Direct Deposit, 2 for Fedwire</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="1">
				<xsd:annotation>
					<xsd:documentation>Direct Deposit</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
			<xsd:enumeration value="2">
				<xsd:annotation>
					<xsd:documentation>Fedwire</xsd:documentation>
				</xsd:annotation>
			</xsd:enumeration>
		</xsd:restriction>
	</xsd:simpleType>

</xsd:schema>
