#Nadiya-Subscription
1 messages · Page 1 of 1 (latest)
Hi there, the easiest way is using Checkout Session. You just need to pass in the price ID and the Checkout Session will create necessary PaymentIntent under the hood.
we can't use checkout
What's your current integration?
its a selling page building site
paymentElement
i'm saving charge_id for one time payments, i was wondering if i can do the same for subscriptions too
I see, then you can create the subscription at your server, and pass the client_secret of the latest_invoice.payment_intent to the payment elements to collect the payment.
This doc can help you https://stripe.com/docs/billing/subscriptions/build-subscription?ui=elements#build
Create and manage subscriptions to accept recurring payments.
sorry, i already created subscription and its working. i would like to know if i can get the charge_id from the subscription object
i need to save charge_id if it have one
I see, you can get the charge ID from the latest_invoice.payment_intent.charges[0]
thanks, let me check!