You need to manually change the length of the payment array when setting it up.
Or use:
Payment[] payments; payments[payments.length++] = Payment(address, amt);
Or:
Payment[] payments; payments.push(Payment(address, amt));
To configure the payment array in the Purchase instead of creating an array and trying to install it in Purchase.payments, you can do the following:
uint purchase_id = purchases.length++; purchases[purchase_id].product_id = product_id; purchases[purchase_id].complete = false; purchases[purchase_id].payments.push(Payment(msg.sender, amt));
Expanding the length of purchases will automatically create new attributes. Then you can install them manually.
source share