#ian_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/1415270763895853086
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
FWIW, the Flutter SDK is not an official Stripe SDK and we're unable to support it. You'd need to speak with that team directly for specific SDK support
I can help overall with your Stripe integration though
But unclear on next steps, if able to attach the Payment Method client side to an existing payment intent?
I imagine there will be some method in the Flutter SDK to support intent confirmation with a wallet card
Should be possible client-side, yes as that is how our native mobile SDKs (that Flutter wraps) does it
thanks, assuming we get the Payment Method, what does a supported integration look like to attach that to an existing payment intent?
I understand that Flutter SDK piggy backs on React Native, so something similar to how it would work for React Native would be of interest
RN specifically has confirmPlatformPayPayment function: https://stripe.dev/stripe-react-native/api-reference/functions/confirmPlatformPayPayment.html
Documentation for @stripe/stripe-react-native
Apple Pay with RN for example: https://docs.stripe.com/apple-pay?platform=react-native#present-payment-sheet
Note that the confirmPlatformPayPayment fn takes the clientSecret from the intent which is what handles the 'attachment'
this methods, don't appear to allow collecting the shipping address/filtering the shipping address selection to a specific country?
we found "createPlatformPayPaymentMethod" that allows creating the dialog, to allow collecting shipping address, with a specific country filter, but unsure how to tie this back in
Depends what you mean. It does support collecting address details from the wallet: https://stripe.dev/stripe-react-native/api-reference/types/PlatformPay.ApplePayBaseParams.html
Documentation for @stripe/stripe-react-native
Shipping address doesn't appear to be an option for Google Pay on this?
Yeah I don't think you can get shipping details at all in any RN method
the "createPlatformPayPaymentMethod" dialog appeared to work, but what to do with the Payment Method afterwards
see https://stripe.dev/stripe-react-native/api-reference/functions/createPlatformPayPaymentMethod.html
Documentation for @stripe/stripe-react-native
You can pass the resulting pm_xxx directly to confirmPayment via: https://stripe.dev/stripe-react-native/api-reference/types/PaymentIntent.CardParams.html
Documentation for @stripe/stripe-react-native
As the wallet PM will be of type: 'card'
appears we need
https://stripe.dev/stripe-react-native/api-reference/types/PlatformPay.ConfirmParams.html
googlePay?: GooglePayBaseParams;
applePay?: ApplePayBaseParams & ApplePayConfirmParams;
}```
to support
```ConfirmParams: {
googlePay?: GooglePayBaseParams & GooglePayPaymentMethodParams;
applePay?: ApplePayBaseParams & ApplePayConfirmParams;
}```
Documentation for @stripe/stripe-react-native
Not sure I follow
the base param doesn't have the "allowedCountryCodes" on it.
having a look at what you suggested though, for the other flow
do you have some examples of passing pm_xxx to confirmPayment , just looking to see how pass "paymentMethodId" down, and if anything else needed.
appears on https://stripe.dev/stripe-react-native/api-reference/functions/confirmPayment.html
would pass the payment intent client secret, and the Payment Method id down.
Documentation for @stripe/stripe-react-native
๐ taking over for my colleague. Let me catch up.
yes that's correct
are any other values required, I see
paymentMethodId: string;
cvc?: string;
billingDetails?: BillingDetails;
mandateData?: MandateData;
metadata?: MetaData;
};```
but they are ? optional
no only paymentMethodId
just checking we can see this in the Flutter SDK
does the shipping address that is collected, get sent to Stripe on the payment intent?
just seen a transaction go through, but can only see billing address.
yes shipping is only saved in the case of CheckoutSessions
ok, so for us to store the shipping address in our system?
yes
on the createPlatformPayPaymentMethod
for google pay has an amount, but apple pay doesn't, only has "cartItems".
Wondering if this is required to pass the list of items buying for apple pay, rather than the amount?
And if we can't get the amount on the payment intent that is already created?
createPlatformPayPaymentMethod is this a flutter API?
Documentation for @stripe/stripe-react-native
why not just use the PaymentSheet
the payment sheet doesn't appear to allow collecting shipping address (at least for google pay)
and doesn't appear to allow filtering of shipping address, or allow selection from Google Pay/Apple Pay saved addresses
required manual entry of address information.
query, what if the amount on the payment method collection form, doesn't match the amount on the payment intent trying to pay with? Would that error?
you need to use the Address Element separately https://docs.stripe.com/payments/mobile/collect-addresses
So basically you should either use the PaymentSheet or the Payment Element in addition to the Address Element
I think that's the best integration path for your use-case https://docs.stripe.com/payments/mobile/accept-payment-embedded
for google pay & apple pay, we can get the address from those platform payments.
not directly no
looking for an answer on this one,
"query, what if the amount on the payment method collection form, doesn't match the amount on the payment intent trying to pay with? Would that error?"
If we were to launch the payment method collection form, before creating the payment intent.
Just want to ensure that both have the same price
we do have access to the shipping address after "createPlatformPayPaymentMethod"
normally no you shouldn't have an issue
ok will test, see what happens.