#rahul_api

1 messages ยท Page 1 of 1 (latest)

tough sorrelBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1247371198028054538

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

spare remnant
#

We have a use case where users get charged a few days after they make their payment, so we're switching to Setup Intents

#

We're also moving from using the PaymentSheet to the PaymentSheet.FlowController

#

The first time makes sense - users enter card details, it creates a setup intent, and once succeeded, we can use the payment method on a payment method

#

on a subsequent checkout, do we have to set up a new setup intent (would that be good practise) or can we just use the payment method directly in a new paymentintent

ashen mantle
spare remnant
#

Ok awesome - and there's no limit on the # of transactions?

ashen mantle
#

There is no limit on the Payment intent to be created

spare remnant
#

awesome, thank you!

ashen mantle
#

No problem! Happy to help ๐Ÿ˜„

spare remnant
#

also 1 last thing

#

and this outlines the process of doing the setup intent, but just to double check

ashen mantle
#

The Setup Intent integration guide is correct for iOS

spare remnant
#

After the first payment,

  • does the PaymentSheet.FlowController payment sheet list out the customer's existing payment methods?
  • I assume that if a payment method previously created for off_session is on the list, i can handle everything else on my server? no need for the client to do any further payment stuff?
#

and to follow up - when passing the payment_method_id back to our server, is there any variable that indicates whether the method has been configured for future payments? For e.g. - I believe cards registered with apple pay cannot be used for non-subscription recurrent payments, so how would i distinguish that from a card that can?

ashen mantle
#

when passing the payment_method_id back to our server, is there any variable that indicates whether the method has been configured for future payments?
If the customer is present in the Payment Method object: https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer, this means that it has been saved onto the customer and can be used for future payment

spare remnant
#

Gotcha - but does that also extend to Apple Pay payments?

#

bc on our dashboard, it explicitly says
This payment successfully set up pm_REDACTED for future off-session payments

#

but that violates the PassKit rules about non-subscription recurrent payments

ashen mantle
spare remnant
#

ok really sorry for bugging but i promise 1 last thing ๐Ÿ˜ญ

#

in these 2 cases

#

how do i know that in the first one, I have to call paymentSheetFlowController.confirm

#

but in the second one i can just directly hand it back to the server

#

bc in both cases the paymentSheetFlowController.paymentMethod is configured

ashen mantle
#

If it's paid by card, there is no need to present the UI. Your server can create a Payment Intent to charge to the saved payment method directly

spare remnant
#

what about the case where a user is given a chance to change their card?

i.e.: In the checkout flow, the default paymentmethod is card A but they have the option to switch to card B - both of which are configured for future off_session payments

where would i display the payment methods?

  • Would i use the customer sheet? This seems right, but it says You can use the Customer Sheet UI outside of a checkout flow - can I also use it during my checkout flow?

https://docs.stripe.com/elements/customer-sheet?platform=ios#ios-get-selected-payment-method

ashen mantle
#

The default payment method on a Stripe customer is only used for invoice payments such as subscription, but not one-time payment using Payment Intent.

i.e.: In the checkout flow, the default paymentmethod is card A but they have the option to switch to card B - both of which are configured for future off_session payments
Is this for one-time or recurring payments using Invoices?

spare remnant
#

this is for 1-time - when the user processes their second payment, they can choose from the saved paymentmethods or add a new one

ashen mantle
#

Customer Sheet is used to manage the saved payment methods on the customer, but not for payment.

If you wish to let the user to choose the payment method for Payment Intent, I'd recommend this guide: https://docs.stripe.com/payments/accept-a-payment?platform=ios - customer will choose the saved payment method or create the new payment method to be used for payment

Securely accept payments online.

spare remnant
#

as an example

#

doordash checkout has the payment method on the bottom

#

and when i click it

#

but it's still a separated 2 step confirmation

#

this but for ios

spare remnant
ashen mantle
#

The payment method list in the screenshot is managed by DoorDash themselves

#

You'd need to build your own UI to render the payment method list. Once the customer choose the payment method (pm_xxx), you'd then create the Payment Intent with the selected payment method for the payments

#

This will achieve the same as DoorDash's flow

spare remnant
#

ah gotcha - we have to build the page ourselves - was trying to do it through stripe

#

sorry for the relentless questioning - you're awesome @ashen mantle! Have a great night

ashen mantle
#

No problem! Happy to help ๐Ÿ˜„