#jhonsalazar1623_best-practices

1 messages ¡ Page 1 of 1 (latest)

tough sonnetBOT
#

👋 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/1232498554778550282

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

weary fieldBOT
errant mesa
#

Hello

midnight wyvern
#

hello! I'm afraid that's not recommended. How have you currently integrated with Stripe to collect payment for subscriptions? Are you using Payment Element, or Checkout Sessions?

errant mesa
#

good question!

#

yes, Im using stripe element, in my current flow

#

all integration was done by code

#

frontend and backend

#

I use the invoice upcoming to calculate taxes automatically and total price, total tax, etc

midnight wyvern
#

the core logic of creating a one time payment is essentially the same, you would create a PaymentIntent and collect the payment details in the Payment Element for payment

errant mesa
#

My big problem is that the customer could buy a weekly subscription and a one-time payment subscription, with recurring price subscriptions I have no problem, I use confirmIntent

midnight wyvern
#

if i understand correctly, the customer needs to make payment for a Subscription, and a one-time item right?

errant mesa
#

Yes, also keep in mind that you could purchase other subscriptions at different intervals, for example weekly, monthly and then a one time payment. In that case I would be buying 3 products with different prices in a single transaction in my service.

midnight wyvern
#

you can't pay for 3 subscriptions with different intervals in the same payment

#

you'll need the customer to make payment separately for each of these subscriptions

#

so to summarize, you can combine a one-time payment with a subscription. However, you can't combine payments for different Subscriptions

errant mesa
#

they recommended me to do was to make a subscription payment through payment intent and then make the other payments automatically after having been successful in the first subscription.

errant mesa
midnight wyvern
#

use add_invoice_items - you can either pass in a one-time Price object in add_invoice_items.price or create an ad-hoc Price using add_invoice_items.price_data

#

they recommended me to do was to make a subscription payment through payment intent and then make the other payments automatically after having been successful in the first subscription.

I don't recommend this method. For example, if 3DS is required, you are going to need the customer to authenticate again. The customer is going to be very confused if they have to do subsequent authentication, but have no visibility about what you're doing in the backend

errant mesa
#

ohh I understand

errant mesa
#

Thanks!

#

it is use to invoice upComming also?

midnight wyvern
#

sorry, i don't understand?

errant mesa
#

ah ok

#

well, I use invoice up comming to calculate the total price, the total tax (it calculates it automatically) to run a summary to the customer before paying

midnight wyvern
#

alright, what's your question?

errant mesa
midnight wyvern
#

you can try it out

errant mesa
#

ohh ok,