#abhilash_paypal-react-native
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/1295333109453029396
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! what version of stripe-react-native are you using?
0.24.0
I'd suggest using the latest version instead
for instance it's https://github.com/stripe/stripe-react-native/blob/master/CHANGELOG.md#0260---2023-03-16 that added support for Paypal in that SDK I think. You're using a very old version at the moment
okay... let me try to udpate to that version and let you know
now the type errors are solved and it is accepting the mandate data
const response = await confirmPayment(testClientSecret, { paymentMethodType: 'PayPal', paymentMethodData:{
mandateData: {
customerAcceptance : {
online: {
ipAddress: 'localhost',
userAgent: 'ios'
}
}
}
}});
do I need to pass the exact ipAddress and userAgent for testing? Because I am still receiving the same error
what's the request ID req_xxx of the error you're getting?
this is the only info I have related to this confirmation call. From where I can get this request ID?
I don't have access to this atm...
do you think anything else will be helpful? subscriptioId or cutomerID?
yes either of those
also try removing mandateData in your code, we don't tell you in the docs to pass it. I'd expect the SDK to just pass it for you if it's required. Maybe that helps.
customerId is cus_R1opIIXKEd6gjR
also worth upgrading to the very latest verson(you just upgraded to 0.26 but that's still over a year old and we probably changed/fixed things since then)
then let me try
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
I just retried with the latest version 0.38.6 and still getting the same error
Do you think if I need to pass any extra param while creating the subscription>
The official guide of using Stripe Subscription with Paypal, is using SetupIntents actually:
https://docs.stripe.com/billing/subscriptions/paypal
Let me do some tests and see if the ReactNative SDK isn't sending the mandata_data when specified...
Okay…please let me know
I just did a test
And the mandate_data is send by the SDK
I tested the Reactnative SDK 0.38.6
so..any idea what could be wrong with mine?
Can you clone this official example
Make updates on the confirmPayment and the PaymentIntent creation
and try to reproduce the issue?
once you managed to reproduce could you please share with me the reproduction steps ?
sure...I was actually using the confirmPayment method from useConfirmPayment...But the given example it is using confirmSetupIntentfrom useConfirmSetupIntent. Is that for subscription? I can give try like this first
I just reproduced the issue by passing the client secret which I created using the /create-subscription endpoint
hi! I'm taking over this thread. give me a few minutes to catchup.
can you share the PaymentIntent ID (pi_xxx) with this issue?
sure
pi_3Q9lFiIksnxxMf4u2iMjiGhf_secret_xNXnznKVncLdy3c5hkOEHW3CN
created by https://api.stripe.com/v1/subscriptions endpoint
let me know if you need more details about the request body
thanks, I do see the same error message you mentioned. having a look.
I'm not sure. I would recommend to contact Stripe support: https://support.stripe.com/contact
make sure to include all relevant information (object IDs, error message, code, reproduction, etc.)