Skip to main content

Return values

As with any other JavaScript function, Interval actions can return values. The values you return from actions are stored by Interval in your organization's history of transactions.

In practice, this means that you should use return values to provide additional context to your organization's transaction history. For example, if you write an action to refund a user, you might include the refund amount and the ID of the refunded user as values in the object that you return.

An action may return any JavaScript primitive or an object containing primitive values. Any nested keys will be stringified and flattened.

Return values are not encrypted in our database, so we recommend against returning sensitive information from actions.

Did this section clearly explain what you wanted to learn?