#pawan425_api

1 messages ยท Page 1 of 1 (latest)

silk kernelBOT
#

๐Ÿ‘‹ 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/1243147058332962880

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tulip maple
#

hi there!

rose vapor
#

hello

tulip maple
#

that if i finalize the invoice then i am not able to change invoice item like amount,
that's correct, once the invoice is finalized it can no longer be edited

#

so only finalize the Invoice once you know the exact amount the user has to pay

rose vapor
#

but after choosing a plan type(monthly pay or full pay) customer can go back and change the plan as many times he wants

tulip maple
#

then you would create a new Invoice every time (and delete the previous one if needed).

rose vapor
#

as i read the docs i can only get the payment intent when i finalize the invoice

tulip maple
#

correct

rose vapor
#

as i want my domain has the payment page on which customer needs to open that link and pay

#

so can i inject my payment intent into invoice ?

tulip maple
#

so can i inject my payment intent into invoice ?
no, you create an Invoice and it will contain a PaymentIntent when you finalize it

rose vapor
#

can i open my payment page by only creating invoice ?

#

like generate a link which customer opens and pay

#

just like the i am using payment intent

#

now

#

like payment secret for invoice, which oopen stripe payment element on frontend

#

?

tulip maple
rose vapor
#

i don't want to use stripe hosted page i want my customer to come on my portal and pay the payment using stripe payment element

tulip maple
#

then yes you can use the Payment Element

rose vapor
#

but how can use invoice

#

i need an invoice as well of my customer payment

#

when they done a downpayment or choose mothly payment option

tulip maple
#
  1. create the Invoice
  2. finalize the invoice
  3. retrieve the PaymentIntent created by the Invoice and the client secret
  4. use the client secret to mount the Payment Element
  5. user enter their payment details
  6. confirm the PaymentIntent on the frontend
#

when they done a downpayment or choose mothly payment option
that's step 0, you ask the user what they want, and then create the Invoice

rose vapor
#

let me explain my usecase

#

lets suppose i am creating a product for which i need to generate a payment link which is common if the payment is not done

#

currently i am getting this link by using payment intent

#

and i am using stripe payment element on my frontend

#

to show card form

#

but in this step i am not getting any invoice

#

which i want

#

so during the product creating i need a link

#

and also one important thing is that, customer can change the plan (full pay or downpayment) any no. of time which change the payment amount

tulip maple
#

I already explained you how to do this:

  1. ask the user what they want (full pay or downpayment)
  2. create the Invoice for the correct amount
  3. finalize the invoice
  4. retrieve the PaymentIntent created by the Invoice and the client secret
  5. use the client secret to mount the Payment Element
  6. user enter their payment details
  7. confirm the PaymentIntent on the frontend
rose vapor
#

customer can change the plan (full pay or downpayment) any no. of time which change the payment amount

#

before doing final payment

tulip maple
#

yeah I also already answered this question:

then you would create a new Invoice every time (and delete the previous one if needed).

rose vapor
#

and does stripe charge every api call ?

#

like generating multiple invoice and then delete them can cause high amount of bill or charge

tulip maple
#

no, you will only pay a Stripe fee when a user pays for something

#

making the API call is free

rose vapor
#

oh ohk ohk got it

#

thanks buddy

tulip maple
#

happy to help ๐Ÿ™‚