I get the value of a lookup field instead of ID, in a custom function

I get the value of a lookup field instead of ID, in a custom function

Invoice is a lookup field of a custom module (payments), related to the invoice Id.

The problem: I get the the name of the Invoice instead of its ID
What is wrong ?

void




 workflowspace.RollUpPaymentToInvoice (string Invoice float Payment)
ID = input.
Invoice
lareponse = zoho.crm.updateRecord("Invoices" ,ID ,{ "Paid" : input. Payment} ) ;