#jasuno_unexpected

1 messages ¡ Page 1 of 1 (latest)

rancid tokenBOT
rapid gazelleBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

rancid tokenBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1250253035876388867

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

hearty canopy
tidal juniper
#

Ok give me a sec

#

req_qS0oMHZIiPTCY6

#

req_HFK2uPgZ61kL2V

hearty canopy
#

try putting your start_date outside of the phase

#

oh sorry, my bad, you're updating a subscription schedule

tidal juniper
#

Yeah

hearty canopy
#

what are you trying to change?

tidal juniper
#

So here is some context maybe there is a better way to do this...

#

Im trying to pass down the stripe fee to the user for the subscription (rent payment) but i do not know what that is gonna be until they user makes their first payment (the subscription schedule at this point has already created a subscription object) based on the payment type picked i create a new payment intent for the fee of the current month they are paying for and if they set up auto_chage we want to have the fee in added as part of their subscription by adding a new price (price_1POuQUAq6ReFUKV8Sfjf325K if ACH or price_1POuQTAq6ReFUKV8Jj7g1l0a if credit). I talked to dev support before and the recommendation was to update the schedule but unfurtunatly i have not been able to do that.

hearty canopy
#

one sec, if you're collecting rent payment, why wouldn't you know how much the customer is going to pay?

tidal juniper
#

I know how much they are gonna pay but i don't know what payment method they will be using and since stripe charges different fees depending on the payment method that needs to be added at the time of the payment

hearty canopy
#

hrm, gimme a while to write my reply

#

what I would suggest is to use this flow instead : https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=subscription whereby you can see what payment method the customer chooses to pay with in the confirmation token : https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-type and create your subscription with the appropriate prices

Build an integration where you render the Payment Element before you create a PaymentIntent or SetupIntent, then confirm the Intent from your server.

#

maybe try it out and see if that works for you?

tidal juniper
#

Huuuuuum but im paying invoices that are already finalized by the subscription

hearty canopy
#

i think the point here is that when you create the subscription, you can already handle this scenario

tidal juniper
#

Interesting and this works even if there are multiple prices that it could finalize with

#

base on a desision that happens after the invoive is finalized?

hearty canopy
#

i just took a look at the original subscription schedule that you had, you're using collection_method=send_invoice? you're not planning to use charge_automatically?

tidal juniper
#

No, because at the time of creation the use can also opt for not paying automatically the use case here would be if the user prefer to manually pay the rent month to month the only caveat here is that if they pick ACH we let them know that it will be automatically enrolled in auto_charge since ACH take more time an requires more predictability

hearty canopy
#

i see, so you plan to charge the customer for the stripe fees after they have made payment for the invoice?

#

because theoretically, if you use send_invoice, they could choose a different payment method for invoice #1, invoice #2, etc

tidal juniper
#

Yes, if they accept auto_chage for credit/debit card they we want to add the subscription fee to their subscription since it will be automatically charged, but f they at any point change the payment method for what ever reason e.g the fee is too high in one payment method over the other the subscripton should reflect that

#

Sorry i know it's a bit unexpected use case

hearty canopy
#

i assume you're already listening for the relevant event and have the logic in place to check / validate what payment method type the customer is using to pay. What I can suggest instead, is to update the Subscription to add a new item (to charge for the fee) and set proration_behaviour=none, so that the customer will only start paying for the stripe fee from the next invoice

tidal juniper
#

Aaaaah, thats what i started with but for some reason it was still prorating it, let me send you a subscription that was doing that

#

in_1PNcwVAq6ReFUKV8Qrq6fPvH

#

This invoice was attched to a sub where i tried that

#

sub_1PNbktAq6ReFUKV8HBDRPz12

hearty canopy
tidal juniper
#

I do remember setting the proration to none let me see if i can rind the request

hearty canopy
tidal juniper
#

Can't find it, ill have to try it again and contact help again if needed, can i reference this thread if i need to start a new thread?

hearty canopy
#

if you're coming back on discord again, yep, definitely

tidal juniper
#

Yeah definetly discord, thanks for all the help

hearty canopy
#

in case you weren't aware, i do want to mention that you always need to set proration_behaviour for every request that you need it for. It's a per-request setting, not a subscription setting

tidal juniper
#

Yeah i normally have it set to none since this is for rent payment we let the landlords know that months are changed in full