#elena-invoice

1 messages · Page 1 of 1 (latest)

karmic wraith
#

@mighty blaze yes you totally can control all of this if you want

mighty blaze
#

@karmic wraith I dont see how I would do that?

#

so say a user wants invoice. I send him a email with my own template invoice mail, with payment amount and product info. But when the user is going to pay, how am I supposed to make him pay? I guess I could redirect user to my website and then he does a payment intent? But this wont register a invoice in stripe? It would be ideal if i could a list of the incoming and completed invoices in stripe dashboard

karmic wraith
#

You can create an invoice in the API and pay it, you don't need the hosted invoice page for it. It just works

#

An Invoice has a PaymentIntent automatically created for it and that's what the customer would pay

#

I have to go for the day but @late sail on my team is taking over!

late sail
#

👋

mighty blaze
#

Heyo nice to meet u

late sail
#

Hi!

mighty blaze
#

So I wanna make my own invoice system. I dont like redirects to other sites, i think it looks unprofessional

#

so when user gets the invoice in mail

#

the best solution would be to redirect user to my website, and then create a invoice with the invoice API?

#

which under the hood creates a payment intent?

late sail
#

Yes, you can think Invoice and PaymentIntent in Stripe as objects. You create them, manage them inside your Stripe account. You can have your own website, and create Stripe's Invoice object under the hood with API

#

and yes an Invoice object will generate a PaymentIntent object

mighty blaze
#

I have an app aswell that also uses payment intent

#

can i use the same paymentintent solution, to make users pay the invoice aswell?

late sail
#

Are you talking about ios/android app or web app?

mighty blaze
#

ios and android

late sail
#

that bottomsheet is PaymentSheet, right?

mighty blaze
#

yes think so

#

yeh its that one

late sail
#

I am imaging what you want to do is, inside your app let's say you have a button, when user tap it you want to display a website on your own, and when user perform action from the website you want to create an Invoice?

mighty blaze
#

is it possible to initialize a invoice, instead of payment intent? that would be awesome. Cuz else i dont know how to make the payment in the app. I suppose I could also just redirect user to the website instead

#

A user can decide to pay with card right now or get an invoice

#

I have already integrated the payment system, so now user can pay with card

#

but i need to offer invoice aswell

#

so when user choose invoice, he gets invoice on his email

#

then i need to redirect user to my website again

late sail
#

Yeah, totally understand

mighty blaze
#

but is it possible to initalize a invoice payment, the same way i initalize that paymentsheet?

late sail
#

it will be a bit different

mighty blaze
#

if i want to offer invoice payment in app. I could also just ignore using the app for invoice, and redirect user to website instead to complete

late sail
#

when will you want your customer to be able to choose between card versus invoice? Before opening that PaymentSheet, right?

mighty blaze
#

Yes

#

Before opening paymentsheet, user should select invoice or pay now

late sail
#

Okie, Invoice API can be (and should be) controlled by backend. You could design whatever UI on the app, or design a website and let your app redirect to it, to ping an endpoint on your backend. And do the logic of creating Invoice in your backend

#

Creating an Invoice is a process of 1. Create a Customer and a Price 2. Create an Invoice Item then an Invoice

#

What you should send to backend is customer_id if you already have one, and the price data you want to charge.

#

and in your backend, you can do 2 steps above to create an Invoice object, against that customer with that price data

mighty blaze
#

I see

late sail
#

You will notice all sample code here is in Server side

mighty blaze
#

When user clicks on link on email, and is redirected to my website. Ones i have collected card details, and send request to backend, do i use the stripe.invoices.payInVoice?

#

which takes a invoice id

late sail
#

Yes that's the API to pay the Invoice

#

you will need to supply the Invoice Id of the Invoice you created earlier

mighty blaze
#

why doesnt the stripe API have intellisense?

#

i dont get any recommendations on my server

#

The "collection_method" defaults to "charge_automatically", and user will be sent a stripe invoice. How can i disable this auto emailing, so I can send my own invoice email?

#

@late sail

late sail
#

Let me see

#

Before deciding to use your own Invoice page, may I ask how would you collect your customer payment detail? I just want to make sure you understand about PCI compiance

#

Our Invoice hosted page is PCI-compliance

mighty blaze
#

yeh my concern is redirecting to another site

#

i would prefer to redirect to my own site, not just for UI, but for overall experience

#

but is it possible to disable this automatic emailing? cuz else i dont know how I could create a invoice without sending email

late sail
#

Let me look around that part

late sail
#

I think this setting should do it. Have you come over this setting?