Sending invoice by email with a link to paypal - using API programatically

Sending invoice by email with a link to paypal - using API programatically

I am using the API to generate invoice and the invoice has to be send by eMail, If i use the console the email goes with this body

The invoice INV-000008 is attached with this email. You can choose the easy way out and  pay online for this invoice.  
Here's an overview of the invoice for your reference. 

Invoice Overview: 
Invoice # : INV-000008 
Date : 21 Feb 2014 
Amount : $1.00 







The email sent with a PDF and it does not have any means to pay.

I have two issues, one how to solve this problem by having the link to pay send in the mail, i want the same behaviour as sending from invoice console.

If not how would the customer make the payment on seeing my eMail (assume i am not willing to send the invoice from the console).

I want a programmatic solution to the problem.

Mani