#arat_code

1 messages ยท Page 1 of 1 (latest)

white gorgeBOT
#

๐Ÿ‘‹ 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/1308015414638542920

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

hallow cedar
#

hi there!

#

can you share a screenshot of what you see, and explain what you expected to see instead?

white gorgeBOT
red prism
#

@tacit verge Our goal is to allow users to use the same payment method across multiple connected accounts. This eliminates the need for users to re-add their payment method each time they make a payment on a different connected account.

App Flow:

  • The customer is making payments to different operators (connected accounts).
  • On iOS, the SDK retrieves the list of payment methods associated with the platform account.
  • If no payment method exists, the user can add a card through the same UI, and this card gets associated with the platform account.
  • Once the user adds the payment method, the iOS app requests our backend to create a PaymentIntent. The backend:
    1. Clones the platform payment method into the requested connected account.
    2. Creates a PaymentIntent under that connected account using the cloned payment method, ensuring that all payments are processed within the connected account.

This flow has been working well.

Issue:
After the Stripe 24.0.0 update, the card is no longer saved to the platform account after the payment is successful. This was functioning as expected before the update.

tacit verge
#

Can you share the ID of a Payment Intent you're creating

cerulean osprey
#

@tacit verge Here is the details

PI : pi_3QLNxsG8Thp5LtcO1ir1ODbP
Platform PM : pm_1QLNxqFbOwMhIcpiGac8aB8V

#

This platform pm does not saved into user object even after the successfull payment.

tacit verge
#

I think this conversation will be a lot easier if I'm only speaking with one person

cerulean osprey
#

No worries!! i will take care from here.

tacit verge
#

I'm looking at that PI. Why would you expect us to render a list of saved payment methods on the sheet when you're explicitly passing payment_method on intent creation?

cerulean osprey
#

This payement method we received when user is adding new card details.. And the same user always had to enter there card details whenever they make payment

#

If the customer add card details once & made successfull payment then in second time that card details should be shown in payment sheet so that customer only have to select the payment method

tacit verge
#

I guess I don't really understand the issue. In your example the backend creates the intent here passing payment_method: 'pm_xxx' so we won't need payment details for that payment, and the customer confirms the PI using the previously saved PM

tacit verge
cerulean osprey
#

No that's not what i mean.. I shared our flow above

Before we create new Payment Intent.. we first show payment sheet for PM choose/Add New based on customer id on platform

Then after user add new card details and we receive newly created PM on platform
After that backend will clone that PM into some connect account where user wants to make payment and by using newly cloned PM ID we create Payment Intent and make further confirmation & capture steps

tacit verge
#

Before we create new Payment Intent.. we first show payment sheet for PM choose/Add New based on customer id on platform
OK, so you're probably using a deferred flow for that? It's really important you correctly describe your flow as ir pertains to Stripe APIs/integrations

#

Some more code examples of how you initiate the Payment Sheet would be helpful (the cus_xxx ID etc)

cerulean osprey
#

Yeah give me moment.

tacit verge
#

And the cus_xxx ID?

cerulean osprey
#

Cus ID : cus_RA45wSEfDjb60K

tacit verge
#

Hmm, that Customer object has no attached/saved PMs so what you describe seems expected?

cerulean osprey
#

Yeah that's the issue.. we made successfull payment using this customer but it does't save PM in customer object

#

It was working before we update SDK version to 24.0.0

tacit verge
cerulean osprey
#

That's the PI id used for payment. but it shows guest user

tacit verge
#

customer is null for that payment you never set it on creation

cerulean osprey
#

As we can't pass platform customer id on create intent.. Because the payment is handled by connect account and if we pass the customer id it will throw error no such customer

#

When we were implementing this flow.. Stripe support team said customer id will auto attached based on PM method

tacit verge
#

Then how do you expect the payment details to be saved to a customer if you're not passing us a cus_xxx ID?

tacit verge
#

As you can see, customer is created and passed on intent creation. Without that the pm_xxx is never saved and is just discarded

cerulean osprey
#

If you know when we add platform customer id while creating intent under stripe connect account it will throw error for no such customer

#

The link you shared is the example of making/handling payment on platform account.. We are makeing & handling payment into connect account.

tacit verge
#

Yes, the same applies โ€“ you need a customer on the connected account

#

Overall you flow doesn't really work โ€“ you can't process a payment on a connected account and save it on the platform in a single transaction/payment

#

If you have a platform where users may process payments on multiple connected accounts and you want to offer functionality to have saved payment details across all those connected accounts, then you first need to save/setup the card on the platform

Obviously you can't do this in the initial payment if it's a payment on a connected account. You'll first need to save/setup the card on the platform (via a Setup Intent), and then clone it to connected account and then charge it like you are

cerulean osprey
#

On which step customers will see his saved card list?

tacit verge
#

The second step in the Payment Sheet when you come to create a payment on the conncted account using the customer with the clones card

cerulean osprey
#

Could you share IOS setup steps.. I am still struggling with this flow how it will work

Like there are three different cases..
1). When customer does not have any PM on platform to wants to add new PM
2). When customer have a PM on platform and want to choose that PM
3). When customer have a PM on platform still he wants to add new PM on platform

If you could share IOS setup link like step one present payment sheet

This would be very helpfull because i am struggling to implement for last 3 weeks

tacit verge
#

There isn't iOS specifics on those pages as they're mostly backend heavy anyway, but you can reference this guide for the 'setup' part (first step above)

1). When customer does not have any PM on platform to wants to add new PM
Then, assuming you want the customer to be able to add and new this new card on other conncted accounts on your platform, you'd do both steps above
2). When customer have a PM on platform and want to choose that PM
Then you can skip the Setup Intent part and just clone the existing card on the platform to the connected account
3). When customer have a PM on platform still he wants to add new PM on platform
Same as 1 above

Learn how to save payment details and charge your customers later.

cerulean osprey
#

Listing payment method screen will be custom created screen ? or there is any IOS method which will list customer PM list UI

tacit verge
#

The Payment Sheet supports that natively when you initialise it using a customer and ephemeral key on the connected account that has saved cards