#amilcar - Stripe Setup

1 messages · Page 1 of 1 (latest)

brittle bolt
#

Hi 👋

#

Are you using Stripe Connect? Why would your customers need a Stripe account?

light shadow
#

thank you for your reply Snufkin! yeah i'm using stripe connect! you know, i was reading through the docs and it didnt state that my customers need a stripe account. but after they purchase a suscription i'm receiven back a customer_id. on the docs, within the manage subscriptions tab, on step 4. provision and monitor subscriptions im reading:

#
case 'checkout.session.completed':
        // Payment is successful and the subscription is created.
        // You should provision the subscription and save the customer ID to your database.
        break;
brittle bolt
#
  1. Connect does not equal Customers
#

You will need Customer records as well if you plan on charging these individuals

#

Which doc are you referring to?

light shadow
#

im on step 4 of this flow!

#

my main concerned is about this customer_id

#

when the subscription is successful and the webhook gets triggered im receiving that param

#

but as far as i understand stripe is the one making the request to that endpoint

brittle bolt
#

What about the customer ID?

light shadow
#

how can i connect that customer_id with the customer that made the purchase if is stripe the one making the request to my api?

brittle bolt
#

What request are you talking about? Do you have an example subscription ID?

#

Subscriptions require a Customer to be set when creating them. They are Customer specific

#

If you are using a Checkout Session to create the Subscription and you are not explicitly creating a Customer, then Stripe will create a generic one to satisfy that requirement

#

If you specify always then the Checkout Session will create a customer based on the information it collects

light shadow
brittle bolt
#

The request to your API webhook endpoint is to notify you of activity on your Stripe account

#

Also webhook event object IDs will start with evt_

#

But yes, in this case there is a Customer ID

#

The customer was created as a result of using a Checkout session to create a subscription. As I said, all subscriptions require a Customer record associated with them

light shadow
#

got it snuf! the customer is being created during checkout.session.create but i can explicitly create it before the checkout.session.create and feed those options with the newly created customer?

#

and save whatever information i need from that customer to my DB?

brittle bolt
#

Actually the Customer is created when your customer completes the payment.

#

But if you have the data you need to identify customers in your integration and what a Customer record in Stripe that lines up with your DB then you can create the Customer record yourself and pass it to the Checkout session

light shadow
#

ok awesome! i guess my other question would be! if i dont provide a customer and they complete a payment. stripe creates that customer for me and i get a customer_id, with that customer_id i get to retrieve information from stripe about that customer recurring charges right?

brittle bolt
#

Yup

#

For example, Customer is a parameter you can use to filter the Subscription List API

light shadow
#

but if that exact same customer then make not a subscription purchase, but a one-time purchase and i dont neither provide any customer info to that action stripe recognizes the same customer and i get the same customer_id from that other purchase or is it a different customer_id i get from this other one-time purchase? idk if that makes sense

#

would you recommend creating a customer on stripe for every customer that signs up on my app? and just make all the request to stripe with that customer_id?

brittle bolt
#

That did not. No.

#

If you want to have all the purchases of your customers associated together then it would make sense to create a Customer record for each of your users.

light shadow
#

aight! i guess that answers my question snuf! thank you for your time