====== The Receipt... ====== ===== ...And All the Wonderful Things You Can Do With It ===== The FoxyCart receipt is much like [[.:checkout|the checkout]] in terms of how [[.:templates|it can be customized]], but obviously the function of the receipt is to //display// the information about the successful transaction that just took place on the checkout. While it might sound rather dull, the receipt is actually quite an exciting place to be, for a few reasons: * It means your store just made money! * Analytics and goal funnel tracking happens here. * Affiliate sales tracking happens here. * Advertising and campaign tracking happens here. * [[.:products:downloadables|Downloadable products]] are linked to from the receipt. While you may not need to ever touch the receipt, it is important to understand how it functions so that you can be prepared if you do need to track marketing activities in the future. ===== What's Included on the Receipt ===== The receipt will generally contain nearly all the information about a transaction, with a few exceptions. The information displayed is grouped into a few containers on the receipt. * Downloadables * Linked product names to download [[.:products:downloadables|downloadable products]] * General * Payment gateway or processor response * Your store's name (as configured in your store settings * The date and time * Order * Order ID * Subtotal * Shipping total * Tax total * Order total * Billing Address * First name, last name, address, country * Email * Phone * Shipping Address (if different from the billing address) * First name, last name, address, country * Email * Phone * Shipping method (ie. "FedEx Home Delivery") * Custom Fields included on the checkout ===== What's Not Included on the Receipt ===== * [[.:checkout#sensitive_custom_checkout_fields|"Sensitive" custom checkout fields]] * [[.:session_variables|Session variables]] * Credit card details (card number, CSC, expiration, issue date, etc.) ===== Where the Receipt Fits Into the Order Flow ===== The receipt happens after the checkout, but it's worth noting that the datafeed happens //before// the receipt is loaded. So by the time the receipt is loaded, the datafeed has already been sent to your endpoint (if configured). - Your site - The [[.:cart|cart]] - The [[.:checkout|checkout]] - The [[.:advanced:transaction_xml_datafeed|transaction datafeed]] (if configured) - The receipt - Back to your site. Also worth noting is that you can configure the "continue" link that's displayed on the receipt in your store's "settings" page. If the continue link is not explicitly set in your store's settings it will use the most recent referring page (ie. the last page that the customer visited before the cart or checkout). If you'd like to set the ''href'' of that link dynamically you can do so with a bit of javascript and the [[.:advanced:json|JSON cart object]], which is available on the receipt. ===== Revisiting the Receipt ===== The receipt can be revisited by your customers (or by store admins for viewing or printing orders) using the receipt's unique URL. Here's [[http://example.foxycart.com/receipt?id=56f54a625dc9c1c2b33d01627882b7db&fcsid=bm2qhctsgevn45rjma6guo3ae2|a quick example]], showing a downloadable product in addition to non-downloadable products. The URL to the receipt is available via the ''^^receipt_url^^'' placeholder in your [[.:emails|email receipts]], and in the responses you'll get from [[.:advanced:api|the API]] and [[.:advanced:transaction_xml_datafeed|the datafeed]]. You can also get the URL from the "print" link in your FoxyCart admin's transaction history view, which may be the easiest way if you just want to view a past transaction. ===== Receipt Placeholders ===== {{section>.:cheat_sheet#receipt_placeholders&noheader&noeditbutton&permalink&footer&nodate}}