#dinnediwakar
1 messages · Page 1 of 1 (latest)
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.
- dinnediwakar, 3 days ago, 12 messages
- dinnediwakar, 3 days ago, 20 messages
I'd recommend checking the migration guides here: https://github.com/stripe/stripe-java/wiki
can i get all stripe objects for both version?
Not necessary. I'd recommend checking the migration guide for the Added, Removed and Changed classes and parameters between the versions you upgrade
in above migration guide link 24.0.0 changes not available
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
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
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
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
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?
This is not a Checkout Sessino creation request. Can you provide a Checkout Session creation which payment_intent field is null?
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
},
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
You'd need to check both stripe-java and API version change logs
Checkout Session will only be be completed after the payment is made successfully
for retrieving payment intent
You can't mark it completed without a sucessful payment
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?
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
yes but how i can got charge id in payment intent after that?
In Payment Intent, you can find the Charge ID in latest_charge: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-latest_charge
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
if session is completed then payment intent generated ...but how i can get charge is in latest version 24.11.0
Use latest_charge from Payment Intent as suggested above. It's the same in stripe-java v24.11.0
Webhook is used to get any updates on your accounts including payments, payout... etc. You may find more information about Webhook here: https://stripe.com/docs/webhooks
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!