Method: captureFundsReservation

Initiates a capture of the funds reserved by a reserveFunds call.

This initiates money movement by capturing funds that were previous reserved in a call to reserveFunds. The reserveFundsRequestId specifies which funds reservation is to be captured. The amount captured can be less than or equal to the amount reserved but each reservation may only be captured once. The combination of requestId within the header and paymentIntegratorAccountId is the idempotency key and uniquely identifies this transaction. All mutations on this transaction (refund) populate the requestId value in their captureRequestId field.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 2
    },
    "requestId": "G112YZH4XPDV88J",
    "requestTimestamp": {
      "epochMillis": "1502220196077"
    },
    "paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR"
  },
  "reserveFundsRequestId": "G1MQ0YERJ0Q7LPM",
  "amount": {
    "amountMicros": "728000000",
    "currencyCode": "INR"
  },
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": "1481907920760"
    }
  },
  "result": {
    "success": {}
  }
}

HTTP request

POST https://www.integratordomain.com/v2/captureFundsReservation

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "reserveFundsRequestId": string,
  "amount": {
    object (Amount)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

reserveFundsRequestId

string

REQUIRED: requestId of the reserve funds call for this transaction.

amount

object (Amount)

REQUIRED: The amount of the purchase, in micros of the currency unit specified in the prior funds reservation. This amount can be less than or equal to the amount specified in the prior funds reservation. An example situation when this would occur would be, if Google runs out of stock for one item in a an order with multiple items.

Response body

If successful, the response body contains data with the following structure:

Response object for the capture method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": {
    object (CaptureReservedFundsResult)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (CaptureReservedFundsResult)

REQUIRED: Result of this capture.

CaptureReservedFundsResult

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  },
  "fundsReservationExpired": {
    object (FundsReservationExpired)
  }
  // End of list of possible types for union field result.
}
Fields

Union field result.

result can be only one of the following:

success

object (Empty)

Successful capture, deliver the goods.

fundsReservationExpired

object (FundsReservationExpired)

The associated funds reservation has expired.

FundsReservationExpired

JSON representation
{
  "rawResult": {
    object (RawResult)
  }
}
Fields
rawResult

object (RawResult)

OPTIONAL: Raw result of this reservation. Used to help inform Google's risk engine and analytics. In decline code–mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the scope would be "visa" and the rawCode would be whatever the VISA network returned.