#Nepho-subscriptions
1 messages ยท Page 1 of 1 (latest)
Hello! For the record I'm using the official Node.js library for backend, and official react-native library for frontend.
hi there!
yep if you use a trial period the subscription is immediately created in the trialing status, payment/card information is not needed upfront.
There's no PaymentIntent because there's no payment required.
If you want to collect payment info from the customer, you would look at the pending_setup_intent field on the Subscription, return the client secret of that SetupIntent to the frontend, and call confirmSetup there
Thanks for the answer ๐
OK, so I need to:
- Create the subscription with
trial_from_plan: true - Get
pending_setup_intentfrom the response - Retrieve the setup intent using the
seti_identifier - Send the
client_secretcontained in this setup intent to the client?
This seems easy enough, thanks for the info
for step 3 you can just expand it you don't need an extra API call
expand : ["latest_invoice.payment_intent", "pending_setup_intent"]
Oh, sweet! Thanks
Now I have an issue in the mobile application ๐
The documentation: https://github.com/stripe/stripe-react-native/blob/master/docs/GooglePay.md#present-google-pay-sheet
Says to "present Google Pay" by using presentGooglePay with the forSetupIntent: true option. This options doesn't exist in recent versions of the library.
If I just pass the client_secret I got in the pendingSetupIntent from the backend's response, I get the following error client-side:
Any idea what's wrong? Thanks in advance!
the docs are wrong I guess, it takes a param object
https://stripe.dev/stripe-react-native/api-reference/modules.html#presentGooglePay
I think it's presentGooglePay({clientSecret:"seti_xxx_secret_yyy"}) I would guess
Nope, it seems like a deprecated param. presentGooglePay only takes clientSecret it seems
The param doesn't exist when looking at main from github so it doesn't seem to be a version issue on my end: https://github.com/stripe/stripe-react-native/blob/master/src/types/GooglePay.ts#L2
Oh wait, I see that it also takes PresentGooglePayType options... Wondering why my typescript autocomplete doesn't suggest anything from this type
Ah, actually it does ๐ค
I don't know why I didn't see it the first time
Sorry for bothering you, it should work properly now
Np!