|
| 1 | +# CaptureApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.cybersource.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**capturePayment**](CaptureApi.md#capturePayment) | **POST** /v2/payments/{id}/captures | Capture a Payment |
| 8 | +[**getCapture**](CaptureApi.md#getCapture) | **GET** /v2/captures/{id} | Retrieve a Capture |
| 9 | + |
| 10 | + |
| 11 | +<a name="capturePayment"></a> |
| 12 | +# **capturePayment** |
| 13 | +> InlineResponse2012 capturePayment(capturePaymentRequest, id) |
| 14 | +
|
| 15 | +Capture a Payment |
| 16 | + |
| 17 | +Include the payment ID in the POST request to capture the payment amount. |
| 18 | + |
| 19 | +### Example |
| 20 | +```java |
| 21 | +// Import classes: |
| 22 | +//import Invokers.ApiException; |
| 23 | +//import Api.CaptureApi; |
| 24 | + |
| 25 | + |
| 26 | +CaptureApi apiInstance = new CaptureApi(); |
| 27 | +CapturePaymentRequest capturePaymentRequest = new CapturePaymentRequest(); // CapturePaymentRequest | |
| 28 | +String id = "id_example"; // String | The payment ID returned from a previous payment request. This ID links the capture to the payment. |
| 29 | +try { |
| 30 | + InlineResponse2012 result = apiInstance.capturePayment(capturePaymentRequest, id); |
| 31 | + System.out.println(result); |
| 32 | +} catch (ApiException e) { |
| 33 | + System.err.println("Exception when calling CaptureApi#capturePayment"); |
| 34 | + e.printStackTrace(); |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +### Parameters |
| 39 | + |
| 40 | +Name | Type | Description | Notes |
| 41 | +------------- | ------------- | ------------- | ------------- |
| 42 | + **capturePaymentRequest** | [**CapturePaymentRequest**](CapturePaymentRequest.md)| | |
| 43 | + **id** | **String**| The payment ID returned from a previous payment request. This ID links the capture to the payment. | |
| 44 | + |
| 45 | +### Return type |
| 46 | + |
| 47 | +[**InlineResponse2012**](InlineResponse2012.md) |
| 48 | + |
| 49 | +### Authorization |
| 50 | + |
| 51 | +No authorization required |
| 52 | + |
| 53 | +### HTTP request headers |
| 54 | + |
| 55 | + - **Content-Type**: Not defined |
| 56 | + - **Accept**: application/json |
| 57 | + |
| 58 | +<a name="getCapture"></a> |
| 59 | +# **getCapture** |
| 60 | +> InlineResponse2004 getCapture(id) |
| 61 | +
|
| 62 | +Retrieve a Capture |
| 63 | + |
| 64 | +Include the capture ID in the GET request to retrieve the capture details. |
| 65 | + |
| 66 | +### Example |
| 67 | +```java |
| 68 | +// Import classes: |
| 69 | +//import Invokers.ApiException; |
| 70 | +//import Api.CaptureApi; |
| 71 | + |
| 72 | + |
| 73 | +CaptureApi apiInstance = new CaptureApi(); |
| 74 | +String id = "id_example"; // String | The capture ID returned from a previous capture request. |
| 75 | +try { |
| 76 | + InlineResponse2004 result = apiInstance.getCapture(id); |
| 77 | + System.out.println(result); |
| 78 | +} catch (ApiException e) { |
| 79 | + System.err.println("Exception when calling CaptureApi#getCapture"); |
| 80 | + e.printStackTrace(); |
| 81 | +} |
| 82 | +``` |
| 83 | + |
| 84 | +### Parameters |
| 85 | + |
| 86 | +Name | Type | Description | Notes |
| 87 | +------------- | ------------- | ------------- | ------------- |
| 88 | + **id** | **String**| The capture ID returned from a previous capture request. | |
| 89 | + |
| 90 | +### Return type |
| 91 | + |
| 92 | +[**InlineResponse2004**](InlineResponse2004.md) |
| 93 | + |
| 94 | +### Authorization |
| 95 | + |
| 96 | +No authorization required |
| 97 | + |
| 98 | +### HTTP request headers |
| 99 | + |
| 100 | + - **Content-Type**: Not defined |
| 101 | + - **Accept**: application/json |
| 102 | + |
0 commit comments