How to set Sales Order Payment Terms when creating a Sales Order via the Zoho Books API

How to set Sales Order Payment Terms when creating a Sales Order via the Zoho Books API

I am creating Sales Orders via the Zoho Books API. I would like to set the Payment Terms to a particular value from the list of allowed values. Is that possible? 

I was able to get the list of payment terms via this API call: https://books.zoho.com/api/v3/settings/paymentterms?organization_id=XXXX"

When I create a Sales Order, I tried passing a parameter called "payment_terms" and also "payment_terms_id" in the header with the other parameters, the value being the ID of the Payment Terms that I want to apply, but I get an error saying "invalid value for salesorder property".