It's a suffix plus ending.
https://dhamma.ru/paali/tables/palisufi.htm-āya f. sg. instr. abl. dat. gen. loc. kaññāya (from the girl, etc.), gāthāya (by/from the verse, of the verse, in the verse)
http://www.buddha-vacana.org/toolbox/suf.html#T-tta: expresses the state, nature or quality of being that which is denoted by the adj. or noun: puthujjana, a common man +tta=puthujjanattaṃ, the state of being a common man; buddha, a buddha +tta=buddhattaṃ, Buddhahood; atthi he is +tta=atthittaṃ the state of "he is", existence.
https://dhamma.ru/paali/durois/paligram.pdf#page=109