Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 1.67 KB

CaptureApi.md

File metadata and controls

58 lines (37 loc) · 1.67 KB

CyberSource.CaptureApi

All URIs are relative to https://apitest.cybersource.com

Method HTTP request Description
capturePayment POST /pts/v2/payments/{id}/captures Capture a Payment

capturePayment

PtsV2PaymentsCapturesPost201Response capturePayment(capturePaymentRequest, id)

Capture a Payment

Include the payment ID in the POST request to capture the payment amount.

Example

var CyberSource = require('CyberSource');

var apiInstance = new CyberSource.CaptureApi();

var capturePaymentRequest = new CyberSource.CapturePaymentRequest(); // CapturePaymentRequest | 

var id = "id_example"; // String | The payment ID returned from a previous payment request. This ID links the capture to the payment. 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.capturePayment(capturePaymentRequest, id, callback);

Parameters

Name Type Description Notes
capturePaymentRequest CapturePaymentRequest
id String The payment ID returned from a previous payment request. This ID links the capture to the payment.

Return type

PtsV2PaymentsCapturesPost201Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json;charset=utf-8
  • Accept: application/json;charset=utf-8