#JCoDog-customer-creation

1 messages · Page 1 of 1 (latest)

rugged bay
#

Hello! That depends entirely on your integration I guess. The API will respond to your request with the new Customer object that you can use how you please

#

Or you can listen for customer.created events via a webhook and action accordingly

terse elk
#

I do not have time for the created webhook... I need to use the customer ID in a subscription checkout that they just triggered

#

I check my database for their customer ID, if it doesnt exist. It makes one for them, then uses that.

#

To be honest I am not sure if it even sends that customer object to stripe to process yet

#

This is the bare bones

rugged bay
#

Sounds like you need to make a call to your DB to persist the Customer object ID you just created with Stripe then

terse elk
#

Yes, but how do I do that, is that code instantly creating the customer? And how do I retrieve the ID?

rugged bay
#

Give the stripe->customers->create call a variable then you can use the response in the Checkout Session call

terse elk
#

Like this?

rugged bay
#

Yup!

terse elk
#

ok thanks

rugged bay
#

Sure, np!