#arat_error

1 messages ¡ Page 1 of 1 (latest)

inner steepleBOT
#

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

📝 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.

regal marsh
waxen badger
#

but for the second time when trying to present payment sheet, it immediately closes payment sheet automatically with error 'No such PaymentMethod'.
Could you share the Payment Intent for the issue you described?

regal marsh
#

There is no payment intent we have created.

#

This is the first time when we present payment sheet so customer can add/choose card.

#

Yes we do have ephemeral key if you want i can share.

#

Also we have request id when get error from payment sheet.

Request id :- req_VZf6RZFua5Ytxp

#

@waxen badger ?

waxen badger
#

Thanks for waiting! Discord is busy now and will take time to respond

regal marsh
#

Okay!

waxen badger
#

The payment method pm_1QHk0tG8Thp5LtcOe8gic7X7 in this request was created on the connected account acct_1JhBGBG8Thp5LtcO, but you attempted to confirm the payment intent on the platform account. That was the reason why this error was thrown

#

How did you implement handleConfirm? Could you share the code?

runic socket
#

Hi @waxen badger

My name is akshay.. I am working with Arat

As you mentioned the requested is created under connect acount and we are confirming the intent in platform

No this is not what we are doing.. First we didn't created payment intent because SDK throw error before that..

Here is when the SDK throw error : When we present the payment sheet.. SDK will load the page where customer can Add/choose card(payment method) but that UI didn't load.. I don't know why but sdk it self fetch connect account payment method.. it should fetch only platform account payment method

That is the problem

#

@waxen badger If you want we can share the code where we ask sdk to show payment sheet before calling handleConfirm function

waxen badger
runic socket
#

Yes correct.. we didn't select any payment method because before that sdk throw error

The UI of listing or creating new payment method didn't load

waxen badger
#

With reference to this error, the default payment method pm_1QHk0tG8Thp5LtcOe8gic7X7 was created on the connected account: acct_1JhBGBG8Thp5LtcO.

the second time when trying to present payment sheet, it immediately closes payment sheet automatically with error 'No such PaymentMethod'.
How are you intialising the Payment Sheet for the second time? Is the code in the Github the first or second time initialising the Payment Sheet?

#

Could you share what you're trying to achieve here, so that I can share the solution accordingly?

runic socket
#

In that description what i mean is.. If the customer is new in the platform then there will be no payment methods in his account right.. so we get successfull payment because stripe UI loads.. there is no existing payment method for that customer.. then customer add new payment method and makes payment

When customer comes back for second payment like for ex. after 1 day.. stripe sdk throw error because i think it retrieve previous payment method which customer used last time

#

If you want i can explain how we use flow of Payment Sheet / Payment Method / Payment Intent / Connect Acount

waxen badger
#

It'll be helpful to explain the relationship with these integration and objects. It looks like there was payment method cloning as well from platform and connected account. The issue is likely got to do with the payment method cloning and how you access the customer payment methods

runic socket
#

So here is how it works

  1. First App request server to generate ephemeral (platform account)

  2. Using ephemeral key app can load the payment sheet where customer can choose existing payment method or he can add new card details (platform account)

  3. Then custom choose his payment method and then we request server to create payment intent

Now as we are paying to an operator (connect account) we need to add that payment method under that connect account so user can reuse the same payment method in different connect account which is created in main platform

  1. What server do is.. Server create a new payment method under the connect account by using platform payment method (connect account)

  2. Then server create payment intent with newly created payment method (connect account)

  3. It returns the response to app.. and app do next steps to make payment successfull (connect account)


Above case works for new customer first time payment.. But customer comes back second time then SDK throw error in 2nd step when sdk loads the payment method UI to fetch payment method list from main platform

waxen badger
#

Thanks for sharing the details. Can you share the values of stripeCustomerCode and ephemeralKeySecret from the following code for the second time when the customer comes back?

configuration.customer = .init(id: stripeCustomerCode, ephemeralKeySecret: ephemeralKeySecret)
regal marsh
#

ephemeralKeySecret :- ek_test_YWNjdF8xNTZRTHpGYk93TWhJY3BpLFpFUDRLTHMzY0VxQkQ2RGpoY0JZOUhWaWxMWkU5ZVY_000Icyaivp

#

customer_id :- cus_RA45wSEfDjb60K

#

This is the recent request details:-

Customer = cus_RA45wSEfDjb60K
Secret = ek_test_YWNjdF8xNTZRTHpGYk93TWhJY3BpLHFPSUxDM0ZXOXlMQVlaZTFkc3NTbVlaYllJVDdRcGo_00qFFgtbeA

waxen badger
#

Thanks for sharing! I couldn't find any reason why error like req_VZf6RZFua5Ytxp was thrown with the information you shared. Can I suggest you writing to Support https://support.stripe.com/contact/email with the following information, so that we can check with the relevant team why Payment Sheet isn't showed in your integration?

GitHub

Summary I am using same setup as reference link : https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=ios Getting success when making payment with new card (in case no card ha...

runic socket
#

Okay thank you for your support.. I will ask stripe support to look into this.. Thanks again.