Initiates money movement between a customer's account held with Google and the payment processor. 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 the 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": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
"requestTimestamp": {
"epochMillis": "1502220196077"
},
"paymentIntegratorAccountId": "InvisiCashUSA_USD"
},
"googlePaymentToken": {
"issuerId": {
"value": "invisicash"
},
"token": "ZXhhbXBsZSB1bmlxdWUgcGF5bWVudCB0b2tlbiB2YWx1ZQ"
},
"transactionDescription": "Google - Music",
"amount": {
"amountMicros": "728000000",
"currencyCode": "INR"
},
"tax": {
"amountMicros": "27300000",
"currencyCode": "INR"
}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481900013178"
}
},
"result": {
"success": {}
}
}
HTTP request
POST https://payment-integrator-carriers-api.google.com/integrator-base-path/carrier-wallets-v1/capture
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "requestHeader": { object ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
googlePaymentToken |
REQUIRED: This is the token that both companies will use to identify the account for purchases between each other. |
transactionDescription |
REQUIRED: This is the description of the transaction that can be put on the customer's statement. Localized to the userLocale found in the |
amount |
REQUIRED: The amount of the purchase, including applicable taxes. |
tax |
REQUIRED: The amount of the purchase the buyer is paying in taxes. |
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 |
|
CaptureResponse
Response object for the capture method.
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
userMessage |
DEPRECATED: A description of the result to be displayed to the user if the result is not |
result |
REQUIRED: Result of this capture. |
CaptureResult
Result codes for capture.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field result . The result of the capture. The message specifies if this payment was successful or declined. This message should only be used to report a terminal state for a payment. result can be only one of the following: |
|
success |
Successful capture, deliver the goods. |
chargeExceedsTransactionLimit |
This capture request's |
chargeExceedsDailyLimit |
This account cannot be used for purchases right now as it has exceeded its daily limits. |
chargeExceedsMonthlyLimit |
This account cannot be used for purchases right now as it has exceeded its monthly limits. |
chargeUnderLimit |
This capture request's |
insufficientFunds |
This account does not have sufficient funds to guarantee this capture. |
accountClosed |
The user's account held with the integrator has been closed. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
accountClosedAccountTakenOver |
The user's account with the integrator has been closed, suspected account take over. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
accountOnHold |
The account is on hold. |
accountClosedFraud |
The user's account held with the integrator has been closed because of fraud. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
googlePaymentTokenInvalidatedByUser |
The account is active, but the GPT has been invalidated by the user on the integrator's side. Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again. |
riskDeclined |
The transaction was declined due to a risk check on the integrator's side. This does not cause the user's instrument to be closed at Google. |