#arat_code
1 messages ยท Page 1 of 1 (latest)
๐ 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.
hi there!
can you share a screenshot of what you see, and explain what you expected to see instead?
@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:
- Clones the platform payment method into the requested connected account.
- 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.
https://github.com/stripe/stripe-ios/issues/4222
Previously we raised this issue on github it was fixed by stripe devs but after that we get this saved card issue.
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...
Can you share the ID of a Payment Intent you're creating
@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.
I think this conversation will be a lot easier if I'm only speaking with one person
No worries!! i will take care from here.
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?
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
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
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You're saying you see this screen for pi_3QLNxsG8Thp5LtcO1ir1ODbP?
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
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)
And the cus_xxx ID?
Cus ID : cus_RA45wSEfDjb60K
Hmm, that Customer object has no attached/saved PMs so what you describe seems expected?
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
Which ID? pi_3QLNxsG8Thp5LtcO1ir1ODbP?
That's the PI id used for payment. but it shows guest user
customer is null for that payment you never set it on creation
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
Then how do you expect the payment details to be saved to a customer if you're not passing us a cus_xxx ID?
Hmm, that's not how it works no. This is what you're trying to do: https://docs.stripe.com/payments/save-during-payment?platform=ios&mobile-ui=payment-element
As you can see, customer is created and passed on intent creation. Without that the pm_xxx is never saved and is just discarded
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.
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
- First step to save the card on the platform: https://docs.stripe.com/connect/direct-charges-multiple-accounts#save-on-platform
- Second step to clone it to conncted account(s) and then charge the card on the conncted account: https://docs.stripe.com/connect/direct-charges-multiple-accounts#clone-and-create-direct-charges
On which step customers will see his saved card list?
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
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
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
Listing payment method screen will be custom created screen ? or there is any IOS method which will list customer PM list UI
The Payment Sheet supports that natively when you initialise it using a customer and ephemeral key on the connected account that has saved cards