#ian-goldberg_error
1 messages ¡ Page 1 of 1 (latest)
đ 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/1412428624757391431
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hey there, where did you get the il_tmp_123 id from initially?
hey i just went to the dashboard, tried to delete a proroation invoice line item, and it said the line item doesnt exist
I suspect this is on a preview of an upcoming invoice, and is not a real object you can delete
yeah it is -- so how do i delete unwanted prorations?
Can you share the relevant subscription ID? Once created you mostly can't just delete them. You can prevent creating them using proration_behavior=none when updating subscriptions, though.
sub_1S2YngGOiDu6jfguJgLynTE8
so if a bunch of subscriptions were accidentally updated with a proration behavior, and i meant to do none, what can i do?
I see three subscription item calls adding items to this sub after creation. What was the result you were trying to achieve / what do you want to end state to be?
Really like this. But it happened to more than one subscription. 164 total i think.
On this example sub, it appears that the initial invoice in_1S2YngGOiDu6jfguq3xToVso is still unpaid
happy to handle it via API if possible
What do you want to happen with the existing initial invoice? Are you saying you want the new items invoices at the renewal at the end of the period, or right away?
let me give backstory.
We have a stripe account that was handling two types of customers, and im trying to migrate one type of customer to a dedicated stripe account. Lots of nuances with it
I think the open invoices on the account, i will mark as void since we cant delete them
the first billing period should be sept 1 - oct 1, billing at oct 1
To clarify, this isn't possible for licensed item prices, payment/invoicing happens are the start of the period
If these are all on new subscriptions, you might be better of cancelling and re-creating to get the billing period you want.
i created them all via the API and set the backdate start to be sept 1 at midnight UTC and set billing anchor to be oct1 midnight UTC.
That seems correct?
Example:
{
"auth": {
"none": null
},
"follow_redirect": false,
"follow_keep_method": false,
"reject_unauthorized": true,
"follow_authorization_header": false,
"parse_response": "true",
"status_code": {
"range": {
"from": 200,
"to": 299
}
},
"case_sensitive_headers": false,
"url": "https://api.stripe.com/v1/subscriptions",
"headers": [
{
"key": "Authorization",
"value": "Bearer xxx"
}
],
"queries": [],
"body": {
"form_urlencoded": {
"metadata": {
"type": "Partner",
"partner_id": 2373
},
"customer": "cus_SyVpIztlUIjpZ0",
"days_until_due": 10,
"items": [
{
"price": "price_1RqyBMGOiDu6jfguBTxVdQ6E",
"quantity": 0
},
{
"price": "price_1RqyjoGOiDu6jfguRL4j02Bb",
"quantity": 1
}
],
"off_session": true,
"payment_behavior": "error_if_incomplete",
"collection_method": "send_invoice",
"billing_cycle_anchor": 1759276800,
"backdate_start_date": 1756684800
}
}
}
The billing anchor is for setting the next invoice cycle, but with backdating you're still invoicing for the prorated september period
Are you saying you don't want the prorated lines for september at all?
And you only want to start invoicing/charging Oct 1?
i want to create the subscription with existing data that was on subscription in the old account's equivalent subscription. No prorations here. And then over the course of the month the subscription may change and those changes MAY incur prorations
Hmm I was going to suggest creating with a trial using trial_end set to Oct 1, to defer payment until then, but that wouldn't let you optionally prorate other changes
yeah i considered that route, but didnt go with it because of what you said
If you use for backdate to Sept 1, anchor set to Oct 1, using proration_behavior=none, do you get an initial invoice like you want?
well it seems like it generates an invoice due on sept 11th, which i dont want
i want first invoice to be oct 1
because the old stripe account has the invoice from sept 1
The prorated changes before the new sub starts is a temporary/transient condition, right?
I'm thinking that either using the trial approach or a subscription schedule to set up the Oct 1 start is the way to go for a clean cutover.
but then you'll need to manage prorated changes during that period manually adding invoice items to the customer to get invoices with the next renewal
what will happen is we start with x quantity of a price on the first of the month, and then throughout the month the quantity will change and we prorate
i was really trying to cut over sept 1 to this new account.
in the dashboard i can create a subscription that starts sept 1 and first bills oct 1, and i think thats what anchor and backdate does, but maybe i am wrong?
Example post body that is made from dashboard:
{
"backdate_start_date": "1756684800",
"billing_cycle_anchor": "1759276800",
"billing_mode": {
"type": "classic"
},
"collection_method": "send_invoice",
"currency": "usd",
"customer": "cus_SuM9aBX8HYBpzG",
"days_until_due": "10",
"invoice_settings": {
"send_hosted_payment_email": "false",
"supported_payment_methods": {
"affirm": "true",
"amazon_pay": "true",
"card": "true",
"us_bank_account": "true"
}
},
"items": {
"0": {
"price": "price_1RyXWHGOiDu6jfgu592fkmXT",
"quantity": "1"
}
},
"off_session": "true",
"payment_behavior": "error_if_incomplete",
"proration_behavior": "none"
}
hi there, taking over this thread, give me a minute to catch up
thanks
looking at your requirements, I think that synthrider has given the best options that we currently have
does the API from dashboard not translate to my usecase to use outside of dashboard?
trying to figure out if i need to manually create 164 subscriptions.
can you send me two different subscription IDs, one created with the dashboard that's working for you and one created with the API that isn't? that way I can compare
This was created via dashboard and got results i wanted: sub_1RyazPGOiDu6jfguidoGyzFN
via API: sub_1S2YnHGOiDu6jfgugpMqtGBT
so for the dashboard one, the first thing I'm noticing is that it's not using backdating https://dashboard.stripe.com/test/logs/req_P66aDWWtBfZOfD
while the API one does https://dashboard.stripe.com/logs/req_jn0FvDGNKPbbow
ah ok. yeah, that one was created with proration_behavior: none
while the API didn't pass a proration_behavior, so it defaulted to create_prorations
i think what im not understanding is this:
- When i create via dashboard, the first invoice is Oct1.
- When i create via API it immediately generates an invoice, due in 10 days, and then has upcoming for oct 1
when i create the subscription, i dont want to invoice until oct1.
if its not possible, then i guess ill re-create the subscriptions with proration_behavior = none and then mark all the sept 1 invoices as null
both of them should generate an invoice due in 10 days, let me look into that a bit
thanks
ok yeah, you're right, if I make an API call with those exact parameters from the dashboard call, it does not generate an invoice. so it likely comes down to the proration_behavior setting
what can i do to emulate dashboard via API?
you should be able to replicate the dashboard call by making an API call with the same parameters as https://dashboard.stripe.com/test/logs/req_P66aDWWtBfZOfD
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
hm what was i missing then
proration_behavior: none