#tiki-paymentintent-capture
1 messages · Page 1 of 1 (latest)
Here's what I said last time
The "extended authorization" starts when a PaymentIntent is successfully confirmed, not when it's created
So it's
- Create PaymentIntent and configure it for an extended authorization.
- Collect card details client-side and confirm the PaymentIntent
3.Once this succeeds, you get status: 'requires_capture and latest_charge: 'ch_123' as the Charge object that maps to the funds being held- Capture the PaymentIntent before the deadline
tiki-paymentintent-capture
Correct, in the scenario I am asking now we didn't enable the extended authorization (we don't want to keep money from customer 31 days, only 7 days)
Your flow doesn't really make sense to me.
DAY 1 - Collect card details client-side
....
DAY 5 - Confirm the PaymentIntent after getting the approval from the approver (here the 7 days authorization expiration time will start)
There's no real way to have 5 days between those two steps, that really doesn't make sense to me
Like you can use a SetupIntent first to collect card details and 5 days later do an off session PaymentIntent to try and hold funds, but you will hit declines at that point
Why not? That is the logic of our client
They allow to create the orders to customers but some of them need approvers
and that can take 5 days to approve
and then 5 more days to ship (and capture)
so, now we create the payment intent with confirm=true in day 1
but on day 10 when they ship the authorization already expired
so we want to create payment intent with confirm=false in day 1
after order is approved update the intent to confirm true
so in day 10 the authorization will not be expired
I am wondering if that idea will work with Stripe
or which options do we have
Please try to write clear sentences all of them as one clear paragraph instead of many sentences of 5 words or less in quick succession. Way easier to grasp your ask and for you to have clearly outlined the real ask
You can't collect card details on day one and do nothing with them for 5 days, that's impossible.
What you can do is collect card details with a SetupIntent and then later (5 days later) try to charge that card with a PaymentIntent.
Did you read my day to day message with the examples?
I am so sorry for writing unclear sentences @prime jolt. I tried to explain the situation as much as I can with my words.
Hi there đź‘‹ taking over, as my colleague needs to step away
It sounds like your question was answered. Are there any outstanding questions?
How so?
So, can’t we create a payment intent once we place the order (day 1) and then confirm the intent 5 days later once the order is approved by a manager?
Yup. You can.
You can't collect card details and confirm them 5 days later though. You have to confirm them when they're collected. You don't have to create a payment right away, but you WILL have to confirm the card when the customer enters their payment method details
What do you mean by “confirm card details”?
Confirm the card details. Authorize the card. They're the same thing.
It's a call you can make to Stripe to check if the card is valid before charging it
I joined the project a few months ago and this is my first time working with Stripe integration.
I will try to describe the scenario again and what I see in the code. Please correct me if I say something wrong in terms of Stripe integration @gleaming crown @prime jolt . I can double check the code if needed.
1 - We are working on a B2B scenario where customers will enter credit card details during the checkout.
We do have a controller that is handling the response of the credit card tokenization. The process of tokenization creates a PaymentMethod in Stripe which has a specific PaymentMethod.id and the card associated with it.
We store that PaymentMethod.id in our system (to not store credit card details)
2 - Then, when the customer decide it will place an order. At that time we do the authorization creating the PaymentIntent with confirm=true .
3 - After the order is created a business process is started to check/wait for order approval. Some of the customers require an extra approval step after the order is created, before sending the order to the fulfillment system. The approver can approve an order a few days after the order is created. e.g 5 days later.
4 - After the order is approved the fulfillment process is started and the order is sent to the fulfillment system and it can be there for 5 days at most.
In some point of that period the fulfillment system will notify us about the shipment, e.g: 4 days after they receive the order. After we receive the shipment notification we call stripe to capture the money of the corresponding order. And the fulfillment process will finish.
--
In the sample scenario I have described, the capture will be tried 9 days after the order was placed. And with the current configuration in those scenarios we are getting an error while trying to do the capture because the authorization already expired.
Yeah, that's because authorizations only last for 5 days
In that context, to try to fix the issue we are evaluating 2 options:
A - Create PaymentIntent with the "extended authorization" setup in step 2 (when creating the order).
That is the reason we posted this question: #1192176790806999104 message
However, after validating with business they don't want to hold customer funds for longer than 7 days.
So, this is not an option anymore.
B - Create the PaymentIntent with confirm=false in step 2 (when creating the order) instead of confirm=true . Then, in step 3, after we confirmed that the order was approved by the manager, update the PaymentIntent to confirm=true in order to "notify" Stripe that the counter for authorization need to be started.
Is this a valid option?
In case that is not a valid option? What can we do?
You need to wait to create an authorization until after the order is approved.
So, option B is not valid way to do that?
Option B would work fine.
You just need to wait until the order is less than 5 days from payment
Here's how you place the hold on the payment: https://stripe.com/docs/payments/place-a-hold-on-a-payment-method