#melawong
1 messages · Page 1 of 1 (latest)
Hello! Can you give me some more details? What kind of requests are you making/do you have example request IDs?
Does this help? evt_1NgEr3LGyhzwZ4pevhfb0F4U
Or this invoice is an example: in_1NgEr3LGyhzwZ4peTho4j4CT
On our test environment.
And this is the code we have in our backend, which had previously been working.
Stripe::InvoiceItem.create({ customer: @user_payment_detail.stripe_customer, currency: 'usd', amount: @user_payment_detail.amount_to_pay, description: 'Filing Fee' })
invoice = Stripe::Invoice.create({
customer: @user_payment_detail.stripe_customer,
collection_method: 'send_invoice',
days_until_due: 7,
auto_advance: true
})
sent_invoice = Stripe::Invoice.send_invoice(invoice.id)
Yup that does help - did you recently upgrade the version of the stripe-ruby library you were using?
We did not
So we should still be on a very old version (from what I understand from the last conversation we had with Stripe a bunch of months ago!)
Hmm... that's a bit odd then - from what I can on my end, it looks like that invoice was made from a request using version 9.0.0 of our stripe-ruby library which was released 2 days ago
Oh that's so weird! I wonder how that could have happened.
And that would explain the bug, since it's on a new version somehow.
This may not be something you can answer, but do you know how we could be suddenly on a newer version considering we didn't upgrade on our end?
Did Stripe possibly stop supporting the older version?
Yeah 9.0.0 has a LOT of changes that include pinning to the latest API version by default (https://github.com/stripe/stripe-ruby/releases/tag/v9.0.0)
You can go back to using your original API version by setting Stripe.api_version = '2020-08-27'
Do you happen to know where I put that setting?
We show an example in that earlier link I sent you (https://github.com/stripe/stripe-ruby/releases/tag/v9.0.0) - you can set it right after you set the API key