#alexesch_code

1 messages ยท Page 1 of 1 (latest)

willow karmaBOT
#

๐Ÿ‘‹ 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/1309094466241695847

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

raw temple
#

hi

scarlet spindle
#

๐Ÿ‘‹ happy to help

raw temple
#

yesterday i already had a chat with your colleague

scarlet spindle
#

yes I was chatting with you yesterday

raw temple
#

ok

#

so replacing create_prorations by always_invoice

#

is not working

scarlet spindle
#

what's the subscription ID?

raw temple
#

original subscription sub_1QMiMJJaf89hC41IW87mYJKi

#

new : sub_1QNVIbJaf89hC41IMWan6pQ9

scarlet spindle
#

is that the new one?

#

or is that the one from yesterday?

raw temple
#

oh, wait

#

just a sec

#

it was applied

#

right?

#

nevermind, seems working fine

#

thank you!

#

but, one more question

#

if i will create a subscription

#

with quantity of 2

#

where the item price is for example 100$

#

so total is 200$

#

i'll set this subscription to pause

scarlet spindle
#

yes it is applied

raw temple
#

and, in 2 weeks, i'll unpause it and will change the quantity to 1

#

that is, instead of $100 proration, I will receive about $96, since several days have already passed since the start of the subscription?

#

but subscription was on "pause_collection"

scarlet spindle
raw temple
#

is very complicated to explain, requrements from sales team
just tell me one thing
i'll create a new subscription, today
with quantity of 2 and item price of 100%
just after the creation of this subscription, i'll pause it ('pause_collection')
in 1 month, i'll unpause it, and will change the quantity to 1
the proration will be 100$ or about 90$ because 1 month have passed after the subscription creation?

scarlet spindle
#

let's step back for a second

raw temple
#

ok

scarlet spindle
#

maybe the sales team requirement can be met in a simpler way

#

could you just describe what they asked you to do?

willow karmaBOT
raw temple
#

well, not sure
ok,
we sell kits, kits are packages containing some specific things inside, which after the buyer receives them, they must be sent back to us.

looks like

order is completed
-- new subscription is created and suspended

kit is sent to the user's address
user receives the kit, does some manipulations and sends the kit back for use
we analyze the results and after some period activate the user's subscription
the gap between the purchase and the activation of the subscription is about 1 month

we are using this approach instead of payment intents, because payment intents are not increasing our MRR

#

so, what's why, i have to create and make user pay for the first subscription. and after, change the initial subscription and create a new one with prorated credits

surreal lion
raw temple
#

no, is not about testing

#

the question is

#

subscription price is 299

#

prorated amount it 297.21

#

is this because 2 days have passed between the creation of the main subscription and today?

surreal lion
#

yes, proration is calculated down to the second

raw temple
#

ok, is that possible to get somehow, the proration amount use have right now on his account?

surreal lion
#

looking at in_1QNVIYJaf89hC41IdHuarAYU which is where the proration was included it's basically 99% of the price :

raw temple
#

so, if i have to create a new 299$ subscription, but the customer has been prorated with 297, i'll check his proration balance, and manuall add him some credits?

surreal lion
#

you can look at pending invoice items (for existing floating proration from a previous change, that haven't been invocied yet) or the customer's balance(which is credited when an invoice that is negative due to proration is charged) yes

raw temple
#

i think there are no way to get current user balance, right? only by using allBalanceTransactions?

#

ok, i'll check about all invoice items

#

thank you!

surreal lion
raw temple
#

oh, is a lot easier

#

ok, ill tryt to do both things