#Adil kadiyawala

1 messages · Page 1 of 1 (latest)

spice cloakBOT
errant wraith
#

Hi there, there's no API to retrieve upfront stripe fee or tax calculation.

lilac rivet
#

I am using Magento2. I tried to get the stripe charges in the response of "paymentIntents retrieve" Api after successfully payment done but I am getting null value.

errant wraith
#

Can you share with me the PaymentIntent ID?

lilac rivet
#

pi_3M1Rx2SDmeQaIema0DrAiTfi

#

pi_3M1ke8SDmeQaIema1LzA9G52

#

pi_3M1l2dSDmeQaIema1qo4gCPs

errant wraith
#

Did you retrieve the PaymentIntent before its status becomes succeeded? From my end I can see charges available for all of these three PaymentIntents

lilac rivet
#

after successfully place order when I debug the log of payment intent object then I get this log:

{"id":"pi_3M1l2dSDmeQaIema1qo4gCPs","object":"payment_intent","amount":13500,"amount_capturable":0,"amount_details":{"tip":[]},"amount_received":0,"application":null,"application_fee_amount":null,"automatic_payment_methods":{"enabled":true},"canceled_at":null,"cancellation_reason":null,"capture_method":"automatic","charges":{"object":"list","data":[],"has_more":false,"total_count":0,"url":"/v1/charges?payment_intent=pi_3M1l2dSDmeQaIema1qo4gCPs"},"client_secret":"pi_3M1l2dSDmeQaIema1qo4gCPs_secret_Xs5CFRfN33vFaawIPUyOLu0Za","confirmation_method":"automatic","created":1667887931,"currency":"inr","customer":"cus_MSvUa01Ts3209Y","description":"Order #000000168 by Abhijit Dhada","invoice":null,"last_payment_error":null,"livemode":false,"metadata":{"Module":"Magento2 v3.2.8","Order #":"000000168"},"next_action":null,"on_behalf_of":null,"payment_method":null,"payment_method_options":{"card":{"installments":null,"mandate_options":null,"network":null,"request_three_d_secure":"automatic"}},"payment_method_types":["card"],"processing":null,"receipt_email":"adil_kadiyawala@yahoo.co.in","review":null,"setup_future_usage":null,"shipping":{"address":{"city":"Pune","country":"IN","line1":"pune","line2":null,"postal_code":"411038","state":"Maharashtra"},"carrier":null,"name":"Abhijit Dhada","phone":"7876990876","tracking_number":null},"source":null,"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"requires_payment_method","transfer_data":null,"transfer_group":"group_pi_365866455"}

please check the "charges" array. It is null

errant wraith
#

The status is requires_payment_method, which means there is no payment attempts to this PaymentIntent yet.

lilac rivet
errant wraith
#

You should listen to the payment_intent.succeeded event and retrieve the paymentIntent when receiving this event.

lilac rivet
lilac rivet
errant wraith
lilac rivet
#

Okay thank you