#lec1892_api

1 messages ¡ Page 1 of 1 (latest)

gleaming geyserBOT
#

👋 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/1281613001933459561

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

tepid moth
#

You don't pass invoice creation param

#
    enabled: false,```
in the response body
unreal shard
#

But the code is exactly the same.

#

I understand that the request doesn't contain the invoice_creation param, but how is that possible if the code for both accounts is the same?

tepid moth
#

You sure it's exactly the same?

#

Something is different here

unreal shard
#

I'm sure it is the same. No changes based on the environment.

#

Below is my code

#

It is writen in Java

#

public StripeCheckoutSession createOneTimePaymentCheckoutSession(@AuditableInclude String customerId, @AuditableInclude String priceId,
String successUrl, String cancelUrl) {
com.stripe.param.checkout.SessionCreateParams.LineItem lineItem =
new com.stripe.param.checkout.SessionCreateParams.LineItem.Builder()
.setQuantity(1L)
.setPrice(priceId)
.build();

    com.stripe.param.checkout.SessionCreateParams.Builder builder =
        new com.stripe.param.checkout.SessionCreateParams.Builder()
            .setCustomer(customerId)
            .setSuccessUrl(successUrl)
            .setCancelUrl(cancelUrl)
            .setMode(PAYMENT)
            .setInvoiceCreation(com.stripe.param.checkout.SessionCreateParams.InvoiceCreation.builder().setEnabled(true).build())
            .addLineItem(lineItem);

    com.stripe.model.checkout.Session session = com.stripe.model.checkout.Session.create(builder.build());

    auditService.hint(AuditHint.builder().resourceId(session.getId()).build());

    return new StripeCheckoutSession(session.getId(), session.getUrl());
}
tepid moth
#

Just from looking at the two above requests, I see you're using 2 different versions of our stripe sdk as well as 2 different java versions

#

Try using 26.7.0 for both sdks

#

And java 21.0.1 for both

unreal shard
#

ok I will take a look at these details

#

thank you for now

gleaming geyserBOT