1

I am using Rails 7 and the Pay gem to create an auction/bidding website. A user places a bid, and through pay gem/stripe I am setting up a PaymentIntent and setting the capture_method as "manual". If the user is outbid then we cancel that PaymentIntent and setup a new one for the new bid. When the user wins the bid then we capture that PaymentIntent. All works well for a use case where bids are flowing in regularly.

But in testing I have come across the situation where the PaymentIntent is automatically canceling after a 7 day expiration period. There could be a situation where the auction goes for a month and so the first few bid(s) sit there for more than 7 days and I would rather them not be canceled.

Is it just a simple solution as setting up a delayed job that runs before 7 days where it cancels and creates a new PaymentIntent? Seems like it's straight forward but I worry about the users credit card statement and seeing authorized charges coming in and out.

Looking through Stripe documentation I know that if using Terminal you can request an extended_authorization, but we aren't using Terminal obviously. But not seeing a way to reauthorize instead of capture a PaymentIntent

cal1801
  • 135
  • 1
  • 11

1 Answers1

1

Overall you have two options:

  1. Cancel and re-authorize as you stated. Yes this can lead to confusion for the Ccstomer if they see multiple auth's on their statement. It is up to the issuer for when they drop those canceled auth's off the statement.

  2. Use a SetupIntent to collect a payment method ahead of time and then charge it once the bidding is complete. The challenge here is that there is a chance that the payment method is set up successfully but then the issuer decides to decline the actual charge at which point you would need to bring your customer back on-session to collect a new payment method and charge that one.

bismarck
  • 479
  • 1
  • 4
  • As a part of the user flow, they have to setup a payment method before placing a bid. That means we have a stripe customer with a payment method and connected to that payment method there is a setup intent already created. Part of the flow is that if they are the current "highest" bidder they can't remove their payment method. I really liked payment intents because its a pre-auth and we can sorta "guarantee" that amount. Might have to do something like check when auction is won if paymentintent connected to the bid is canceled, and then setup a new charge if it is.... – cal1801 Feb 03 '23 at 17:16