#frekis_api

1 messages · Page 1 of 1 (latest)

cyan shoalBOT
#

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

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

mighty trench
#

hello! When you create the ephemeral key, you should include the StripeAccount header too.

Since you created the Customer object using the StripeAccount header [0], this means that the object is created on the connected account. Subsequently, any request referencing this object needs to use the StripeAccount header too

[0] https://stripe.com/docs/connect/authentication

Learn how to add the right information to your API calls so you can make calls for your connected accounts.

crimson tinsel
#

Here is the server.js code which doc has provided and i am using exact same way

mighty trench
#

can you try what I mentioned first?

crimson tinsel
#

Yes i know creating customer/empheral using stripeAccount object will create a separate customer under that connect account and then create intent will work

But i have many issues using this method

#

I have 500-1000 different connect accounts like stores.. and whenever my customer wants to pay they have to enter card details everytime they pay for different store

Also i always have to create new customerid whenever i create intent as i can't manage 500-1000 different customerid based on different connect account

So is there any alternative way i can use platform customer id to make payment under connect account ?

mighty trench
#

to be clear, you won't be able to use the platform's Customer specifically to make payment, but still have to use the objects on the connected account for direct charges

crimson tinsel
#

Okay how flow will work ?

Like by using platform customer id first it will fetch all card list ? if user wants to add new card then he will click on some add card button and then setup intent will be triggered... App will display add card form and that card will be added into user platform

Then again customer will choose card from list and trigger create intent.. Now inside create intent first we will add that payment method into connect account by using stripe.paymentMethods.create and use that payment method in create intent

?

mighty trench
#

Then again customer will choose card from list and trigger create intent.. Now inside create intent first we will add that payment method into connect account by using stripe.paymentMethods.create and use that payment method in create intent ?

The sequence for this isn't quite correct - after the customer selects which PaymentMethod to use, you clone that PaymentMethod into the connected account and then use the cloned PaymentMethod in create PaymentIntent

crimson tinsel
#

Yeah i mean the same as i already used that flow previouly where we open paymentSheet before creating payment intent but now as per stripe new update they are saying to use latest method

mighty trench
#

what does use latest method mean?

crimson tinsel
#

I am not sure but probably to open paymentSheet after creating intent ?

mighty trench
#

then where did you see stripe new update?

#

hmmmm, onesec, give me a while to take a look

crimson tinsel
#

Yeah sure!!

mighty trench
#

If you are already using Payment Sheet but received that email, then the possibility here is that you have some customers using an older version of your app that is still using the Basic Integration. If that's the case, you can disregard that email

crimson tinsel
#

I don't under that clearly

What is the basic integration included ?

mighty trench
crimson tinsel
#

Let me explain again what is our current flow of stripe payment so that you can explain me if we forced to required upgrade or this is not a problem for us

By using platform customerId -> Create Empheral Key with api version (''2019-05-16'') -> Now app will use empheral key to use this method in IOS ('STPAddCardViewController') -> We receive payment method -> Before creating payment intent add this payment method in stripe object along with customer stripe.paymentMethods.create -> Create Payment Intent using return value with stripeAccount -> Now app will use stripe sdk for further authentication -> confirm payment intent

#

Is this basic flow as per stripe ?

mighty trench
#

yes, it is using the Basic Integration because it's using STPAddCardViewController

crimson tinsel
#

Okay got it

I need some more help if could help with that will be great
I want to understand what are the changes i will have to make in backend server to upgrade basic flow

Setup intent is only used to add card details ? or it is also used to display existing card details as well Google Pay Apple pay ?

#

I mean in App UI how they will display card list along with Google Pay Apple Pay options ?

#

Does this already handled in stripe SDK ?

mighty trench
#

SetupIntents are to save a payment method (e.g. cards) for future usage

The PaymentSheet no longer displays saved cards that originated from Apple Pay or Google Pay.
https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md#paymentsheet-29

https://docs.stripe.com/elements/customer-sheet you would want to use customerSheet if you need a UI for your customer to manage payment methods

Offer a prebuilt UI for your customers to manage their saved payment methods.

GitHub

Stripe Android SDK . Contribute to stripe/stripe-android development by creating an account on GitHub.

crimson tinsel
#

Okay let me try this customer sheet option.

crimson tinsel
#

Hi Alex

#

My IOS developer has some doubts..

He is saying after customer select the payment method by using customer sheet -> app will call an api for create intent with that selected payment method -> before creating intent we will add that payment method & customer id in stripe.paymentMethods.create with stripe connect object -> then use returned payment method id to create payment intent

What will be the next step for app ? I mean what will be the method they have to use to confirm the created payment method ?

mighty trench
#

to be clear, customer sheet and payment sheet are two different flows. The payment sheet can show saved payment methods (except Google and Apple Pay) from the customer, allowing the customer to select them and make payment.

The customer sheet is just for the customer to manage their own payment methods which include deleting and adding a new payment method

crimson tinsel
#

Sorry but this is very confusing now

Can you suggest me what is suitable for my requirements ? i mean please guide how the flow and api calls will work one by one ?

My requirements are simple.. Customer able to reuse same card which he used previously in different connect account payment

Please provide steps like

  1. Create platform customer server side -> Generate empheral key
  2. App will open customer sheet

Something like this

mighty trench
#

you mentioned that you have an iOS developer, can you get your iOS developer to join this thread instead? Are you also an iOS developer on the same project?

crimson tinsel
#

Yes i can.

ruby coral
#

hi

#

i am iOS dev

mighty trench
#

Hello! from what I can tell, you need to migrate to using the mobile payment element, because you are still using STPAddCardViewController - we have a guide here that explains how to migrate to the Mobile Payment Element : https://docs.stripe.com/payments/mobile/migrating-to-mobile-payment-element-from-basic-integration

Do you have any specific questions?

ruby coral
mighty trench
#

The requirement here also seems to be that your Customer should be able to reuse same card which he used previously in different connect account payment. Give me a while to type out a high level flow for you.

#

The high level steps of allowing your Customer to reuse same card which he used previously in different connect account payment

  1. the payment method (e.g. card) should be saved on the platform account Subsequently, when the customer wants to make payment on the connected account, the customer needs to select the payment method they want to use - you'll want to use the Customer Sheet for this. When the customer selects the Payment Method, you will know which payment method id they have selected
  2. You can then clone the selected payment method to the connected account : https://docs.stripe.com/connect/direct-charges-multiple-accounts
  3. Create a PaymentIntent on the connected account with the cloned payment method
cyan shoalBOT