#supercodepoet - Customer portal

1 messages · Page 1 of 1 (latest)

sharp echo
#

Let's chat in this thread. Just reading your question now

tawdry tusk
#

sounds good. I can explain further if needed and my current process

sharp echo
#

Both options should be okay in this case. Your team can either create a configuration and use that configuration for all similar customers (e.g., all customers who are on a given plan), or create a new configuration every time.

#

New billing configurations will have an object ID but you can always add metadata to the configuration object: https://stripe.com/docs/api/customer_portal/configurations/create?lang=curl#create_portal_configuration-metadata

On your end, you can store the portal configuration IDs in a database so you don't have to get them every time you need to create a session.

tawdry tusk
#

yep, but can you retrieve it by metadata? It looks like ID only. For instance, I would like to write a process that will create the configurations the first time but if they already exist just update them if the process is run. I could check to see if the ID exists in the database but for testing situations these configurations could be removed from the database. It would be great to be able to query the API for configurations for a known key that I control and that I treat as unique like when I set the sku/id for Products and Prices

sharp echo
#

No, these are currently only retrievable by ID

#

In this case, the mapping between your known key and the Stripe-generated ID could be stored in a database on your end