#nizam - stripe fees

1 messages · Page 1 of 1 (latest)

opaque lion
crisp crest
#

Hi @opaque lion

opaque lion
#

Okay I was just looking at this so you're in luck.

#

The trick here is to pass charges.data.balance_transaction as the expand parameter when creating your Payment Intent

crisp crest
#

okay let try that as you say it has to be done once the payment intent is created

opaque lion
#

You can also simply query the PaymentIntent API and pass the same value for the expand parameter

#

Wait...sorry, nevermind we don't have that for the retrieve option

crisp crest
#

I dont see anything called charges key in documentation for createPaymentIntent

#

Applied while creating the intent but still no change payment_intent.success

#

@opaque lion can you please help me out with this

opaque lion
#

Yes, give me a second to test out some things and I'll get back to you

crisp crest
#

sure

#

(Status 400) (Request req_vXeK0GaVHrKj1q) Received unknown parameter: charges

opaque lion
#

Okay I tested the code and it works for both Create and Retrieve

#

So for this call you would put 'expand => ['charges.data.balance_transaction']. This is after the Payment Intent has been paid

crisp crest
#

So I have to put it at the time of retrieving of Payment Intent Details not on creation

opaque lion
#

Try it out and see what gives you the results you are looking for

#

But the Charges will be empty if the Payment Intent hasn't been paid yet

crisp crest
#

okay let me try that out

#

Thanks that worked on retrive not on create payment Intent

opaque lion
#

Alright. Does that approach work for you?

crisp crest
#

For now looks good to me. If any thing is need i will get back to you guys

#

Appreciate the help