#jacobwolf

1 messages · Page 1 of 1 (latest)

round karmaBOT
rugged totem
#

Create Customer is not a function to call from JS. It should be called on server side, using a secret key

tall vine
#

Right. What I mean is this

#

Is there a way, after that stripe.customers.create, that I'm able to get a returned ID?

#

So then I can have it execute another function (create subscription) from the user it just created?

rugged totem
#

ah okie so this is Node.js?

tall vine
#

Yes

rugged totem
#

the customer as response from stripe.customers.create should be an object with an ID, no?

tall vine
#

So the code would be similar to what’s return from the lookup?

#

Trying to avoid it duplicating customers

rugged totem
#

The look up would returns a list, and this customer is just 1 object

tall vine
#

Sorry for what may be a stupid question. Been a long time since I’ve used Node JS. Been focused on React and front end

rugged totem
#

No worry. You can add a log after calling it to see its content

#

like console.log(customer);