3

Today after doing thorough testing i switched to Live Account for Stripe. For my very 1st customer stripe charged twice even though on the server side i am creating just one customer and posting a single charge. I have a monthly subscription plan that i am using.

I never saw this issue in Test Account. I even tried my own card and got charged twice. The two charges are posted within 1 second of each other. I have checked my plan too and they are correctly set up

Viral
  • 43
  • 1
  • 3

2 Answers2

3

If you have a monthly subscription, that will automatically make a charge, there is no need for you to be posting a charge when the subscription does it automatically.

Matthew Arkin
  • 4,460
  • 2
  • 27
  • 28
  • Thanks for your response. But this issue never happened in Test Account where i created a customer and posted a charge for the same monthly subscription plan. I truly appreciate your response and will try without posting a charge and let subscription take care of it.. Would love to know how this did not occur in Test Mode – Viral Feb 04 '16 at 06:35
  • It should definitely happen in test mode, but maybe your plan in test mode had a trial – Matthew Arkin Feb 04 '16 at 07:22
  • @MatthewArkin Can you please give some code example here? I am in same situation. Please help. – Mitul Shah Dec 07 '16 at 07:00
0

(Should have commented but i do not have the rep)

I had the same problem on production not in testing. I found that if a customer is not a subscriber, my code was making it a customer first and then charging customer. But Stripe is already charged customer upon subscription.

"If(subscriber)->charge

else(make subscriber(Stripe charges now))->charge as customer"

The obvious fix is to make the customer a subscriber and quit if it is a new one, please do not call charge.

The not reproducible on testing issue is because all test accounts were already a subscriber .

don
  • 144
  • 7