Spoiler alert: Fifty Shades Freed, the third book in the Fifty Shades of Grey trilogy, does have a happy ending.
The first two books Fifty Shades of Grey and Fifty Shades Darker explore the progression of Anastasia and Christian's relationship. At the end of the second book they make the decision to get married.
In the third book they must deal with a mysterious man who is after Christian and his family. At the same time Ana discovers that she is pregnant and Christian is not happy about it. It takes almost losing Ana to learn that he wants a family with her. At the end of the series they have their dream home, a happy marriage, and two children.