Hi!
I am currently setting up a new product line for my company. Basically it is a micro SaaS offering within our main product features. I’ve created a subscription funnel, very simple and at the end I have the stripe integration to handle the subscription.
I am having a hard time testing this on staging.
Here is what I tried
- Using test price_ids from stripe:
- I create the payment intent (using the test mode product_ids from stripe)
- I add the test card details (42424 etc.)
- I confirm the payment
- Upon confirmation I get an error from stripe saying
"No such price: 'price_XXXXXXXX'; a similar object exists in test mode, but a live mode key was used to make this request."
- Using live price_ids
- I create the payment intent (using the test mode product_ids from stripe)
- I add the test card details (42424 etc.)
- I confirm the payment
- Upon confirmation I get an error from stripe saying
Your card was declined. Your request was in live mode, but used a known test card.
So it appears to me that I have an issue with the staging environment not taking the test API keys.
How would you handle it?
I thought of using a deployment variable, but I am having a hard time finding the stripe test API keys.