Add a record and immediately get its id?

Add a record and immediately get its id?

Hello,

I am building a stateless form that allows the user to enter a Contact and a Payment for that contact, each of which is its own form. I create a  Contact record first, then need to get the ID of the newly created record to use in the Payment record.

I could always do a find using enough fields from the input that I can be confident I will always get the record I just created, e.g. name, address1, address2, email. However this seems a bit kludgy, and I'm used to working with APIs that automatically return the ID to you whenever you insert a new record.

Is this the way to do it, or is there some slick function of Zoho that will accomplish this for me.

Thanks,
Kevin