#thepunisher_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/1404839668364873739
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, can you share a request ID for the payment intent creation step?
Create: req_qjWeyMopVHyTZm
Confirm: req_z8KUSWcwMfs2NT
But the above is with the 4000000000000341 card. We'd like to test insufficient funds to see whether that will raise on create.
you can try using the payment method codes directly instead of attaching to a customer, such as pm_card_visa_chargeDeclinedInsufficientFunds. however ultimately the bank is who decides whether a card is declined, not Stripe, so I don't think what you're attempting to test is possible
That approach raises with "Stripe::CardError: Your card has insufficient funds. (Stripe::CardError)" on the confirm call.
So in prod, insufficient funds will raise on confirm, not create?
that is correct, the confirm step is when Stripe reaches out to the bank
Ok Thank you.
Is there any way to do some sort of preauthorizaton check?
you could potentially use auth and capture, but it would be basically doing the same thing you already are, where Stripe reaches out to the bank for verifying the card https://stripe.com/resources/more/preauthorization-charges-on-credit-cards-what-they-are-and-how-long-they-last#:~:text=A preauthorization charge is a,funds to cover the transaction
what problem are you trying to solve?
We have a completely separate system that lets service providers display the amount for their service to customers. Then the customer clicks a button to accept the amount. Once the service is completed, our system recieves a webhook and charges the customer's card for the amount the customer agreed to in the other system. We would like to alert the customer that their card will not cover the amount when they accept the amount, rather than when the service has been completed, and then charge fails.
ok, in that case I think separate auth and capture may be a good flow. the initial payment intent creation would place a hold on the card for the amount specified, and then as long as your system processes the transaction within the acceptable window, you can capture the funds manually later https://docs.stripe.com/payments/place-a-hold-on-a-payment-method
you can read more about the window and other restrictions on this method in this section https://docs.stripe.com/payments/place-a-hold-on-a-payment-method#auth-capture-limitations
Interesting. Thank you.