#Tiana-customer-currency
1 messages ยท Page 1 of 1 (latest)
Hey, you'd check the currency field on the Customer object: https://stripe.com/docs/api/customers/object#customer_object-currency
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Working, thanks.
Another question : how to allow the user to see his non-subscription payment history from the billing portal ?
It doesn't support one-time payments right now. Just invoices
In that case, how to generate a checkout session for an invoice ?
You mean by passing a specific Invoice object ID?
Yes
You can't, you'd just the hosted page: https://stripe.com/docs/invoicing/hosted-invoice-page
Yes, but that one doesn't have a return URL
Yeah that's not supported right now I'm afraid
If the customer doesn't pay, we need the invoice auto-increment not to be incremented
Or, how to generate an invoice after a checkout session is complete ?
You mean the sequential numbering? https://stripe.com/docs/invoicing/customize#invoice-numbering-schemes
Well you'd use the API! But not sure why you'd need to do that?
In France, an invoice is only supposed to be generated once the customer has paid. No invoice must be generated if the customer did not pay.
Got it. I guess you'd do that via the API then mark it paid out-of-band
So how to generate an invoice from a checkout session ?
There's no direct way. I guess you'd listen for checkout.session.completed event and then create an Invoice via the API and mark it as paid
create an Invoice via the API and mark it as paid
How to do that ?
- Create: https://stripe.com/docs/api/invoices/create
- Pay: https://stripe.com/docs/api/invoices/pay (be sure to pass
paid_out_of_band)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What to put in collection_method so it does nothing at all ?
Where to put the items ?
Please read this doc which outlines the API integration path: https://stripe.com/docs/invoicing/integration
You can send an email to your customer (
send_invoice) or charge them automatically (charge_automatically).
How to do nothing ?
you can't โ but don't they want an invoice?
Yes, but only once it's marked as paid.
We don't want the customer to receive an e-mail saying they must pay an invoice that they already paid.
Not sure that's possible currently
It's a bit of an edge case
Why can you not just use invoicing?
Without having to involve Checkout?
Because an invoice would be generated even if the customer aborts.
Could the email be overriden for a specific invoice so that it tries to send it to a non-existing address ?
No, it's just taken from the Customer object
What about receipts ? Can those be generated manually from a checkout session ?
Forget it, my boss says it's legally not enough
Could a manually created invoice be kept as draft, therefore, not having an invoice number ?
Hmm, is that true? I thought the number was added on creation
I'm not 100% sure, easy enough for you to test
When a customer receives an email to pay an invoice, can he void it ?
Or, when he visits the customer portal ?
Hi there ๐ apologies for the delay, I'm pretty sure this isn't possible.
If I change a customer's email address to a non-existing email address before creating an invoice, then restore it once marked as paid, will it prevent the customer to receive an email asking him to pay ?
Hm, can you help me understand what you're trying to accomplish?
Ultimately, I am trying to create an invoice only after a one-time payment is complete. That's it.
I tried :
- After a successfull checkout session, create an invoice and mark it as paid. But, it sends an email to the customer asking him to pay.
- Create an invoice, then redirect the customer to the hosted invoice payment page. But, the invoice cannot be deleted if the customer aborts, and there is no way to redirect the customer back to the app.
So, I also tried option 1 but with a customer patch before creating the invoice to change the email to a non-existing one, then restore it to the real one after. But, the invoice displays the non-existing email in the PDF, which is even worse.
You can try setting collection_method to charge_automatically and auto_advance to false to avoid the emails asking for payment. Our invoices are part of the money collection flow, so you'll need to try suppressing a large chunk of our functionality in order to use our invoices as a receipt. It might be easier for you to just retrieve information from the transaction and then build the invoice yourself on your end.
You can try setting
collection_methodtocharge_automaticallyandauto_advancetofalseto avoid the emails asking for payment
How can I make sure it will work since emails are never sent in test mode ?
use our invoices as a receipt
The thing is, in France, an invoice is a legal document that a company needs for accounting purposes, while a receipt is not enough.
Can the response from GET /v1/checkout/sessions/:id/line_items include product metadata ?
You'll need to use our expansion functionality to expand the line_items , if you do then yes you should be able to see their metadata:
https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.