Stripe Pack - Getting Customer ID

Using the stripe pack, I can’t find a way to get the customer id without knowing it ahead of time. I’m using some automations and forms to generate customers, but then in order to trigger any actions with those customers (or any customers for that matter), I need their customer ID. When they’re created, there’s no way to grab it. The only solution I’ve found is this:

  1. When creating them, give a unique ID in the metadata or description
  2. Use the stripe pack customer table, wait for it to sync, then grab their customer ID by filtering that table for the unique ID we created

This is definitely not ideal. I feel like it just makes so much sense for the customer id to be accessible / stored in coda when you create a customer… so I must be missing something. Is anyone aware of where / how I can find it?

Hi @Connor_Johnson1, I am Leandro the creator of the Pack, more than happy to help!

The CreateCustomer action does indeed return the entire customer object which has the id on it. One thing you can do is store the customer when created and then read the id from it, the following way:

I am using the ParseJSON because Coda does not the type of thing that you store in the Result column, but maybe @Scott_Collier-Weir knows a better way.

Nope. Sadly, the parseJson way is the best way to go with that implementation

But Leandro, wouldn’t it be more user friendly to have the button just return the customerId and then have your users use the “GetCustomer()” formula on that Id?



That is the recommendation in the documentation:

If your action is creating an item in an external API you could return the URL or ID of the new item.

Although it’s often requested, we currently don’t have a great pattern for buttons returning objects / rich data.

1 Like

@Eric_Koleda thanks for that, didn’t know that it was the recommendation for actions that create records.

Will check my Packs and update accordingly :slight_smile: