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

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

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