#warrenn1_api
1 messages · Page 1 of 1 (latest)
đź‘‹ Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1283186603585704018
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
You likely found the docs on separate auth and capture: https://docs.stripe.com/payments/place-a-hold-on-a-payment-method
For any long-running holds, one way you can model this is to keep track of when a hold will expire and then make a second authorization. If that fails, you can decide to capture the amount from the original bid/auth
So just to be clear, from the link it seems I can only place a hold for up to 7 days from most cards?
That's right. If you're interested in up to a 30-day hold, I recommend reaching out to our Support team about this: https://support.stripe.com/contact/
A 30 day hold still won't really solve your use case though
Do you have another recommendation?
Just what I mentioned above re: "stringing" holds together until you hit your desired time frame for the hold
Otherwise, you could not place a hold at all and just collect payment details using SetupIntents. If someone wins the bid, you can make an off-session payment at that time. If the off-session payment fails, you can decide whether to prompt them for new payment details or move on to the next highest bidder
I recommend reviewing this guide: https://docs.stripe.com/payments/save-and-reuse
The end of this details how to use a saved PaymentMethod when the customer is off session
Okay so just so I am perfectly understanding this.
- On account setup, I can save a customers card information.
- Then on my platform they can do all the necessary bids etc.
- Then if they win the bid I can use the stripe_customer_id associated with the user that won the bid to get their Card Info they saved earlier.
- I can use that along with a payment attempt server side to execute the charge WITHOUT bogging the customer down with approval stuff etc.
- If that fails, I can notify the customer they need to resubmit payment.
Does this sound correct?
Thank you again for all of your help. It is deeply appreciated.
I love your guys' product and what you do at Stripe and would love to use it for all the payment services my business will require.
Yep, that's right!
Though note that, even if you're confirming payment server side, the issuing bank might still need additional authentication/action from the customer. In that case, you'll need to have the customer come back on session and confirm the payment client side
Because ideally I would basically like them to sign a slip going "Yes I consent to you charging me X amount at this later date." Then I get a token back representing that promise and then when the time comes I use their saved card with that token to charge them that exact amount.
If the payment needs additional action, the PaymentIntent will be in requires_action state
I am assuming I still need to create a CheckoutSession for the customer then?
Or does the above process work with no revision needed?
No, you wouldn't use Checkout to confirm such a payment. Checkout should only be used when someone is signing up for the first time/the first time you're collecting payment details from them. It's not possible to use Checkout to confirm an existing PI
Okay. So is it:
- I get the card info. Then I make the payment intent server side and then charge the card. No user interaction necessary.
Or - I get the card info. I then prompt the user with a payment intent on checkout. I save that payment intent for later in my db. I can then fulfill it when the bid succeeds by using the attached card.
I don't quite follow # 2 or why this is an "or" scenario
One involves user authorization for a specific payment amount via your guys’ api. Then other is I store the bids in my DB and execute payment when bids finalize.
Let's try to be really clear here
Taking one step back so I use the right terms. Are you currently using Checkout Sessions in payment mode with payment_intent_data.capture_method: manual for creating holds?
No. I am building from the ground up with you guys.
I am open to any process to achieve the result I am looking for.
I get the card info
How are you currently doing this?
Using the setup intents endpoint.
and the PaymentElement?
What do you mean PaymentElement. As in what Frontend element provided via the JS library am I using to collect card information?
Right, what are you using on the frontend to collect these details?
The essence of my question boils down to:
I want to create something that a user can simply say “yes if the bid succeeds, please use this card information and billing info and charge me this agreed upon amount.”
As for the Frontend, I am not focused on that. I simply want to know how to basically go:
- Save the customer card info with us for later on setup of their account.
- When the user confirms all of their bids, have them approve for a set of payments to be made later IF the bid goes through.
- When their bid goes through, I use their card they saved with us with the approval they made for the future payment in the bidding step to perform the transaction without asking the user to consent a 2nd time.
What would be the exact steps to do the above?
I will use whatever Frontend elements are necessary if I can get the above behavior.
So yes, you would use SetupIntents for this. For step # 1 , up to you if you use Checkout Sessions in setup mode or create a SetupIntent server side and use the PaymentElement client side to collect their card info
For #2, that sounds like it happens completely outside of Stripe, at least until you have to use the amount from those bids to actually create a payment in #3. Is that accurate?
In step 2 I would ideally like the promissory aspect to happen via Stripe. When the user goes “yes I promise to pay these amounts” stripe generates a promise I can store with their bid on my end. I then track when/if the bid goes through. ** I then use that promise for later with their information to perform the transaction solely server side **. If this can be done via checkout, payment intents etc. I don’t care. I just need it to function this way.
If that is not possible, then I am okay with what you implied where I store all that info on my end and then perform the payment in step #3. However, I would like this to only happen server side and only require the client if absolutely necessary (ie. the payment fails).
But this one is the strongly strongly preferred one.
When the user goes “yes I promise to pay these amounts” stripe generates a promise I can store with their bid on my end.
The only real option for this is a hold but we've ruled that out due to time frames. SetupIntents are the next best thing as confirming a SetupIntent client side (when the user provides their payment details) is essentially them granting you permission to complete future off-session payments with the saved payment details
So, for #2, you'd still need to collect and track their bid amount so you know what to charge them for #3. When their bid goes through, you can attempt an off-session charge server side but there's no 100% guarantee that this charge will go through or not require additional customer authentication. That's purely a decision on the issuing banks side
Okay. So there is no promissory object via Stripe I can use? Just use the payment intent on my end with their setup intent off session and email the client for example if the issuing bank has a problem.
Because of holds not being a long enough period for my use case.
Right
Okay. Thank you for that information. That helps a lot.