#amadeus-confirm-paymentintent
1 messages ยท Page 1 of 1 (latest)
Thanks for your patience here. There are other things you can get in that case
For example if the PI requires a next action
So definitely check the status of the PI when you get it back
ok, thank you for your answer.
if I have a related question, should I start a new thread, or ask here?
Ask here please
card payment methods have some dummy ids available for testing, e.g.: pm_card_chargeDeclinedInsufficientFunds
are there such ids for testing sepa direct debit failures (e.g. insufficient funds)?
or do I need to create myself a payment method and a mandate to test that?
Hello! I'm taking over for @amber crypt, let me get caught up...
No, we don't have IDs like that, but we do have several test SEPA account numbers which you can find here: https://stripe.com/docs/testing#sepa-direct-debit
I see these numbers, but I'm struggling to use them to be honest.
I created a payment method with one of these numbers, and passed it to payment intent
I'm getting the following error:
Stripe\Exception\InvalidRequestException with message 'This PaymentIntent requires a mandate, but no existing mandate was found. Collect mandate acceptance from the customer and try again, providing acceptance data in the mandate_data parameter.'
and then I don't see any endpoint for creating mandates, so how do I go about testing a failing off_session sepa debit charge?
Are you using Checkout or your own custom payment form?
checkout
I am trying to test the following scenario
we're a marketplace for cleaning services
we take 1st hour deposit
I want the deposit payment to succeed (we store payment method for subsequent payments)
and then, we charge the customer for the remaining amount (however long the cleaning took) - I want THAT payment to tail
we're currently with Mollie, but I want to migrate to stripe to do payouts to providers as well
the remaining amount is done off_session
Ah, I see. I don't think there's a way to test that specific scenario in test mode with a Checkout integration.
do you have any suggestion where can I see possible responses at least?
I am guessing CardException won't be thrown for sepa_debit failures, right?
Honestly it might be a CardException for legacy reasons. We show all the exception types here: https://stripe.com/docs/api/errors/handling?lang=php
To test this I think you would need to follow the non-Checkout guide and use the test numbers after you build what's described there: https://stripe.com/docs/payments/sepa-debit/accept-a-payment?platform=web
Let me check one other thing though...
Actually no, I think this will work better: you can follow this guide to save, but not charge, using SEPA + Checkout: https://stripe.com/docs/payments/sepa-debit/set-up-payment?platform=checkout
You should be able to plug in any of the test account numbers and save them to a Customer that way, then you can charge off-session after that and get the different responses.
That way you won't have to build a custom payment form just to test this.
one sec, I'll just try it
ok, so tested it for this number:
DE62370400440532013001 The PaymentIntent status transitions from processing to requires_payment_method.
and then initiated an off_session payment intent on it. In response, I got a payment intent with "pending" charge, not an exception.
is there actually a testing number for "insufficient funds"?
No, SEPA takes time to process, so the response you get after confirming the Payment Intent will always be pending. Later you'll get information regarding the outcome of the payment once it processes.