This clears the sandbox account for the App Store (but not for iCloud or GameCenter), on macOS:
Open App Store app Preferences (⌘ ,) Sandbox account Sign out
Topic:
App & System Services
SubTopic:
StoreKit
Tags: