#jhonsalazar1623
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- jhon-paymentelement-subscription, 6 days ago, 108 messages
Sorry for missing that, it's been a crazy morning in the server, taking a look
Payment Element integrations typically run on Payment Intents, which don't have direct assocaitions to Products/Prices. You specify the amount you want to charge the Customer when creating the intent.
ok, I understand
but how I can associate this intente payment with diferentes item lines?
I saw en checkout session is good choice
Payment Intents don't have that association. You could build your own version of it by storing related information that is important to your flows inside of metadata:
https://docs.stripe.com/api/metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That field exists on most objects and lets you store key/value pairs that are important to your flows on Stripe objects like Payment Intents:
https://docs.stripe.com/api/payment_intents/create#create_payment_intent-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You want Invoices?
Because a need caclulate tax with invoice up comming and create a resumen screen to my customer of total price
invoice up comming calculate tax for me..
it is very usefully
You can calculate tax amounts without an Invoice if you don't actually need the Invoice object:
https://docs.stripe.com/api/tax/calculations
https://docs.stripe.com/tax/custom
ah ok, thank
Is it necessary to create paid invoices? I try to copy the same events that stripe generates when creating a subscription to keep my integration consistent
No, you don't need to create Invoices to process payments using the Payment Element.
ok
For subscription mode I have everything resolved, the only difference with this one time mode is that the payment is made only once
I understand then that with Payment Element I do not need to create invoice, nor the other objects that are created with subscriptions, correct? If I require an invoice, how can I do it? Do I need to manually enter the item lines?
Yup, if you need to create an Invoice, you'll want to take a look through this guide which walks through using the Payment Element to handle an Invoice payment:
https://docs.stripe.com/invoicing/integration?method=elements#accept-invoice-payment
There will be a difference though, because that creates the Invoice before rendering the Payment Element so it can use the client secret of the Payment Intent created by the Invoice.