We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

Why does the error "State ... doesn't exist" appear

There are a couple of reasons, why you might encounter the following error message State offer doesn't exist during checkout on the final receipt screen:

error.png

It is usually caused by an incorrectly formatted system or offer template in case that not all <div> tags are properly closed or if any JavaScript is included in the templates' code directly.

If certain that the HTML is correct, make sure that the offer being displayed contains terms - an offer with no terms may cause the issue - or check your payment provider configuration for any erroneous credentials.

Alternatively, errors like this can also appear in case some of the system template sections are included twice. The easiest fix for these cases usually is reverting the templates back to default or using the Compare code functionality to review any recent changes.

There are also other multiple errors that you might encounter that include a message State ... doesn't exist.

As a method of debugging these, we suggest reverting the Checkout template to default or checking if all <div> tags are properly closed in the section starting with <!-- Receipt Screen -->.

In addition, in case you have made any recent changes to any system templates, you can try reverting these to see if they fix the error. You are more than welcome to reach out to Piano support at support@piano.io in case of any persistent issues.

Last updated: