#mrr3dl1ne
1 messages ยท Page 1 of 1 (latest)
Can you share the example invoice ID (in_xxx)?
river, i was passing $0 .. I just realized that might be the problem .. seems $0 charges get approved automatically (which does make sense)
let me update and try again.
No problem! Happy to help ๐
hey there ๐
thanks for the help
I'm just putting some finishing touches on my app, and found some odd behavior.
if I add the InvoiceItem after creating the invoice, and then finalize, it doesn't seem to charge the card right away. The invoice just says "will try again in 1 hour"
is there a way to attach the amount to the invoice when using stripe.Invoice.create instead of creating the invoice first, and then calling stripe.InvoiceItem.create ?
I'm afraid it's not possible to create the invoice line items while creating the invoice. They will be separate requests
if I add the InvoiceItem after creating the invoice, and then finalize, it doesn't seem to charge the card right away. The invoice just says "will try again in 1 hour"
Can you share the invoice ID (in_xxx)?
sure, one sec
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I'm trying to get a decline, but rather than immediately declining, it goes into will be charged in 1 hour
My flow is this:
- create the customer object
- create the card object (without transaction)
- customer purchases a dollar amount that they specify and I create an invoice for it using that amount - targetting the card they select
- Wait for webhook to confirm the purchase
is there a better way to do that?
For context - I have a site that allows customers to purchase a dollar amount of "credits" to use my site's services.
I'm trying to build-out the functionality for that, but my invoices aren't attempting to charge the card immediately as I would like.
My goal is to have the customer enter their dollar amount, click submit and get near immediate feedback about whether the charge went through or not
when I charge $0, everything works and I get the webhook invoice.payment_succeeded within seconds. but when I actually add a line-item to the invoice, it just sits
hahah nevermind. I found it
disregard again - I foudn the Invoice.pay method
I'm dumb.
๐คฃ
Yay! It's always good to have a place to walk through your thought process and find out the issue!
Feel free to let us know if you have any follow up question
agreed. I really like the stripe API .. thanks so much for being here as a sounding board
question for you - if an invoice gets marked failed, will it try again? or is it dead at that point?
example invoice: in_1OPcgWIVcHnT4oBlTSl6xzPE
Retry is a paid feature of Invoicing using Invoicing Plus: https://stripe.com/docs/invoicing/automatic-collection
Retry under Invoicing Plus can be configured in https://dashboard.stripe.com/settings/billing/automatic
ok cool - so I don't need to do anything if I want to consider the invoice dead?
I don't want to worry about voiding it or anything if the initial payment fails
I'd recommend voiding the invoice as the terminal status in case if you change your mind to use Invoicing Plus in the future
thanks river will do