What age is ok to stop birth control?

What’s the best age to stop taking birth control pills, the mini pill?? I am almost 40 years old.