#alessandro.ricci
1 messages · Page 1 of 1 (latest)
Hi there!
What do you mean by "not working"? Do you get an error message? If so, which one?
no error message is sent back, but the return object not contain the expanded value
Can you share the PaymentIntent ID (pi_xxx)?
sure pi_3Meby6EutbHy81io1U3dhabM is a test PI
Can you try to expand latest_charge.balance_transaction instead and see if it works?
this is the response : "id" => "pi_3Meby6EutbHy81io1U3dhabM"
"object" => "payment_intent"
"amount" => 175000
"amount_capturable" => 0
"amount_details" => Stripe\StripeObject {#1983 ▶}
"amount_received" => 175000
"application" => null
"application_fee_amount" => null
"automatic_payment_methods" => Stripe\StripeObject {#1982 ▶}
"canceled_at" => null
"cancellation_reason" => null
"capture_method" => "automatic"
"client_secret" => "pi_3Meby6EutbHy81io1U3dhabM_secret_7hEEYXY4yOh0qlDaa10rhb224"
"confirmation_method" => "automatic"
"created" => 1677147846
"currency" => "eur"
"customer" => "cus_NPQpoGIZleFHNJ"
"description" => null
"invoice" => null
"last_payment_error" => null
"latest_charge" => Stripe\Charge {#1978 ▶}
"livemode" => false
"metadata" => Stripe\StripeObject {#1974 ▶}
"next_action" => null
"on_behalf_of" => null
"payment_method" => "pm_1MebzHEutbHy81ioGUtwwZxd"
"payment_method_options" => Stripe\StripeObject {#1911 ▶}
"payment_method_types" => array:6 [▶]
"processing" => null
"receipt_email" => null
"review" => null
"setup_future_usage" => null
"shipping" => null
"source" => null
"statement_descriptor" => null
"statement_descriptor_suffix" => null
"status" => "succeeded"
"transfer_data" => null
"transfer_group" => null
it seems too work, but why the old code does not work?
i use it in production envirorment
I'm guessing you updated your API version, because that's something we changed recently:
The charges property on PaymentIntent has been removed. You can use the latest_charge property instead.
https://stripe.com/docs/upgrades#2022-11-15
oh ok this means i need to update that code too, thanks !
Happy to help 🙂
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!