#mashuksergey

1 messages · Page 1 of 1 (latest)

lone hearthBOT
rare gate
#

HI!

golden sonnet
#

hello! I'm sorry but I don't understand the issue - can you illustrate with examples?

rare gate
#

i send to charge two transactions:

  1. pi_3NGcpkE9c0LRHjsy1lTV8oPY
    we have response -
    {"id":"pi_3NGcpkE9c0LRHjsy1lTV8oPY","object":"payment_intent","amount":106,"amount_capturable":0,"amount_details":{"tip":[]},"amount_received":106,"application":"ca_O0WArpLUEemOwudQ3m8gjSBP7DKvijv2","application_fee_amount":6,"automatic_payment_methods":null,"canceled_at":null,"cancellation_reason":null,"capture_method":"automatic","charges":{"object":"list","data":[{"id":"ch_3NGcpkE9c0LRHjsy1y8EKFni","object":"charge","amount":106,"amount_captured":106,"amount_refunded":0,"application":"ca_O0WArpLUEemOwudQ3m8gjSBP7DKvijv2","application_fee":"fee_1NGcpkE9c0LRHjsytsPW0QLZ","application_fee_amount":6,"balance_transaction":"txn_3NGcpkE9c0LRHjsy185LJJ5n","billing_details":{"address":{"city":null,"country":null,"line1":null,"line2":null,"postal_code":"42424","state":null},"email":null,"name":null,"phone":null},"calculated_statement_descriptor":"GETTT.CO.IL","captured":true,"created":1686207636,"currency":"usd","customer":null,"description":"Charge for event_id = 7025","destination":null,"dispute":null,"disputed":false,"failure_balance_transaction":null,"failure_code":null,"failure_message":null,"fraud_details":[],"invoice":null,"livemode":false,"metadata":{"Contact":"\u0421\u0435\u0440\u0433fgggg345111stt1221652141255 \u041c\u0430\u0448\u0443\u043a52 q gqgqgqga","Email":"mashuksergey@gmail.com","Env":"test","EventId":"7025","OriginLang":"en","Phone":"+380964192976","ProducerId":"195","PurchaseUser":"13298"},"on_behalf_of":null,"order":null,"o
#
  1. pi_3NGcz7FqCuI5R7Nh1Ztuwecx
    {"id":"pi_3NGcz7FqCuI5R7Nh1Ztuwecx","object":"payment_intent","amount":342,"amount_capturable":0,"amount_details":{"tip":[]},"amount_received":342,"application":"ca_O2Nybjt1fdUa3K7TvGRCj3Nf5nBltdtf","application_fee_amount":41,"automatic_payment_methods":null,"canceled_at":null,"cancellation_reason":null,"capture_method":"automatic","client_secret":"pi_3NGcz7FqCuI5R7Nh1Ztuwecx_secret_cu2wdUodfMvWq3yvI8s19gV0q","confirmation_method":"automatic","created":1686208217,"currency":"usd","customer":null,"description":"Charge for event_id = 7026","invoice":null,"last_payment_error":null,"latest_charge":"ch_3NGcz7FqCuI5R7Nh1PoJ1gHC","livemode":false,"metadata":{"Contact":"\u0421\u0435\u0440\u0433fgggg345111stt1221652141255 \u041c\u0430\u0448\u0443\u043a52 q gqgqgqga","Email":"mashuksergey@gmail.com","Env":"test","EventId":"7026","OriginLang":"en","Phone":"+380964192976","ProducerId":"306","PurchaseUser":"13299"},"next_action":null,"on_behalf_of":null,"payment_method":"pm_1NGcz6FqCuI5R7NhF5F0UiYr","payment_method_options":{"card":{"installments":null,"mandate_options":null,"network":null,"request_three_d_secure":"automatic"}},"payment_method_types":["card"],"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}
#

but in the frist response we have charges key

#

in 2 - no. and we can not refund

#

it is response from response when we created PaymentIntent

#

in first case we set connected account - acct_1NGJmZE9c0LRHjsy
in second - acct_1NGJn2FqCuI5R7Nh

golden sonnet
#

is the isssue that. you can't refund for pi_3NGcz7FqCuI5R7Nh1Ztuwecx ?

rare gate
#

it is not refund. it is payment intent id

#

yes. you are right. we can not refund

#

because we do not have id from charges key

golden sonnet
#

why can't you get the corresponding charge id?

rare gate
#

because i get from $response->charges->data[0]->id

#

and i we don not this key in response

golden sonnet
#

it's in latest_charge not charges

rare gate
#

what different charges and latest_charge ?
because 3 years we use charges key
in 1 case we have key charges in another not

golden sonnet
rare gate
#

ok. i wiil get id from latest_charge key.
but if removed, why we get it in response

golden sonnet
#

can you provide the PaymentIntent id for that?

rare gate
#

pi_3NGcpkE9c0LRHjsy1lTV8oPY

lone hearthBOT
willow gust
#

That screenshot is of a payment_intent.succeeded event. The API shape of events will reflect the API version of the webhook they're sent to

rare gate
#

I didn't understand. one end point. one has a key, the other does not. it is not clear. ok. i will use latest_charges key.

willow gust
#

Which endpoint response differs?

rare gate
#

PaymentIntent::create

#

n 1 case i use old account, in another - new account. maybe this is the problem

willow gust
#

Because the 2 Payments Intents you've shared were created using different API versions:

Keep track of changes and upgrades to the Stripe API.

willow gust