How to add 2 hidden fields programatically?

Hi all
I want to add 2 hidden field via the GFAPI so these fields are POSTED to a payment page. (I want to add these programatically rather than adding hidden field types within the GF interface).
Thanks