Della had exactly $1.87 to start with -- at the beginning of the story. We do not know exactly what she has in mind -- in fact we do not know for sure if she had any particular thing in mind at all.
All we know is that it had to be something special. The quote is that it should be
something nice for him. Something fine and rare and sterling--something just a little bit near to being worthy of the honor of being owned by Jim.
As it turns out, what she buys him is a chain to put his watch on (this was back in the days of pocket watches). But I think it's pretty clear that she didn't know that was what she was going to get because she has to go "ransack" the stores after she gets some money.
In the story "The Gift of the Magi" Della wanted to purchase a watch bob for her husband Jim. Della thought that Jim looked very nice and prominent with his watch and wanted him to have a nice platinum fob chain. Della only has a dollar and eighty-seven cents.
Della has a possession hat she loves very much. It is her lovely hair. To get money she knows that she will have to sell her pride and joy, hair. Della wants to give her husband the gift more than her own vanity so she goes to a woman and sells her hair.
Della the takes her money and goes to the jewelers. The man does not think that she has the money for the fob at first, but she is able to buy it for her husband and can hardly ait to surprise him.