#jhonsalazar1623_docs
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/1237920803329146983
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, are you asking what webhook event you should listen to get notified when an inovice is paid?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hi
Yes, but when my customer makes the payment and confirms the payment, the invoice does not change status immediately.
I am using stripe element and confirm payment
Wha'ts the invoice ID?
wait second please
my first stage
My customer paid with a payment method and is automatically charged without client secret
InvoiceCreateParams.builder()
.setCustomer(customerId)
.setCollectionMethod(InvoiceCreateParams.CollectionMethod.CHARGE_AUTOMATICALLY)
.setAutomaticTax(InvoiceCreateParams.AutomaticTax.builder().setEnabled(true).build())
.putMetadata("customerId", String.valueOf(customerExternalId))
.putMetadata("sellerId", sellerId.toString())
.putMetadata("subscriptionId", String.valueOf(subscriptionId))
.setDefaultPaymentMethod(paymentMethodId)
.build();
but the invoice is in open status
and I would like to generate the same events that the subscription generates so that my integration is compatible
because when the invoice paid event arrives my business logic is executed
Can you share with me the invoice ID (i.e., in_xxx) so that I can the logs?
I don't see any payment intent confirmation requests for the associated paymentIntent pi_3PEKsxGCjaP6mkX50afAU6C1
Did you see any error in your browser console when you call stripe.confirmPayment() ?
no, this case is wihout payment intent
Then I will explain the other case with payment intent
What do you mean by "wihout payment intent" ?
InvoiceCreateParams.builder()
.setCustomer(customerId)
.setCollectionMethod(InvoiceCreateParams.CollectionMethod.CHARGE_AUTOMATICALLY)
.setAutomaticTax(InvoiceCreateParams.AutomaticTax.builder().setEnabled(true).build())
.putMetadata("customerId", String.valueOf(customerExternalId))
.putMetadata("sellerId", sellerId.toString())
.putMetadata("subscriptionId", String.valueOf(subscriptionId))
.setDefaultPaymentMethod(paymentMethodId)
.build();
This is my code for the first automatic payment scenario without payment intent
And how do you let your customer pay this invoice? through payment element or hosted invoiec page?
stripe element - payment element - yeah
If my client already has the payment method, there is no need to confirm the payment through the stripe element, the payment is made automatically.
you understand me?
I don't quite understand unfortunately.
Are you asying that you want to pay the invoice with a saved payment method ?
uhmmm
That is, if we already have a payment method, we pay directly with the payment method, is that understood?
yes, is what is done now
I think we'll start again
How can I make an invoice that is automatically charged to my customer's payment method?