I am having issues with the RC Web SDK. I followed the instructions to get setup, and have successfully added products to Stripe & added to my existing mobile app offerings. I can now view my paywall with products:

When I click “continue” for either product it results in an error:

The console shows a 500 error to the RevenueCat API:
POST https://api.revenuecat.com/rcbilling/v1/purchase 500 (Internal Server Error)
qr @ Purchases.es.js:6824
postPurchase @ Purchases.es.js:7015
startPurchase @ Purchases.es.js:4850
ae @ Purchases.es.js:6398
eval @ Purchases.es.js:6383
Ei @ Purchases.es.js:100
eval @ Purchases.es.js:1782
cr @ Purchases.es.js:971
eval @ Purchases.es.js:1782
to @ Purchases.es.js:766
lt @ Purchases.es.js:816
ts @ Purchases.es.js:866
rs @ Purchases.es.js:852
ns @ Purchases.es.js:876
When i close the modal this error shows up in the console:
Purchases.es.js:4768 Uncaught (in promise) ce: Unknown backend error.
at ce.getForPurchasesFlowError (webpack-internal:///(app-pages-browser)/./node_modules/@revenuecat/purchases-js/dist/Purchases.es.js:4768:12)
at onError (webpack-internal:///(app-pages-browser)/./node_modules/@revenuecat/purchases-js/dist/Purchases.es.js:9263:36)
at HTMLButtonElement.R (webpack-internal:///(app-pages-browser)/./node_modules/@revenuecat/purchases-js/dist/Purchases.es.js:6435:8)
at HTMLButtonElement.click (webpack-internal:///(app-pages-browser)/./node_modules/@revenuecat/purchases-js/dist/Purchases.es.js:5158:36)
at HTMLButtonElement.fo (webpack-internal:///(app-pages-browser)/./node_modules/@revenuecat/purchases-js/dist/Purchases.es.js:1803:7)
at HTMLButtonElement.eval (webpack-internal:///(app-pages-browser)/./node_modules/@revenuecat/purchases-js/dist/Purchases.es.js:5061:8)
at eval (webpack-internal:///(app-pages-browser)/./node_modules/@revenuecat/purchases-js/dist/Purchases.es.js:1122:25)
at oo (webpack-internal:///(app-pages-browser)/./node_modules/@revenuecat/purchases-js/dist/Purchases.es.js:1106:12)
at HTMLButtonElement.a (webpack-internal:///(app-pages-browser)/./node_modules/@revenuecat/purchases-js/dist/Purchases.es.js:1122:14)
What am I doing wrong? I am under the impression I do not need any additional setup when using this SDK.
Here is my code for making the `purchase()`:
const handleSubscription = async (pkg: Package, email: string) => {
await Purchases.getSharedInstance().purchase({
rcPackage: pkg,
customerEmail: email
});
};
// arguments passed to RC purchase():
{
"pkg": {
"identifier": "$rc_monthly",
"rcBillingProduct": {
"identifier": "prod_RiL5rO2EYYxExK",
"displayName": "Monthly",
"title": "Monthly",
"description": "Monthly Subscription",
"productType": "subscription",
"currentPrice": {
"amount": 599,
"amountMicros": 5990000,
"currency": "USD",
"formattedPrice": "$5.99"
},
"normalPeriodDuration": "P1M",
"presentedOfferingIdentifier": "default",
"presentedOfferingContext": {
"offeringIdentifier": "default",
"targetingContext": null,
"placementIdentifier": null
},
"defaultPurchaseOption": {
"id": "base_option",
"priceId": "prc91fefcad308748de8a36",
"base": {
"periodDuration": "P1M",
"period": {
"number": 1,
"unit": "month"
},
"cycleCount": 1,
"price": {
"amount": 599,
"amountMicros": 5990000,
"currency": "USD",
"formattedPrice": "$5.99"
}
},
"trial": null
},
"defaultSubscriptionOption": {
"id": "base_option",
"priceId": "prc91fefcad308748de8a36",
"base": {
"periodDuration": "P1M",
"period": {
"number": 1,
"unit": "month"
},
"cycleCount": 1,
"price": {
"amount": 599,
"amountMicros": 5990000,
"currency": "USD",
"formattedPrice": "$5.99"
}
},
"trial": null
},
"subscriptionOptions": {
"base_option": {
"id": "base_option",
"priceId": "prc91fefcad308748de8a36",
"base": {
"periodDuration": "P1M",
"period": {
"number": 1,
"unit": "month"
},
"cycleCount": 1,
"price": {
"amount": 599,
"amountMicros": 5990000,
"currency": "USD",
"formattedPrice": "$5.99"
}
},
"trial": null
}
},
"defaultNonSubscriptionOption": null
},
"packageType": "$rc_monthly"
},
"email": "myemail@gmail.com"
}
Is there something different for Stripe to know Dev vs Prod environments?