#nhannguyenvan_code
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/1263455622712791080
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- nhannguyenvan_code, 1 day ago, 16 messages
What's the in_xxx ID? You likely need to finalize it: https://docs.stripe.com/invoicing/integration#create-invoice-code
I need create invoice, get paymentIntetn to render UI, and add promotion code with update invoice , and confirm payment
Then follow the guide above ๐
when call api create invoice, does it return paymentIntetn to reder UI or return null
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I mean this invoice
As I said, you need to finalize the invoice before it'll generate an intent: https://docs.stripe.com/api/invoices/finalize
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Just creating one won't generate a Payment Intent
follow like that
Create invoice -> get paymeentIntent -> render UI in client side -> apply promotion code -> confirm payment is it posible
You can't finalize and then apply a discount/promotion code. That needs to be done before finalizing
got it. because I use paymentIntent and can't use promotion code so I want use another way but not want redirect stripe page
What about embedding Checkout on your page? https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=embedded-form
No redirect, and supports promotion codes
but can't not custom UI right
Customisation is limited yes
I use PaymentElement to custom in my site
We're working on a new integration path, in beta, which will meet your requirements: https://docs.stripe.com/checkout/custom-checkout/overview
Uses the Checkout Sessions API, so has promotion code support, but the UI is fully customisable and works with Elements
yep got it, can you wait me a minute to take a look through doc?
Sure, but as I said it's a beta. You'll need to request access before you can use it
You need to send me the in_xxx ID
- Create the invoice, applying the discount via https://docs.stripe.com/api/invoices/create#create_invoice-discounts
- Finalize the invoice, and the response will contain a
payment_intentfield - You can use that intent to render the Payment Element
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.