Karen McArthur, a director at Ashers, took the order for the cake from Gareth Lee, a gay rights activist.
The cake was to have a slogan on it supporting gay marriage.
Although she accepted the order initially, Mrs McArthur said: "In my heart, I knew I would not be able to put that (slogan) on the cake."
Asked why she accepted money for it and expressed no concern about it to Mr Lee at the time, she said she did not "want to embarrass him or have a confrontation in the bakery".
It was more than 48 hours later, after consultations with her family that Mrs McArthur told Mr Lee that the order could not be fulfilled.
His money was returned.
Ashers Baking Company faces a discrimination case, brought with the support of the Equality Commission.
A barrister representing Ashers told the court that the County Antrim firm did not know, or care, about the sexual orientation of the customer who ordered the cake.
"The issue here was the content of the cake, and not a characteristic of the customer," he said.
"It was the cake not the customer."
The lawyer said that when Mr Lee was told his order had been cancelled, it was explained to him "courteously and sensitively" that the problem was simply the message on the cake.
Earlier, the general manager of Ashers, Daniel McArthur, gave evidence.
He was asked about a leaflet produced for the firm which indicated they baked Halloween cakes with witches on them.
Mr McArthur said it was no longer used by Ashers.
Asked if his church approved of Halloween celebrations, Mr McArthur said: "I've never talked to anyone in the church about it."
On how his faith impacted upon his work, he said: "We believe the business has been given to us by God and how we use it is on our shoulders."
The court was told Mr McArthur was appointed general manager at his parents' company two years ago.
He said the family had not taken legal advice before his mother Karen McArthur told the customer that the order would not be completed.
However, he said that that he had telephoned a church elder to "ask his thoughts" on the matter.
"We were not doing it in defiance of the law," Mr McArthur said.
"I think it is quite obvious that we do not know a lot of the ins and outs of the law.
"Our Christian faith is of utmost importance to us. It is how we run our lives; it is how we live our lives; it is how we bring up our families.
"Before God, this is something we couldn't make."
The case will resume on Monday.
The woman who took an order for a 'gay cake' in Belfast has told a court she initially accepted it to avoid a "confrontation" in the bakery.