If the game i made failed and didn’t make any money do i still have to pay royalites ?

You owe royalties on any revenue you earn after the initial $3000 mark, per game per calendar quarter. If your game makes less than $3000 in a month, you do not owe any royalties for that month.

You can read more about the royalties here: Richtlinien für die Veröffentlichung und Lizenzgebührennachverfolgung - Unreal Engine

So i have to pay 5% of what i got in each month from the 4 months of year

So lets say i got 100000 on each month i have to pay 5000 on each month from the first 4 months of each year ?

The 5% is on gross revenue, which is probably distinct from what you receive (i.e., it comes before Apple or Steam’s cut).

But for your example, let’s say your product sells for $1 per unit on the Apple store, and it sells 100,000 units per month (gross revenue of $100,000 per month). The quarterly (i.e. three month) gross revenue is then $300,000. You owe 5% royalties on quarterly gross revenue after the first $3,000, so you owe 5% on $297,000 (or $14,850).

No, this is not on month base, but year quarter (3 months → 3 x 4 = 12 months). If you release a game and at the end of the quarter of his release you earn, for example, 2500$, you have to pay nothing.

But during the next quarter, you earn 3100$, your royalty payment is due 45 days after (that mean you need to pay it before the end of the 45th day). In the present case, you will have to pay 5$ (5% after the first 3000$).

On third quarter after his release, you earn 2000$, you will have to pay nothing.

Do i pay just in one quarter of a year or all the 4 quarters , and do i have to pay for just first year or all years

Royalties are owed each quarter (all four) and each year that a Product has revenue exceeding $3000 that quarter.

You send them information they want about your product (sales, etc) then Epic send you the bill and information how to pay it. It’s write in documentation. And you should calm down a bit with 300k$ in 3 months, it’s harder doing it than writing it.

So do i have to pay 5% of the sum of what i got in all month in quarter or 5% on each month , do i pay 5% on what i got after i remove the 30% of the app store ?

The royalty is 5% of gross, so it’s before a 30% app store cut. And yes, it’s for gross revenue over the course of all three months in a quarter.

Okay thanks a lot , just to be sure so if i got 300000 in 3 months i will have to pay 5% of them = 15000 , btw how do i pay the royalties

Again there’s a distinction between what you got (your revenue) and what was paid for the Product (gross revenue for the Product). But if the gross revenue for the Product in 3 months is $300,000, then you owe $14,850 (or 5% of ($300,000 minus $3,000)).