#nayandev_api

1 messages · Page 1 of 1 (latest)

glossy willowBOT
#

👋 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/1367022389841629236

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

dense dagger
void magnet
#

acct_1Qp0zpGHic5sXtZa

#

Please check

#

so there is multiple customer generate for that

dense dagger
#

hello! that's expected behavior, Stripe doesn't de-duplicate customers with the same email for you at the moment. If you want to prevent duplication of customers, you would need to manage that in your own application i.e. do your own verification checks to see if that particular customer's email already exists

void magnet
#

I have use laravel Stripe SDK for the inegration.

#

I think that issue is related to simulator when i run simulator than its auto generate new customer

#

so any way to stop that?

dense dagger
#

what simulator are you referring to?

void magnet
#

this one.

#

for future time

dense dagger
void magnet
#

Ok can you please help to stop that generate duplicate customer i will share code for ref.

#

Please find code i have use for the check existing cusromer and generate new customer

dense dagger
#

We can't help you stop duplicating customers because the code comes from your own server. You'll need to troubleshoot and update your code to check if a customer already exists with a specific email address before creating a new one.

void magnet
#

private function getOrCreateCustomer($email, $customerName) {
$existingCustomer = Customer::all(['email' => $email]);
if (count($existingCustomer->data) > 0) {
return $existingCustomer->data[0];
} else {
return Customer::create([
'description' => 'Invoice made for the SonarPlay premium.',
'email' => $email,
'name' => $customerName,
]);
}
}
I have already check before create dear

dense dagger
#

do you have customer ids you can share which are "duplicate"? i.e. the id should have the prefix cus_

void magnet
#

cus_SB0XSPLpVIiwml
cus_SB0buXfiZwTyHW
cus_SB0C7kQTV6IgfH

dense dagger
#

cus_SB0XSPLpVIiwml - https://dashboard.stripe.com/test/logs/req_g96SGEZWyyDGSO
cus_SB0buXfiZwTyHW - https://dashboard.stripe.com/test/logs/req_Kggg0hr11a191G
cus_SB0C7kQTV6IgfH - https://dashboard.stripe.com/test/logs/req_ac6Ob8t43nJ6dU

These are all customers that are created by your application, using your Stripe account's secret key. You'll want to add additional logs and step through your own code to figure out why your application is creating Customers with the same email address, despite a Customer already existing with that email address

void magnet
#

OK

#

Okay above issue i will check i have more 2 question can you please help me?

dense dagger
#

sure

void magnet
#

If i want to same product price is different unit based on coutry like
India => 100 Inr
UK => 1.18 DLR

#

Based on country

#

Than?

dense dagger
#

how are you collecting payment method details, are you using the Payment Element? Checkout Sessions? or....?

void magnet
#

I have use Stripe Payment sheet on react native app.

#

For the payment

dense dagger
#

I assume you're creating a Subscription and then attempting to collect payment for that particular Subscription? If so, then you would need to define a different Price for each currency you want to accept

void magnet
#

Ok that I will check, can you please check below on payment intent status genarete "status": "requires_confirmation", that means?

dense dagger
#

I don't see you sharing any PaymentIntent id?

#

requires_confirmation indicates that you need to confirm the PaymentIntent. Usually, this state is skipped because payment method information is submitted at the same time that the payment is confirmed.