# Actions, Stripe, Logs

**URL:** <https://community.auth0.com/t/actions-stripe-logs/76998>\
**Category:** Get Help\
**Tags:** actions\
**Created:** [January 25, 2022, 4:15pm UTC](https://community.auth0.com/t/actions-stripe-logs/76998 "2022-01-25T16:15:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ragno](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ragno/32/24037_2.png) [@ragno](https://community.auth0.com/u/ragno)\
**Post date:** [January 25, 2022, 4:15pm UTC](https://community.auth0.com/t/actions-stripe-logs/76998/1 "2022-01-25T16:15:12Z")

</div>

I want to update user metadata with stripe information when the user logs in. I know that Actions are preferred over Rules.  
Can this be done from an action?  
I deployed an action on login that just does a console.log. Where can I see this log? It is not in Monitoring | Logs.

Fred

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [January 25, 2022, 7:05pm UTC](https://community.auth0.com/t/actions-stripe-logs/76998/2 "2022-01-25T19:05:31Z")

</div>

Hi @ragno

Welcome to the Auth0 Community! It’s great to have you on board 🙂

You can set user metadata with a post login action like this:

```auto
exports.onExecutePostLogin = async (event, api) => {
  api.user.setUserMetadata("favorite_color", "blue");
};

```

Please see this reference for a specific example plus lots more [https://auth0.com/docs/customize/actions/triggers/post-login#enrich-the-user-profile](https://auth0.com/docs/customize/actions/triggers/post-login#enrich-the-user-profile)

The console log messages can be viewed via the Real-time Webtask Logs Extension [https://auth0.com/docs/customize/extensions/real-time-webtask-logs](https://auth0.com/docs/customize/extensions/real-time-webtask-logs)

Install it into your tenant via the Extensions menu option on the left hand side, click on the extension to fire it up, it will connect to your tenant and listen for console.logs. Trigger your Action via a login/registration etc and watch the logs roll in 🙂

Let me know if you have any further questions on this.  
All the best.

---

<div class="post-metadata">

**Author:** ![ragno](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ragno/32/24037_2.png) [@ragno](https://community.auth0.com/u/ragno)\
**Post date:** [January 25, 2022, 8:29pm UTC](https://community.auth0.com/t/actions-stripe-logs/76998/3 "2022-01-25T20:29:01Z")

</div>

Thanks! Now how can I call to see what the userMetadata is (if it has been set, or null if not)

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [January 26, 2022, 11:27pm UTC](https://community.auth0.com/t/actions-stripe-logs/76998/4 "2022-01-26T23:27:02Z")

</div>

Hey @ragno

The user\_metadata is a javascript dictionary type so you can query it as such, also you need to use the event object to get the values from it e.g.

```auto
Object.keys(event.user.user_metadata); //List all keys
event.user.user_metadata.favorite_color; //Get the value for a specific key

```

I hope this helps, please get back to me if you have nay further questions.  
Warm regards.

---

<div class="post-metadata">

**Author:** ![ragno](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ragno/32/24037_2.png) [@ragno](https://community.auth0.com/u/ragno)\
**Post date:** [January 27, 2022, 12:45pm UTC](https://community.auth0.com/t/actions-stripe-logs/76998/5 "2022-01-27T12:45:32Z")

</div>

Perfect. Thank you saqib!

-Fred

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [January 27, 2022, 11:53pm UTC](https://community.auth0.com/t/actions-stripe-logs/76998/6 "2022-01-27T23:53:57Z")

</div>

No problem, I’m glad I was able to help.

All the best.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 8, 2024, 12:11pm UTC](https://community.auth0.com/t/actions-stripe-logs/76998/7 "2024-01-08T12:11:11Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
