#bpcreech_code
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/1272565818391265301
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello, no we don't really support anything like that. The recommendation is to mock the necessary responses for your tests.
hmm, the nature of the tests I'm working is to use the actual Stripe API (in test mode) so I think I can't mock this—I need a SetupIntent in the succeeded state so I can use the payment method
You can confirm on your backend for the test using our test PaymentMethods: https://docs.stripe.com/testing?testing-method=payment-methods#cards
Like pm_card_visa
That might get you what you are looking for.
Otherwise, like I noted, you shouldn't hit the API for your tests and instead you should just mock the response of a successful SetupIntent
are there any test PaymentMethods for PayPal (or SEPA or Bancontact?)
No, not like the above. You would have to create them, but you can also do that via your backend using test data for certain types like SEPA Debit: https://docs.stripe.com/payments/sepa-debit/accept-a-payment?web-or-mobile=web&payments-ui-type=stripe-hosted#test-ibans
I'll say it again though, the best and easiest thing to do here is to mock responses.
We don't have an API designed for programmatic testing.
I see, thanks!