I cannot pay, there is a message saying “You must accept the terms and conditions to continue”
This is on iOS or Mac Store?
It is on iOS. After adding all the information required, that is the message, not allowing to go ahead with the payment.
It sounds like a mess-up on Apples side.
I assume you have a new iOS account or didn’t buy IAPs on your account for a long time and then somehow you need to accept Apples terms.
Maybe try to sign out of your Apple ID and back in, in the iOS settings.