The Subscription XML Datafeed

The subscription datafeed does not send you a list of your subscriptions. Please see the import notes below as to what is contained in the subscription datafeed. If you want to be notified every time a subscription runs, please use the regular transaction datafeed.

The FoxyCart subscription XML datafeed runs once a day, and sends data to the same location configured for your regular data feed. It contains:

The transaction details included in the XML are obtained from the last successful transaction. This is not the datafeed that tracks new or recurring subscription transactions that process normally. That data is sent as the transactions occur in the transaction XML datafeed.

The subscription datafeed will not send if it's empty. So if none of the criteria above are met, the datafeed won't send that day.

A few things worth noting:

For a working example script for how you can use this feed, check the integrations page for a Subscription Datafeed integration example.

Example Subscription XML Datafeed

For reference, the date that this datafeed would have been sent is 2009-03-04, which means that the first subscription listed is one that has been set to cancel that day.

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<foxysubscriptiondata>
 <subscriptions>
  <subscription>
   <subscription_id>200</subscription_id>
   <next_transaction_date>2009-03-24</next_transaction_date>
   <end_date>2009-03-04</end_date>
   <past_due_amount>0.00</past_due_amount>
   <frequency>1m</frequency>
   <error_message></error_message>
   <sub_token_url>https://example.foxycart.com/cart?sub_token=9c7ac0cadc73f93e126b6d97893cad3f</sub_token_url>
   <first_failed_transaction_date></first_failed_transaction_date>
   <store_id>1</store_id>
   <customer_id>44</customer_id>
   <transaction_id>2397</transaction_id>
   <transaction_date>2009-02-24 23:00:33</transaction_date>
   <order_total>10.00</order_total>
   <customer_first_name>John</customer_first_name>
   <customer_last_name>Doe</customer_last_name>
   <customer_address1>1234 Any Street</customer_address1>
   <customer_address2></customer_address2>
   <customer_city>Any City</customer_city>
   <customer_state>TN</customer_state>
   <customer_postal_code>12345</customer_postal_code>
   <customer_country>US</customer_country>
   <customer_phone></customer_phone>
   <customer_email>email@example.com</customer_email>
   <customer_ip>123.123.123.123</customer_ip>
   <receipt_url>https://example.foxycart.com/receipt?id=fe376559e8f76a2fafa8c707c73cda2a</receipt_url>
   <transaction_details>
    <transaction_detail>
     <product_name>monthly subscription</product_name>
     <product_price>10.00</product_price>
     <product_quantity>1</product_quantity>
     <product_weight>0.000</product_weight>
     <product_code></product_code>
     <category_description>Default for all products</category_description>
     <category_code>DEFAULT</category_code>
     <product_delivery_type>notshipped</product_delivery_type>
     <product_options>
     </product_options>
    </transaction_detail>
   </transaction_details>
  </subscription>
  <subscription>
   <subscription_id>196</subscription_id>
   <next_transaction_date>2009-03-25</next_transaction_date>
   <end_date>0000-00-00</end_date>
   <past_due_amount>50.00</past_due_amount>
   <frequency>1m</frequency>
   <error_message>Error: There was an error processing your payment: Credit card number is required. (Response Reason Code: 33)</error_message>
   <sub_token_url>https://example.foxycart.com/cart?sub_token=3076ca2af366d8a2647b60484a9fbefc</sub_token_url>
   <first_failed_transaction_date>2009-03-24</first_failed_transaction_date>
   <store_id>1</store_id>
   <customer_id>60</customer_id>
   <transaction_id>2380</transaction_id>
   <transaction_date>2009-02-24 21:06:31</transaction_date>
   <order_total>25.00</order_total>
   <customer_first_name>Test</customer_first_name>
   <customer_last_name>Test</customer_last_name>
   <customer_address1>12345 any city</customer_address1>
   <customer_address2></customer_address2>
   <customer_city>Any City</customer_city>
   <customer_state>TN</customer_state>
   <customer_postal_code>12345</customer_postal_code>
   <customer_country>US</customer_country>
   <customer_phone></customer_phone>
   <customer_email>email2@example.com</customer_email>
   <customer_ip>123.123.123.123</customer_ip>
   <receipt_url>https://example.foxycart.com/receipt?id=962aafde40dbc187abbd420e13548529</receipt_url>
   <transaction_details>
    <transaction_detail>
     <product_name>monthly product</product_name>
     <product_price>25.00</product_price>
     <product_quantity>1</product_quantity>
     <product_weight>0.000</product_weight>
     <product_code>610</product_code>
     <category_description>Default for all products</category_description>
     <category_code>DEFAULT</category_code>
     <product_delivery_type>notshipped</product_delivery_type>
     <product_options>
     </product_options>
    </transaction_detail>
   </transaction_details>
  </subscription>
 </subscriptions>
 <payment_methods_soon_to_expire>
  <customer>
   <customer_id>4</customer_id>
   <customer_first_name>Test</customer_first_name>
   <customer_last_name>Test</customer_last_name>
   <customer_email>test.test@example.com</customer_email>
   <cc_exp_month>02</cc_exp_month>
   <cc_exp_year>2009</cc_exp_year>
  </customer>
  <customer>
   <customer_id>10</customer_id>
   <customer_first_name>Test2</customer_first_name>
   <customer_last_name>Test2</customer_last_name>
   <customer_email>test2.test2@example.com</customer_email>
   <cc_exp_month>02</cc_exp_month>
   <cc_exp_year>2009</cc_exp_year>
  </customer>
 </payment_methods_soon_to_expire>
</foxysubscriptiondata>