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

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

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