字据 is generic 'something in writing as proof' - a homemade IOU, a handwritten receipt, an informal contract between friends or family. More formal documents are
合同 (contract),
协议 (agreement),
收据 (official receipt). Verbs:
立字据 = draw up a written pledge;
打字据 = write one out.