Trial membership

Hello!

I’ve built a form, where a user can create a trial membership of 1 month. After this month, he will pay 10 dollar for month.

Now: I’d like that the user will be demoted to free membership only if the payments fails twice.
How I can set this?
I’ve searched into s2member documentation but I can’t find this detail.

Thanks.