#batz_api

1 messages · Page 1 of 1 (latest)

lethal groveBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1435687039931514953

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

thick eagle
#

is there a way for them to automtically renew their term of 7 days ?

main island
#

Hi there,
is this for one-off payments or for recurring payments?

thick eagle
#

once off payments

#

but we use setupIntents for customers when they checkout to store their card details

#

so i believe we can use the payment method on their account at a later date if needed

#

but just curious about the approach

main island
#

Yes, SetupIntent is what I was aiming for

thick eagle
#

because we need to create a payment intent initially to put a hold on their account

#

ok so i have that functionality working now i updated to setupIntents

#

but when it comes time to charging the customer do i just create a new payment intent and immediately confirm it ?

#

How would you approach the problem if you were in my shoes . Apologies I know your job may not be to advise me on how to do my job

#

but i just cant think of concrete way to do it

#

also be aware initially we just put a 50c hold on their account

#

but that will expire every 7 days

main island
#

When you create the SetupIntent, you basically collect the payment method for future Payment Intent. The Payment Method will be saved and you can attach it to the customer. Later you simply create a Payment Intent using that Payment Method for the customer and charge it directly.

#

Is there a reason for the hold? Whats the purpose?

thick eagle
#

Just we always saw other companies doing it so we were like yeah thats the right way to do it

#

so on my backend i should just store the customerId associated with the customer account and deffer payment intent creation and confirmation until the seller confirms it in our dashboard ?

#

so when we complete a booking we would simply create and confirm the payment intent then ?

#

Also sorry I am using stripe connect accouts for sellers so all customers and transaction data is stored on the connect account

main island
thick eagle
#

honestly the backend part doesnt matter apologies

#

but I am using stripe connect accounts and creating customers and transactions directly on the connect account

#

so setupIntents function the same way whether its on a connect account or main platform account ?

#

like there is nothing else i need to think about if we are using stripe connect ?

main island
#

Yes if connect or not makes no difference. Just make sure to add the Stripe Account header of the connected account if want to create the SetupIntent on the connected account.

thick eagle
#

yes thats already done amazing thank you for your advise

#

I have one more question actually when we create a setupIntent it attaches the payment method to the customer which is fine

#

but if i was to come back at a later stage and use the same card it will attach it again even if its the same card

#

is there anything in stripe that checks the payment methods before adding it to see if it exists already and if it does just use that and dont attach a payment method or do i need to just add a custom piece of code for this

main island
#

If you already have an attached Payment Method, there is no need for another SetupIntent

thick eagle
#

understood but we currently dont have normal user accounts at this point in time just the seller page so the user never logs in so it doesnt store the details on an account

main island
#

I am not sure I follow. Do you already have a customer with an attached PM at this point?

thick eagle
#

yes

#

it creates a customer in stripe

#

but the user never actually logs into our app

#

so how would we tell if its the same customer ?

#

sorry yes we have a customer with an attached PM

#

but we do it by email in the checkout field

#

so we check if the user exists in stripe and then update that customer

lethal groveBOT
tiny garden
#

Hi, taking over as my teammate needs to step away. Let me catch up.

thick eagle
#

no worries

tiny garden
#

You can store that customer data on your database, and the use the metadata on the customer id on Stripe to map them. When they are back online, you can confirm from your database which customer this is and then charge the customer on the server-side.

#

Let me know what questions you have after reviewing the document.

thick eagle
#

okay give me a few minutes

tiny garden
#

Sure

thick eagle
#

ok so i have read the docs and currently i have already implemented setupintents in my project and they are working.

lethal groveBOT
thick eagle
#

My main question was

  1. We have a Seller Page where a seller sells his services
  2. The user goes to this page and purchases without logging in because we dont have suport for just a normal user login at the moment.
  3. Once they complete check out we use a setupIntent to store the card details on that customers account.

Now when the user comes back if they use the same card details it will add the same card details even if an identical match already exists on the customers account.

and the only way we validate these returning users is when they check out if they use the same email at checkout we will search to see if a customer account already exists and use that customer account.

Would you advise mabye from a security stand point to just create a new customer for every single order rather than reusing the previous customer as we have a lack of security e.g. account where you need to sign in.

Also would the stripe account creation process be interrupted by using the same email to generate another account ?

#

Also finally i was curious if we do stay with using the existing account if we add an identical payment method it seems to add to the account or would we just check that user account before the setupintent creation and check if they have a valid payment method before doing the setupIntent process ?

#

Also would there be any issue from a cost stand point of creating somany users ?

#

or performance aspect ?

tiny garden
#

The same email address can be used to create multipe customers

#

Also finally i was curious if we do stay with using the existing account if we add an identical payment method it seems to add to the account or would we just check that user account before the setupintent creation and check if they have a valid payment method before doing the setupIntent process ?

Yes, if the fingerprints match, you would not want to create another SetupIntent

#

There is not direct 'cost' for just creating the customer. However, you will incur cost each time you confirm a SetupIntent

#

For this reason, I recommend not creating a customer + SetupIntent each time the customer comes back

thick eagle
#

1 minute

tiny garden
#

sure

thick eagle
#

Ok and from a security stand point if we are only validating the customer based on what email they type in this would be crazy ? Like what if i used another persons email address that had a customer account with stripe and it used that account

#

I know this is outside of your warehouse in terms of stripe but just curious

tiny garden
#

Yeah, I can't advice on security. I'm here to help you implement the solution.

thick eagle
#

ok no worries

#

thank you for the advise on checking if the card already exists by fingerprint

#

thats super helpful.

#

I think thats everything

#

apologies for the long converstaion

#

Have a great day.

tiny garden
#

Sure, that is what we're here for

#

Glad that was helpful

thick eagle
#

100% thank you 🙂

#

actually wait sorry

tiny garden
#

NP

thick eagle
#

you said you incur a cost everytime you confirm a setupIntent ?

#

is that right ?

#

so our connect account users where we create the setupintent the connect account would be charged for this ?

#

or the main platform account

#

and how are the costs determined ?

tiny garden
thick eagle
#

Oh okay i just see no mention of it in the docs

#

thanks again

#

Have a great day !

tiny garden
#

Sure, you as well