1. Home
  2. Knowledge Base
  3. Easy Digital Downloads EU VAT
  4. FAQ

How to provide EU VAT receipts for EDD Recurring Payments

If you're using Easy Digital Downloads EU VAT with the Easy Digital Downloads Recurring Payments extension, then you should give your customers EU tax receipts for their renewal payments as well as the initial purchase.

In Easy Digital Downloads, the merge tags that add payment information to the Purchase Receipt email for new purchases don't work with the emails sent by the Recurring Payments extension. As a result, you need to provide tax invoices using another method.

We recommend any or all of these options:

  • Account page - Advise customers to get a tax invoice by accessing the Payment Details page from their Account. The Easy Digital Downloads EU VAT plugin adds all the required information to this page, so it acts as a VAT receipt.
  • PDF Invoices - Easy Digital Downloads EU VAT adds the required tax information to the PDF Invoices extension, so this is another good way to provide tax invoices for recurring payments.
  • Send it manually - While the EDD Purchase Receipt email isn't automatically sent for subscription renewals, you can send this manually to anyone who requests a tax invoice for their renewal. This will be the same email that is sent to your new customers, so if you have added the EU VAT-related merge tags to this email then you can use it as a tax invoice. To send it for renewal payments, go to Downloads → Payment History, hover over the renewal payment and click 'Resend Purchase Receipt'.

How to send PDF Invoices with EDD renewal emails

By default, the {invoice} merge tag provided by the PDF Invoices plugin does not work in the emails that come with the Easy Digital Downloads Recurring Payments extension. If you use PDF Invoices and would like to automatically send a full tax invoice to customers when they renew, then you can do so as follows:

Step 1: Add code snippet

The following code snippet will enable you to use the {invoice} merge tag in the renewal emails provided by the EDD Recurring Payments extension. This snippet can be added to your theme's functions.php file.

Please note that this is aimed at developers and if you don't know how to use it then we recommend posting a job on Codeable. We have partnered with them to provide customization services to our customers.

 * Gets data for the 'modified_date' column to use in the posts table.
 * @license GPL-3.0
function custom_edd_recurring_payment_received_template_tags( $text, $amount, $subscription_id ) {
	return custom_edd_renewal_email_tags( $text, $subscription_id );
add_filter( 'edd_recurring_payment_received_template_tags', 'custom_edd_recurring_payment_received_template_tags', 10, 3 );

function custom_edd_renewal_email_tags( $text, $subscription_id ) {
    //Check to make sure the necessary classes and functions exist.
	if ( ! isset($subscription_id) || ! class_exists( 'EDD_Subscription' ) || ! function_exists( 'edd_pdf_invoices' ) ) {
		return $text;

    //Get current subscription
	$subscription = new EDD_Subscription( $subscription_id );

    //Check if customer has payments
	if( ! empty( $subscription->customer->payment_ids ) ) {
        //Select most recent payment (the one that was just renewed)
        $payment_id	= end(explode( ',', $subscription->customer->payment_ids));
        //Check if invoice setting is active
        if ( edd_pdf_invoices()->is_invoice_link_allowed( $payment_id ) ) {

            //Create the html for the invoice link in the email - change the "Download Invoice" text if you'd like the link to say something else
            $invoice_link = ''. __( 'Download Invoice', 'eddpdfi' ) . '';

            //Filter the email text to replace occurences of {invoice} tag with html
            $text = str_replace( '{invoice}', $invoice_link, $text );
    //Return the text of the email
	return $text;
We've partnered with Codeable to provide our customers with expert help if required.

Step 2: Add merge tag to email

Now go to Downloads → Settings → Extensions → Recurring Payments and add the merge tag {invoice} to the Renewal Payment Received Message. This will add a link to download the PDF invoice for the renewal payment.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.