No code needed. Open the link from the error (Settings > Billing > Customer portal, test mode), look through the options and hit Save. That creates the default configuration and your existing call starts working. Delete the configurations.create code Bolt added.
You have to do this once more in live mode before launch.