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 transactionId field.

If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type ErrorResponse.

An example request looks like:


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

An example response looks like:


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

HTTP request

POST https://payment-integrator-carriers-api.google.com/integrator-base-path/carrier-wallets-v1/captureFundsReservation

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "reserveFundsRequestId": string,
  "amount": {
    object (Amount)
  },
  "tax": {
    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, including applicable taxes. 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.

tax

object (Amount)

REQUIRED: The direct tax to the user for this transaction. This amount can be less than or equal to the tax amount specified in the prior funds reservation.

Response body

This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse, consult the ErrorResponse object and HTTP status codes documentation.

Possible response messages
HTTP 200 Status

object (CaptureFundsReservationResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

CaptureFundsReservationResponse

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

The associated funds reservation has expired.

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

object (RawResult)

OPTIONAL: Raw result of this event. 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.