Fixing Stripe Sandbox Error: “Could not get subscription”
If you see an error like this when working in your Sandbox environment:
Could not get subscription "No such customer: 'cus_XXXXX'; a similar object exists in live mode, but a test mode key was used to make this request."
…it means the Stripe customer exists in Live mode, but your system is trying to access it using a Test key, causing a mismatch.
To resolve this, you need to delete the Stripe customer record stored in Business Central Sandbox environment.
How to Delete a Stripe Customer in Sandbox
Open Power BI Insights Connector in Business Central
Select Personalise in the settings drop-down (top-right of the page)
.png)
Go to Actions and make the Delete Stripe Customer action visible
.png)
Run the Delete Stripe Customer action
This will remove the incorrect customer reference, allowing Stripe test mode to work properly again.
Select Subscriptions > Subscriptions and check which subscriptions are active
If you would like us to activate subscriptions in your Sandbox environment, send us the customer ID and we will activate the subscriptions for you: https://businesscentralinsights.com/get-customer-id