#kanohian-update-subscription
1 messages ยท Page 1 of 1 (latest)
I believe you just need to pass always_invoice to proration_behavior on the Subscription Update API call
https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thnaks. gonna try it
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That property will only specify how payment is accepted, not when payment is accepted. Setting that will essentially just dictate whether to charge a Payment Method automatically, or email a copy of the Invoice to the Customer's email address
I checked and I am using 'proration_behavior' => 'always_invoice'
this is the request of the upgrade
req_MtF52stjqcI6P5
HI there ๐ let me take a look at that request, but while I do, what are you trying to ask about that parameter?
ok
well
I am performing an upgrade this way
{
"payment_behavior": "pending_if_incomplete",
"proration_behavior": "always_invoice",
"items": {
"0": {
"price": "price_1MRh6hGGCGfoPLShRsMy9mIb"
}
}
}
and works fine. Eveything
thing is
the prorration sets for next invoice
and i need it to be at the upgrade moment
I understand the subscription is active which means is already paid
maybe that is why it tries to bill at next cycle
Sorry, I'm not sure I'm following, the request you referenced (req_MtF52stjqcI6P5) did create a new Invoice. Is that different from what you're seeing?
check this subscription sub_1MRh5MGGCGfoPLSh6Gb0DJqz
it bills $30 for 2024
those $30 are from the now-upgrade, so I need to bill them now
That's the same Subscription that is related to the request you shared.
Maybe always_invoice isn't what you're looking for. When you use that approach the Subscription is moved to its next billing period and an Invoice for the new period is immediately created. The prorations from the change are now reflected as discounts (customer is reimbursed for remaining time on previous billing period that they were already charged for but didn't use) and then added to the typical charge for the next billing period.
Is that the behavior you're looking for?
kanohian-update-subscription
except that I need it to bill now
since I noticed it updates the subscription lifetime
It does bill immediately.
then why the $30 for 2024
maybe is that for next bill it discounts the credit and charges only 30 ???
that makes sense
To clarify, you're asking why the Invoice for the next billing (not the Invoice that was generated by your request) is showing it will charge $30? If so, that's because your customer currently has a $99 balance on their account that will be applied to their next Invoice.
I see, so that $30 is not what we charged for the upgrade right? It is what will cost to renew on next cycle
Correct, it is the typical recurring cost of the next billing period (to be billed on Jan 18, 2024) minus the customer's current credit balance.