#ChordOnCode

1 messages ยท Page 1 of 1 (latest)

visual gazelleBOT
fringe knoll
#

Hi! Let me help you with this.

remote quiver
#

๐Ÿ™‚

#

actually I wrote code like below

        payment_intent: paymentIntentId,
        refund_application_fee: false,
        reason: 'requested_by_customer',
    }, {
        stripeAccount: accountId,
    });```
fringe knoll
#

Stripe.js is a library for the frontend part of your integration.
You can't initiate refunds on the frontend.
What technology/language are you using on the backend?

remote quiver
#

oh... I use this one on node server.

#

the backend is node js.

fringe knoll
#

Oh, the library is correct, but it's not stripe.js, it's stripe-node. Yes, it supports refunds.

remote quiver
#

oh!.. so the commercial SDK is stripe-node ? not stripe.js?

#

I already checked that document. but... I need a suitable SDK.

#

So, Where can I get the right SDK for node js?

fringe knoll
#

stripe-node is backend
stripe.js is frontend

remote quiver
#
#

it's not the commercial sdk.

fringe knoll
#

https://www.npmjs.com/package/stripe
This is the correct one

remote quiver
#

Iam using this one.

#

when I call the refund API,
I meet this error

#

my code is

        payment_intent: paymentIntentId,
        refund_application_fee: false,
        reason: 'requested_by_customer',
    }, {
        stripeAccount: accountId,
    });```
#

except refund api, other apis is working well~

#

oh...

#

await stripe.refunds

#

my bad..

#

await stripe.refunds.create is the right..

#

i used await stripe.checkout.refunds.

#

@_@

#

thank you!

fringe knoll
#

Happy to help. Please, let me know if you have any other questions.

remote quiver
#

to help my debuging ๐Ÿ˜‰

#

thank you