It was one of the lowest money moments of my adult life. I was standing in line at Walmart with a cart full of groceries and many people behind me.

My primary credit card got declined, and I was embarrassed. Then, the second card I tried was declined, too. I can’t accurately convey my feelings at that point. It was awful. That day, my husband and I happened to be shopping with my mother, and I had to ask to use her credit card. As a grown, married adult, asking my mom for her credit card was the last thing I wanted to do.

I don’t know what was worse: having two cards declined or having my mom bail me out.

Of course, I wasn’t alone. Over a three-month period, 13.5 percent of consumers reported having had their credit card declined, according to a survey by PYMNTS. Still, even if it is something many Americans experience, the reality still stings.

As I rode home with my head buried in my hands, I wondered how I ever got to that point.

How We Got to a Credit Card Decline

Just a year or so before this episode, my husband and I both had decent jobs. We weren’t great with money, but we weren’t reckless either. Still, like many Americans, we had a little bit of credit card debt.

Our own slice of the $790 billion pie that Americans owe to their credit card companies, according to the Federal Reserve Bank of New York. We probably went out to eat too often, but we always paid our bills on time and usually had money in the bank.

Then, my husband applied to medical school and got accepted into one outside of the country. We made the tough decision to quit our jobs and move. We were living on student loans, and I had just started freelance writing.

I remember very specifically that, at the time of the Walmart Incident, I had received a payment for a writing job I did. When I was in the checkout line, the money was still in the middle of being transferred from PayPal to my checking account.

As mortifying as it was, this experience was the catalyst for me to improve our financial situation.

I immediately got motivated to hustle and book more freelance writing jobs, and I quickly increased my income. A few years ago, when I started freelance writing, I got paid $10 per post for my first writing job. These days, I support a family of four on my writing income, so I’ve come a long way.

I also used my freelance writing income at the time to chip away at my credit card debt.

By watching what I spent and budgeting with cash envelopes, I was able to pay off $6,000 of credit card debt in 18 months. Then my husband and I were able to build our first emergency fund, and things got a lot better after that.

I don’t wish a declined a credit card on anyone. But if it does happen, here are some steps you can take:

When Your Credit Card Gets Declined, Stay Calm

Before you get upset, stop and think about your card’s limit and security features. Did you hit the limit? Are you on vacation and shopping in a different location, or spending a larger amount than usual?

About one-third of credit card declines are due to the bank verifying the legitimacy of your purchases, according to a PYMNTS report. Essentially, there’s a one in three chance that’s to blame for your circumstance.

Have a Plan B

If you have a feeling that you’re over your card limit, attempt a different payment method, whether it’s your debit card or another credit card. I also always keep a blank check in my wallet for those rare occasions when I need one. Of course, having cash on hand mitigates this issue if you are making a smaller purchase.

However, if you’re positive that your card should work, and you have no other payment method, you can always call the number on the back of the credit card. Try to see what happened, and ask if the lender can unlock your card.

You can also see if a friend or family member is nearby and can help you out (like I did with my mom that day in Walmart).

If All Else Fails

Lastly, in a worst-case scenario, if you know for a fact that none of your payment methods will work and you have no backup, politely ask the cashier if they’d like you to put the products back where you got them (the answer will almost definitely be no). 

Then, go ahead and leave your items there and exit the store. Had my mom not been in Walmart that day, this is the route I would have needed to take.

After Your Credit Card Gets Declined

There are many steps you can take in the aftermath of a credit card decline. But the most important thing is to act quickly.

“If you have a credit card declined, you need to call the credit card company as soon as possible. They will be able to help you understand why it was declined,” certified financial planner Michael Shea explains.

“I’d then run a credit report through one of the credit bureaus to make sure your credit is in good standing,” Shea adds. “If there are any issues on the credit report, you may be able to dispute them. Otherwise, you’ve likely maxed out your credit card and need to get a debt management plan in place to pay off the debt.” 

The Bottom Line

Ultimately, I’m actually glad that this embarrassing moment happened to me.

As horrible as it was, that was the day when I decided to take better control of my finances. I knew that I never, ever wanted to feel that embarrassed again. It has been a long road. But I’m proud to say that I’ve never had a card declined at a store since, and I doubt I ever will again.