#dinnediwakar

1 messages · Page 1 of 1 (latest)

languid nexusBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

keen geyser
obsidian mortar
#

can i get all stripe objects for both version?

keen geyser
#

Not necessary. I'd recommend checking the migration guide for the Added, Removed and Changed classes and parameters between the versions you upgrade

obsidian mortar
#

in above migration guide link 24.0.0 changes not available

keen geyser
#

You'd need to through the guides from v21 to v23 first for the version changes in between them. Alternatively, I'd recommend upgrading to v24, then test the existing codes and check if there is any breaking changes or unexpected behaviour. If there is any, you will then update them accordingly

obsidian mortar
#

in 20.88.0 i was using payment intent from session object but when trying to create Session in 21.0.0 then i got null value in payment intent in session object?

#

but this is not mentioned in v21 guide

#

how i can fix this?

#

i have set paymentIntentData(SessionCreateParamas.PaymentIntentData.builder().setSetupFutureUsage(PaymentIntentData.SetupFutureUsage.ON_SESSION).build() in Session creation

keen geyser
#

Can you share the example request ID (req_xxx) that the Payment Intent null from Checkout Session creation? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request

obsidian mortar
#

request-id - req_gBGmcOOSSS1DSB

#

i have checked that session object at stripe dashboard there is visible payment intent bit that payment intent got null just after creation of checkout session... why this is happen?

keen geyser
#

This is not a Checkout Sessino creation request. Can you provide a Checkout Session creation which payment_intent field is null?

obsidian mortar
#

this is the session which is print by me just after creation - we have created session and session information is ============== <com.stripe.model.checkout.Session@1643365633 id=> JSON: {
"after_expiration": null,
"allow_promotion_codes": null,
"amount_subtotal": 4050,
"amount_total": 4050,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_address_collection": null,
"cancel_url": "http://localhost:9000/partner/new-book",
"client_reference_id": null,
"consent": null,
"consent_collection": null,
"currency": "eur",
"customer": "cus_PNbfKSjKk9DSao",
"customer_creation": null,
"customer_details": {
"address": null,
"email": "king@mail.com",
"name": null,
"phone": null,
"tax_exempt": "none",
"tax_ids": null
},
"customer_email": null,
"expires_at": 1705996731,
"id": "cs_test_a1p7GWtJ44k3Ex3ObRCrihGCwvujbzN2U0hua7N540MkeO6PdnGiMjGcZ1",
"line_items": null,
"livemode": false,
"locale": null,
"metadata": {},
"mode": "payment",
"object": "checkout.session",
"payment_intent": null,
"payment_link": null,
"payment_method_options": {
"acss_debit": null,
"affirm": null,
"afterpay_clearpay": null,
"alipay": null,
"au_becs_debit": null,
"bacs_debit": null,
"bancontact": null,
"boleto": null,
"card": null,
"customer_balance": null,
"eps": null,
"fpx": null,
"giropay": null,
"grabpay": null,
"ideal": null,
"klarna": null,
"konbini": null,
"oxxo": null,
"p24": null,
"paynow": null,
"sepa_debit": null,
"sofort": null,
"us_bank_account": null
},

#

"payment_method_types": [
"card",
"link"
],
"payment_status": "unpaid",
"phone_number_collection": {
"enabled": false
},
"recovered_from": null,
"setup_intent": null,
"shipping_address_collection": null,
"shipping_cost": null,
"shipping_details": null,
"shipping_options": [],
"status": "open",
"submit_type": null,
"subscription": null,
"success_url": "http://localhost:9000/partner/new-book?bookingType\u003dTeeTime\u0026tab\u003d3\u0026bookingId\u003d201ff18f-56d3-4c84-94cc-c41bdf72d263",
"tax_id_collection": null,
"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 0,
"breakdown": null
},

keen geyser
#

In https://admin.corp.stripe.com/request-log/req_9760JYi8t965qg, the Stripe API version used in v21.0.0 used was 2022-08-01: https://github.com/stripe/stripe-java/blob/master/CHANGELOG.md#2100---2022-08-02

Since API version 2022-08-01 https://stripe.com/docs/upgrades#2022-08-01:

A PaymentIntent is no longer created during Checkout Session creation in payment mode. Instead, a PaymentIntent will be created when the Session is confirmed.

This is expected that Payment Intent will not be created when Checkout Session is created. Payment Intent will only be available when Checkout Session is completed. I'd recommend retrieving Payment Intent from checkout.session.completed event

GitHub

Java library for the Stripe API. . Contribute to stripe/stripe-java development by creating an account on GitHub.

Keep track of changes and upgrades to the Stripe API.

obsidian mortar
#

how i can mark session completed?

#

just after its creation

keen geyser
#

Checkout Session will only be be completed after the payment is made successfully

obsidian mortar
#

for retrieving payment intent

keen geyser
#

You can't mark it completed without a sucessful payment

obsidian mortar
#

i have also checked that in 20.88.0 we have charge id in payment intent then i am fetching charge object using that in many places in my project..but in latest version charge id is no more in payment intent object..how i can fix this?

keen geyser
#

As mentioned earlier, you can only get the Payment Intent after the customer completes the payment

#

Your system should listen to checkout.session.completed event to retrieve the Payment Intent ID

obsidian mortar
#

yes but how i can got charge id in payment intent after that?

keen geyser
obsidian mortar
#

if session is completed then payment intent generated ...but how i can get charge is in latest version 24.11.0

keen geyser
#

Use latest_charge from Payment Intent as suggested above. It's the same in stripe-java v24.11.0

obsidian mortar
#

ok

#

could you tell me the use of webhooks?

keen geyser
languid nexusBOT
graceful fjord
#

👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!