#Paul Han
1 messages ยท Page 1 of 1 (latest)
Those should be the right params
side note.... very impressed with the level of support/responses that is available here... Seeing all these questions come in back to back makes me feel a little bad to ask for help but I'm having a difficult time with this one. Thanks for all your hard work
Thank you!
Hm, even with those params, the PaymentIntent stays as "requires_confirmation"..
Means a lot to hear that
yeah i'm sure it can feel a bit thankless/unappreciated at times
Can you share an example invoice id where this happens?
Invoice: in_1Ne1pcQpHK53ooki50lkbQbS
PaymentIntent: pi_3Ne1pdQpHK53ooki0uUstlFk
For the connected account: acct_1NJNIzQpHK53ooki
in test mode
Not sure if this will be helpful, but this is the order in which I'm creating these:
stripe_invoice = Stripe::Invoice.create({
customer: stripe_customer.stripe_account_id,
default_payment_method: default_payment_method,
auto_advance: true,
collection_method: 'charge_automatically',
description: description,
}, { stripe_account: stripe_merchant.stripe_account_id })
stripe_invoice_item = Stripe::InvoiceItem.create({
customer: stripe_customer.stripe_account_id,
amount: 4500,
currency: 'usd',
invoice: stripe_invoice.id,
}, { stripe_account: stripe_merchant.stripe_account_id })
finalized_invoice = Stripe::Invoice.finalize_invoice(
stripe_invoice.id,
{ auto_advance: true },
{ stripe_account: stripe_merchant.stripe_account_id }
)
Code is in ruby
Sorry for the delay
You'll need to call the /pay endpoint too after finalizing: https://stripe.com/docs/api/invoices/pay
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ahhhhh, thank you
No problem
you guys are amazing!
You also don't necessarily need auto_advance. You can read more here: https://stripe.com/docs/invoicing/integration/automatic-advancement-collection
All that does is automatically finalize invoices after an hour
gotcha! thank you! ๐