When you see "return to HubSpot" in the documentation, it usually means you're sending data back to HubSpot after a step in your app.
If you're changing HubSpot info like contacts or deals, use the resp. HubSpot API.
If you're tweaking how your app interacts with HubSpot without directly altering HubSpot's data, update your app's settings on your server and use them for future HubSpot API calls.