#harsha_58541
1 messages · Page 1 of 1 (latest)
https://stripe.com/docs/receipts?payment-ui=checkout#paid-invoices did you enable invoice_creation when creating a checkout session?
am not able to find this parameter while creating checkout session though.
I am using java server sdk for creating checkout session and this parameter does not seem to be available with it
I am using stripe java server sdk version : 20.69.0
https://github.com/stripe/stripe-java/blob/master/CHANGELOG.md#2220---2022-12-06 it was added since 22.2.0 so it's available in the SDK version that you are using.
SessionCreateParams.builder()
.setMode(SessionCreateParams.Mode.PAYMENT)
.setInvoiceCreation(
SessionCreateParams.InvoiceCreation.builder().setEnabled(true).build()
)
.addLineItem(
SessionCreateParams.LineItem.builder()
.setPrice("{{ONE_TIME_PRICE_ID}}")
.setQuantity(1L)
.build()
)
.setSuccessUrl("https://example.com")
.setCancelUrl("https://example.com")
.build();
Session session = Session.create(params);```