HTTP/1.1 201 Created
Content-Type: application/xml; charset=utf-8
Location: https://api.recurly.com/v2/invoices/3704

<?xml version="1.0" encoding="UTF-8"?>
<invoice href="https://api.recurly.com/v2/invoices/3704">
  <account href="https://api.recurly.com/v2/accounts/6b97ec05-7e9d-4506-a4b6-5459acbd6403"/>
  <address>
    <address1>400 Alabama St</address1>
    <address2 nil="nil"></address2>
    <city>San Francisco</city>
    <state>CA</state>
    <zip>94110</zip>
    <country>US</country>
    <phone nil="nil"></phone>
  </address>
  <uuid>3d8648fcf2be67ed304ff242d6bbb9d4</uuid>
  <state>collected</state>
  <invoice_number_prefix></invoice_number_prefix>
  <invoice_number type="integer">3704</invoice_number>
  <po_number nil="nil"></po_number>
  <vat_number nil="nil"></vat_number>
  <subtotal_in_cents type="integer">1000</subtotal_in_cents>
  <tax_in_cents type="integer">0</tax_in_cents>
  <total_in_cents type="integer">1000</total_in_cents>
  <subtotal_after_discount_in_cents type="integer">1000</subtotal_after_discount_in_cents>
  <currency>USD</currency>
  <created_at type="datetime">2017-05-17T17:38:55Z</created_at>
  <updated_at type="datetime">2017-05-17T17:38:55Z</updated_at>
  <attempt_next_collection_at nil="nil"></attempt_next_collection_at>
  <closed_at type="datetime">2017-05-17T17:38:55Z</closed_at>
  <terms_and_conditions nil="nil"></terms_and_conditions>
  <customer_notes nil="nil"></customer_notes>
  <recovery_reason nil="nil"></recovery_reason>
  <net_terms type="integer">0</net_terms>
  <collection_method>automatic</collection_method>
  <line_items type="array">
    <adjustment href="https://api.recurly.com/v2/adjustments/3d8648fced80685b7f165a43fca65cda" type="charge">
      <account href="https://api.recurly.com/v2/accounts/6b97ec05-7e9d-4506-a4b6-5459acbd6403"/>
      <invoice href="https://api.recurly.com/v2/invoices/3704"/>
      <uuid>3d8648fced80685b7f165a43fca65cda</uuid>
      <state>invoiced</state>
      <description nil="nil"></description>
      <accounting_code nil="nil"></accounting_code>
      <product_code>4549449c-5870-4845-b672-1d07f15e87dd</product_code>
      <origin>debit</origin>
      <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
      <quantity type="integer">1</quantity>
      <discount_in_cents type="integer">0</discount_in_cents>
      <tax_in_cents type="integer">0</tax_in_cents>
      <total_in_cents type="integer">1000</total_in_cents>
      <currency>USD</currency>
      <taxable type="boolean">false</taxable>
      <tax_exempt type="boolean">false</tax_exempt>
      <tax_code nil="nil"></tax_code>
      <start_date type="datetime">2017-05-17T17:38:55Z</start_date>
      <end_date nil="nil"></end_date>
      <created_at type="datetime">2017-05-17T17:38:55Z</created_at>
      <updated_at type="datetime">2017-05-17T17:38:55Z</updated_at>
      <revenue_schedule_type>at_invoice</revenue_schedule_type>
    </adjustment>
  </line_items>
  <transactions type="array">
    <transaction href="https://api.recurly.com/v2/transactions/3d8648fd0cc7c6e9196b944878afcd3d" type="credit_card">
      <account href="https://api.recurly.com/v2/accounts/6b97ec05-7e9d-4506-a4b6-5459acbd6403"/>
      <invoice href="https://api.recurly.com/v2/invoices/3704"/>
      <uuid>3d8648fd0cc7c6e9196b944878afcd3d</uuid>
      <action>purchase</action>
      <amount_in_cents type="integer">1000</amount_in_cents>
      <tax_in_cents type="integer">0</tax_in_cents>
      <currency>USD</currency>
      <status>success</status>
      <payment_method>credit_card</payment_method>
      <reference>135998</reference>
      <source>transaction</source>
      <recurring type="boolean">false</recurring>
      <test type="boolean">true</test>
      <voidable type="boolean">true</voidable>
      <refundable type="boolean">true</refundable>
      <ip_address nil="nil"></ip_address>
      <gateway_type>test</gateway_type>
      <origin>api</origin>
      <description nil="nil"></description>
      <message>Successful test transaction</message>
      <approval_code nil="nil"></approval_code>
      <failure_type nil="nil"></failure_type>
      <gateway_error_codes nil="nil"></gateway_error_codes>
      <cvv_result code="" nil="nil"></cvv_result>
      <avs_result code="D">Street address and postal code match.</avs_result>
      <avs_result_street nil="nil"></avs_result_street>
      <avs_result_postal nil="nil"></avs_result_postal>
      <created_at type="datetime">2017-05-17T17:38:55Z</created_at>
      <collected_at type="datetime">2017-05-17T17:38:55Z</collected_at>
      <updated_at type="datetime">2017-05-17T17:38:55Z</updated_at>
      <details>
        <account>
          <account_code>6b97ec05-7e9d-4506-a4b6-5459acbd6403</account_code>
          <first_name nil="nil"></first_name>
          <last_name nil="nil"></last_name>
          <company nil="nil"></company>
          <email nil="nil"></email>
          <billing_info type="credit_card">
            <first_name>Benjamin</first_name>
            <last_name>Du Monde</last_name>
            <address1>400 Alabama St</address1>
            <address2 nil="nil"></address2>
            <city>San Francisco</city>
            <state>CA</state>
            <zip>94110</zip>
            <country>US</country>
            <phone nil="nil"></phone>
            <vat_number nil="nil"></vat_number>
            <card_type>Visa</card_type>
            <year type="integer">2019</year>
            <month type="integer">12</month>
            <first_six>411111</first_six>
            <last_four>1111</last_four>
          </billing_info>
        </account>
      </details>
    </transaction>
  </transactions>
  <a name="refund" href="https://api.recurly.com/v2/invoices/3704/refund" method="post"/>
</invoice>
