#Krishna_Awate

1 messages · Page 1 of 1 (latest)

hearty orioleBOT
opaque acorn
primal thunder
#

I want to do it on server side

opaque acorn
#

There isn't a way to do it server-side - we require you to have the PaymentIntent ID to retrieve it

primal thunder
#

If I have payment intent id then how can i retrieve?

opaque acorn
primal thunder
#

I tried this but it is showing not valid id

opaque acorn
#

Can you share a request ID that's failing?

primal thunder
#

"No such payment_intent: 'pi_3NIEe1RXxFtUszmC1DuVE2tN

opaque acorn
#

I need the request ID (req_123) not the error message

primal thunder
#

req_OX7SvBPi2d3HCU

opaque acorn
#

You're getting an error because that PaymentIntent was created on a connected account with the stripe-account header

#

If you want to retrieve the PI you have to also set the Stripe-Account header to the same account ID you used when you created it

primal thunder
#

hwo can i do that

#

const paymentIntent = await stripe.paymentIntents.retrieve(
payment_intent_id
);

#

right now I am doing this.

opaque acorn
primal thunder
#

Did not get code for retriveing payment intent

opaque acorn
#

Yeah we don't give an exact example specifically for retrieving PaymentIntent but we show you exactly how to set the header, which should be the same across all requests

primal thunder
#

but what I have to pass

#

ani where?

opaque acorn
#

Did you read through the docs I sent fully? We have multiple examples of how to set requestOptions.StripeAccount so it'd help if you'd clarify what specifically you're confused about

primal thunder
#

const paymentIntent = await stripe.paymentIntents.retrieve(
payment_intent_id,
{
stripeAccount: bank_info.stripe_account_id,
}
);

#

I have set like docs

#

but not working

opaque acorn
#

do you have a new reqeust ID I can look at?

primal thunder
#

req_KvDmbaE4VEI2Og'

opaque acorn
#

Try this

const paymentIntent = await stripe.paymentIntents.retrieve(
          payment_intent_id,
          {},
          {
            stripeAccount: bank_info.stripe_account_id,
          }
        );
primal thunder
#

still haveing error

#

req_XMf0bbflcCutCw

opaque acorn
#

Are you 100% sure you're running the code that you're expecting? Have you logged out bank_info.stripe_account_id and confirmed it's the value you expect?

primal thunder
#

I am really sorry. I fixed accounti d

#

Now working

#

thank yo so much.

opaque acorn
#

👍 awesome! glad you got it working