I used to have one credit card, but I dropped it in the designated box after I had attained my objective.
Is it wrong to use one and had attained?
From your statement, I would guess that you do not have any credit cards now. You used to have 1. But now you do not.
I am not sure why you would place your 1 credit card into a designated box. I would destroy my credit card rather than put it in a box I do not control. Unless it was my box, but then I would still possess the credit card. It would still be mine even though it is in my special box that I designated for my credit card. So then the statement "I used to have one credit card" is invalid.
"One" has a different meaning to "I". It's closer to "people". So in your example it wouldn't make sense unless you altered the first pronoun and other elements as well.
One used to have credit cards, but dropped them off them in the designated boxes after they had attained their objectives