#Pravin-Refund

1 messages · Page 1 of 1 (latest)

mental rain
sand crow
#

we have done payment using charge api

#

its generate payout like py_1KdBUxAlnu7mVSWlel7HGGz3

#

will it support in above refund api?

mental rain
sand crow
#

ok thank you

#

i am getting below error

#

com.stripe.exception.InvalidRequestException: No such payment_intent: 'py_1KdBUxAlnu7mVSWlel7HGGz3'; code: resource_missing; request-id: req_WHMFoof3fIvgUJ

#

i tried like below :

#

public static void main(String[] args) {
Stripe.apiKey = "sk_test_51G6RI8Alnu7mVSWlQtbEs02GDlE2CXtorWp72BopNuOdlto75OWg4TDP2gCsYCy3E089y1zmYo4m1dloXx85ykGH00kRPpz1YQ";

//py_1KdBUxAlnu7mVSWlel7HGGz3

    RefundCreateParams params =
            RefundCreateParams.builder().setPaymentIntent("py_1KdBUxAlnu7mVSWlel7HGGz3").build();
    Refund refund = null;
    try {
        refund = Refund.create(params);
    } catch (StripeException e) {
        e.printStackTrace();
    }

    System.out.println(refund);
}
#

@mental rain please help

mental rain
#

it should be RefundCreateParams.builder().setCharge because you are passing a charge ID

sand crow
#

thank you for suggesting

#

let me try

#

it was my big blunder @mental rain

#

Thank you for your help

#

it worked for me

mental rain
#

cool! happy to help!