#pollux - connect account refund

1 messages ยท Page 1 of 1 (latest)

nova escarp
#

Hello! Just starting a thread for you -- I'll review and respond as soon as I can ๐Ÿ™‚

balmy slate
#

sure

#

as you can see I have passed the same payment intent Id

nova escarp
#

Can you share the erroring request ID?

#

It looks like you created that payment intent via a checkout session using a direct charge pattern

balmy slate
#

yeah

#

i think the account id is wrong let me cross check

nova escarp
#

And this is unrelated to the "no such payment intent" error -- still looking at that ๐Ÿ™‚

#

Yea i suspect the account id might be wrong too, which is what i was going to check with the request ID

balmy slate
#

yeah the id was wrong

#

now I get this

 raw: {
    message: 'Cannot reverse transfer on charge ch_3L04tpSCfUurJJiW1OnaehGH because it does not have an associated transfer.',
    type: 'invalid_request_error',
balmy slate
nova escarp
#

No, its fine, but see my note above

balmy slate
#

ohh I get it now

#

Thanks @nova escarp

nova escarp
#

NP!

#

(you can specify the amount optionally, if you want to refund less than the full charge)

ripe quiverBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

balmy slate
#

HI

cursive karma
#

Hi @balmy slate ๐Ÿ‘‹ I'm taking over for synthrider. How can I help?

balmy slate
#

As Syntrider suggested I should use that api and pass in the chargeId

#

but how do I get the chargeId?

#

I have the paymentIntent Id lisning to checkout.session.completed

#

and then when I try to retirve the data from paymentIntent

#

i get this error

#
  raw: {
    code: 'resource_missing',
    doc_url: 'https://stripe.com/docs/error-codes/resource-missing',
    message: "No such payment_intent: 'pi_3L065VSCfUurJJiW0wWsS2We'",
cursive karma
balmy slate
#

Ohh I did that, but I get an error for that too

#
    message: 'Cannot reverse transfer on charge ch_3L04tpSCfUurJJiW1OnaehGH because it does not have an associated transfer.',
    type: 'invalid_request_error',```
cursive karma
#

So you can't refund a charge using refund_application_fee: true and stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}' if there is not an associated transfer. You have to create the transfer first.

balmy slate
#

Ohh wait

#

it worked now

cursive karma
#

If you just want to refund the charge to the customer, you can do that without those parameters