|
| 1 | +# CyberSource.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 | +```javascript |
| 21 | +var CyberSource = require('CyberSource'); |
| 22 | + |
| 23 | +var apiInstance = new CyberSource.CaptureApi(); |
| 24 | + |
| 25 | +var capturePaymentRequest = new CyberSource.CapturePaymentRequest(); // CapturePaymentRequest | |
| 26 | + |
| 27 | +var id = "id_example"; // String | The payment ID returned from a previous payment request. This ID links the capture to the payment. |
| 28 | + |
| 29 | + |
| 30 | +var callback = function(error, data, response) { |
| 31 | + if (error) { |
| 32 | + console.error(error); |
| 33 | + } else { |
| 34 | + console.log('API called successfully. Returned data: ' + data); |
| 35 | + } |
| 36 | +}; |
| 37 | +apiInstance.capturePayment(capturePaymentRequest, id, callback); |
| 38 | +``` |
| 39 | + |
| 40 | +### Parameters |
| 41 | + |
| 42 | +Name | Type | Description | Notes |
| 43 | +------------- | ------------- | ------------- | ------------- |
| 44 | + **capturePaymentRequest** | [**CapturePaymentRequest**](CapturePaymentRequest.md)| | |
| 45 | + **id** | **String**| The payment ID returned from a previous payment request. This ID links the capture to the payment. | |
| 46 | + |
| 47 | +### Return type |
| 48 | + |
| 49 | +[**InlineResponse2012**](InlineResponse2012.md) |
| 50 | + |
| 51 | +### Authorization |
| 52 | + |
| 53 | +No authorization required |
| 54 | + |
| 55 | +### HTTP request headers |
| 56 | + |
| 57 | + - **Content-Type**: Not defined |
| 58 | + - **Accept**: application/json |
| 59 | + |
| 60 | +<a name="getCapture"></a> |
| 61 | +# **getCapture** |
| 62 | +> InlineResponse2004 getCapture(id) |
| 63 | +
|
| 64 | +Retrieve a Capture |
| 65 | + |
| 66 | +Include the capture ID in the GET request to retrieve the capture details. |
| 67 | + |
| 68 | +### Example |
| 69 | +```javascript |
| 70 | +var CyberSource = require('CyberSource'); |
| 71 | + |
| 72 | +var apiInstance = new CyberSource.CaptureApi(); |
| 73 | + |
| 74 | +var id = "id_example"; // String | The capture ID returned from a previous capture request. |
| 75 | + |
| 76 | + |
| 77 | +var callback = function(error, data, response) { |
| 78 | + if (error) { |
| 79 | + console.error(error); |
| 80 | + } else { |
| 81 | + console.log('API called successfully. Returned data: ' + data); |
| 82 | + } |
| 83 | +}; |
| 84 | +apiInstance.getCapture(id, callback); |
| 85 | +``` |
| 86 | + |
| 87 | +### Parameters |
| 88 | + |
| 89 | +Name | Type | Description | Notes |
| 90 | +------------- | ------------- | ------------- | ------------- |
| 91 | + **id** | **String**| The capture ID returned from a previous capture request. | |
| 92 | + |
| 93 | +### Return type |
| 94 | + |
| 95 | +[**InlineResponse2004**](InlineResponse2004.md) |
| 96 | + |
| 97 | +### Authorization |
| 98 | + |
| 99 | +No authorization required |
| 100 | + |
| 101 | +### HTTP request headers |
| 102 | + |
| 103 | + - **Content-Type**: Not defined |
| 104 | + - **Accept**: application/json |
| 105 | + |
0 commit comments