pub async fn refund_payment(
        &self,
        payment_id: String,
        body: &RefundPaymentBody,
    ) -> Result<RefundPaymentResponse, Error> {
        let url = format!(
            "{}/payments/{}/refunds",
            self.environment.api_url(),
            payment_id
        );
        self.send_post_request(&url, &body).await
    }
/// Refund a payment
///
/// Refunds a payment if supported by the payment method.
///
/// For card payments, refund requests are processed asynchronously. You
/// can use webhooks to be notified if the refund is successful.
///
/// [`POST /payments/{id}/refunds`](https://api-reference.checkout.com/#operation/refundAPayment)
Refund a payment
Refunds a payment if supported by the payment method.

For card payments, refund requests are processed asynchronously. You
can use webhooks to be notified if the refund is successful.

[`POST /payments/{id}/refunds`]
Refund a payment Refunds a payment if supported by the payment method . For card payments refund requests are processed asynchronously . You can use webhooks to be notified if the refund is successful . [ ` POST / payments / { id } / refunds ` ]
pub async fn refund_payment(
        &self,
        payment_id: String,
        body: &RefundPaymentBody,
    ) -> Result<RefundPaymentResponse, Error> {
        let url = format!(
            "{}/payments/{}/refunds",
            self.environment.api_url(),
            payment_id
        );
        self.send_post_request(&url, &body).await
    }
pub async fn refund_payment ( & self , payment_id : String , body : & RefundPaymentBody , ) -> Result < RefundPaymentResponse , Error > { let url = format ! ( " " self environment api_url ( ) payment_id ) ; self . send_post_request ( & url , & body ) . await }
Refund a payment
Refunds a payment if supported by the payment method.
Refund a payment Refunds a payment if supported by the payment method .
&self
payment_id
String
body
&RefundPaymentBody
&self
payment_id
String
body
&RefundPaymentBody