Can I get the invoice URL using XeroCoreApi
in C#?
I have the following code that mark an invoice as paid after the payment is processed by the payment gateway. I want to redirect the user to the invoice.
Payment payment = new Payment();
Invoice payingInvoice = _api.Invoices.Find("xyz");
payment.Invoice = payingInvoice;
Account payingAccount = new Account();
payingAccount.Code = "xyz";
payment.Account = payingAccount;
payment.Amount = "xyz";
payment.Date = DateTime.Now;
_api.Payments.Create(payment);
Response.Redirect("INVOICE_URL"); //Here should be the Invoice URL