#mrr3dl1ne

1 messages ยท Page 1 of 1 (latest)

rugged bronzeBOT
winged shoal
#

Can you share the example invoice ID (in_xxx)?

winged root
#

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.

winged shoal
#

No problem! Happy to help ๐Ÿ˜„

winged root
#

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"

winged shoal
#

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)?

winged root
#

sure, one sec

#

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:

  1. create the customer object
  2. create the card object (without transaction)
  3. customer purchases a dollar amount that they specify and I create an invoice for it using that amount - targetting the card they select
  4. 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.

#

๐Ÿคฃ

winged shoal
#

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

winged root
#

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

winged shoal
#

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

Learn about Stripe's automatic recovery features for Invoicing.

winged root
#

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

winged shoal
#

I'd recommend voiding the invoice as the terminal status in case if you change your mind to use Invoicing Plus in the future

winged root
#

thanks river will do