#paulc7053_api

1 messages ยท Page 1 of 1 (latest)

amber flameBOT
#

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

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

gray iris
#

Hey!

#

So this is my current code

tardy light
#

hi there!

#

can you explain a bit more your flow?

gray iris
#

If a user wishes to upgrade, I want to charge them instantly with the difference betweeen the subscription prices (no proration). if they downgrade, I change the subscription price for the next billing cycle. if they are still in trial, I just want to change the subscription price, because I assume it will be charged the new price when it becomes active

#

what do you think?

tardy light
#

I want to charge them instantly with the difference betweeen the subscription prices (no proration)
why no prorations? that doesn't really make sense. it means the user would be loosing money?

gray iris
#

it's a physical product. prorations don't make sense

#

what do you say

tardy light
#

I'm confused by your code. why are you creating an Invoice? the Subscription should create the Invoice for you.

gray iris
#

yes, I thought that's how I would bill it immediately

#

how would you do it

tardy light
gray iris
#

I tried it

#

but it doesnt trigger an immediate payment with the difference

tardy light
#

to trigger an immediate payment, use: proration_behavior: always_invoice. but it's true this will create prorations. thinking...

gray iris
#

thanks! please let me know when you figure it out

tardy light
#

can you try proration_behavior: none and subscription_billing_cycle_anchor: "now"?

gray iris
#

yes

#

but does subscription_billing_cycle_anchor not change the date when the subscription should renew?

#

as in, if a user upgrades today but they started their subscription 3 weeks ago, doesn't subscription_billing_cycle_anchor: "now" move their rebill date to today?

tardy light
#

true, is that an issue?

gray iris
#

today + period **

#

yes... as it's an yearly subscription and moving the rebill time can be really problematic

#

how would you solve this?

tardy light
#

not sure, thinking

gray iris
#

alright

amber flameBOT
gray iris
#

hello

torn pilot
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

gray iris
#

sure

#

what do you think?

torn pilot
#

To clarify:

  • A user upgrades their subscription from a cheeper option to a more expensive one, in the middle of the billing cycle.
  • They already paid for the cheeper one this month year.
  • After upgrade, they will be paying for the expensive one from next month year.
  • At the moment of the upgrade, you want to charge them the difference in price, correct?
#

... as if they paid for the expensive one from the beginning of this month year, right?

gray iris
#
  • it's a yearly subsciption - after upgrade, they immediately pay the difference, and the upgraded price the next billing cycle
#

basically I just want the subsciption reBill date unchanged, while the customer is immediately charged the difference in price

torn pilot
#

I understand.
There's no way to implement it out of the box. Instead, you have to:

  • Upgrade the Subscription with proration_behavior=none, and
  • Create a standalone Invoice with the difference of the amounts.
gray iris
#

I'm already doing this

torn pilot
#

What do you mean by "not charged"?

gray iris
#

the customer's card is not being charged and no payment successful event is being sent

torn pilot
gray iris
#

I actually don't know

#

what should happen?

torn pilot
#

You should see it in your Dashboard and be able to investigate what's the issue.

gray iris
#

okay, I;ll look it up right now

torn pilot
gray iris
#

yes

torn pilot
gray iris
#

it's possible, I cant seem to vind any invoice with this amount in the dashboard

#

1 minute please, trying right now

torn pilot
#

Yes, this looks better.
Does it work?

gray iris
#

I'm testing it right now

#

2 minutes please

#

doesn't work....

#

the thing is I don't see any invoice under the invoices tab

#

I mean any invoice that should correspond to the charge

torn pilot
#

Could you please share the Invoice ID?

gray iris
#

I can't seem to find any invoices

#

for this extra charge

torn pilot
#

When you create it, you can print the ID or the whole object into console.

gray iris
#

yes, okay will do that

#

here it is in_1Qlq0YJ4ILijjURSLfOpt6DQ

amber flameBOT
torn pilot
gray iris
#

no, in test mode

torn pilot
#

Are you looking at the correct account?

gray iris
#

yeah, I only have this one

torn pilot
#

What happens if you search by ID?

last egret
#

You are connected with what Stripe Account Id?

gray iris
#

where can I see the account ID

last egret
gray iris
#

acct_1NlxwiJ4ILijjURS

last egret
#

It starts with acct_

gray iris
#

now it also appears under all invoices (which is weird because I refreshed that page multipe times)

#

may I ask why is it open?

#

as I would expect it to be paid

torn pilot
gray iris
#

within the dashboard, it still looks as open, and it says "Payment will be retried 1/30/26, 5:05 PM. If the original failure was non-retryable, the payment will only be executed if the payment method is updated."

#

I used the 4242... test card

#

the ID is in_1QlqInJ4ILijjURSru4jeQFN

last egret
gray iris
#

no, I set it to true

#

.... application: null, application_fee_amount: null, attempt_count: 0, attempted: false, auto_advance: true,

#

guys I have to go offline for now

#

thanks a lot! will probably open another issue when I'm back @torn pilot @last egret

#

Thanks for your time!