#thepunisher_api

1 messages ¡ Page 1 of 1 (latest)

remote siloBOT
#

👋 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.

lavish raven
#

hi there, can you share a request ID for the payment intent creation step?

balmy osprey
#

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.

lavish raven
#

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

balmy osprey
#

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?

lavish raven
#

that is correct, the confirm step is when Stripe reaches out to the bank

balmy osprey
#

Ok Thank you.

balmy osprey
#

Is there any way to do some sort of preauthorizaton check?

lavish raven
balmy osprey
#

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.

lavish raven
#

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

balmy osprey
#

Interesting. Thank you.