#SantiagoPerezMirai-checkout

1 messages · Page 1 of 1 (latest)

rigid vault
#

hi! Should be possible yes. Do you have more context on what you mean by "setup mode" exactly?

merry palm
#

SessionCreateParams params =
SessionCreateParams.builder()
.setPaymentIntentData(
SessionCreateParams.PaymentIntentData.builder()
.setOnBehalfOf("{{CONNECTED_STRIPE_ACCOUNT_ID}}")
.setTransferData(
SessionCreateParams.PaymentIntentData.TransferData.builder()
.setDestination("{{CONNECTED_STRIPE_ACCOUNT_ID}}")
.build())
.build())
.setMode(SessionCreateParams.Mode.SETUP)
.setSuccessUrl("https://example.com/success")
.setCancelUrl("https://example.com/cancel")
.build();

#

this

rigid vault
#

no you can't do that , since it doesn't make sense

#

you're saving a card, so there's no transfer (transfer_data ) involved, since no money is moving

merry palm
#

Ok, so how can we save a card for one of our connected partners so they can use it later?

rigid vault
#

are you using Standard accounts?

merry palm
#

Yes

#

Let me give some context to the situation, we are a booking engine for hotels. There are two types of cancellation policies one for non refundable rates (Direct payment) and one with refundable rates (Just save the card to use it later). We are trying to solve the second option.

rigid vault
#

then 1) you shouldn't be using transfer_data for payments in that case anyway, since that would be Destination Charges, which you shouldn't do with Standard accounts
2) for Standard you should do Direct Charges (https://stripe.com/docs/connect/creating-a-payments-page?platform=web&ui=checkout&destination-or-direct=direct-charges#destination-charges) and to answer your question, you would use the Setup mode parameters for Checkout and use the Stripe-Account header so the CheckoutSession happens on the connected account and the card is saved there, it works fine(I don't there are specific docs for this, but it's just https://stripe.com/docs/payments/save-and-reuse + you add the StripeAccount header https://stripe.com/docs/connect/authentication)

merry palm
#

Thank you for your lightning fast response!