AI-generated Key Takeaways
-
Initiates money movement by capturing funds previously reserved using the
reserveFunds
call, allowing for partial capture but only one capture per reservation. -
The combination of
requestId
andpaymentIntegratorAccountId
acts as an idempotency key, ensuring unique identification for each transaction and enabling mutation tracking through thetransactionId
field. -
The request body includes details like
requestHeader
,reserveFundsRequestId
,amount
(including taxes), and can result in either a successful capture or aFundsReservationExpired
status. -
In case of errors, the response body will be of type
ErrorResponse
, providing detailed information about the issue encountered. -
Successful capture is indicated by the
success
status, whileFundsReservationExpired
signifies that the associated reservation is no longer valid for capture.
- HTTP request
- Request body
- Response body
- CaptureFundsReservationResponse
- CaptureReservedFundsResult
- FundsReservationExpired
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 requestId
within the header 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 ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
reserveFundsRequestId |
REQUIRED: |
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 |
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 |
|
HTTP 4XX / 5XX Status |
|
CaptureFundsReservationResponse
Response object for the capture method.
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result of this capture. |
CaptureReservedFundsResult
The result of the captureFundsReservation
call.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field result . REQUIRED: The result of the captureFundsReservation call. result can be only one of the following: |
|
success |
Successful capture, deliver the goods. |
fundsReservationExpired |
The associated funds reservation has expired. |
FundsReservationExpired
The associated funds reservation has expired.
JSON representation |
---|
{
"rawResult": {
object ( |
Fields | |
---|---|
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 |