Forum Discussion

LDUFFY's avatar
4 years ago

API Send Invoice with Pay Now Link

Hi

 

I am using the API to create invoices.

 

So far no problem creating the invoice. Now I want to email the invoice to the customer.

 

Is this possible ?

 

My research suggestes it is not, and the workaround is to create an email and attach a pdf of the invoice. Thats easy enough to do, but this does not include the "Pay Now" link.

 

The Pay Now Link appears to just be a link with a magical GUID in there :

https://paydirect.myob.com/pay/#/<<MagicalGuid>>?source=email-view&type=invoice

 

If we cant send the recently created invoice as an email, how do we find the GUID to generate the Pay Direct/Now link ?

 

Thanks

 

  • Han-Solo's avatar
    Han-Solo
    MYOB Moderator

    Hi LDUFFY,

     

    Thanks for reaching out, Yes this is possible to send an invoice to be emailed from the API however Pay Direct Online is currently not a supported feature via the API. We can use the endpoint > /{cf_uri}/Sale/Invoice/Service/{invoice_uid}/Email to Post the invoices to be emailed. 

     

    You can view the documentation on the Invoice email HERE ,