- HTTP request
- Request body
- Response body
- CaptureResult
- CaptureRequestExpired
- InvalidPin
- OsLockFailed
- PinEntryAttemptsExhausted
- UserExitedPaymentFlow
- MonthlyFrequencyLimitExceeded
- DeclinedByIssuer
- CaptureResultNotificationResponse
- CaptureResultNotificationResult
Notify Google of the result of a capture after a capture
or asynchronousCapture
method call has been made.
The captureResult
value is idempotent for this captureRequestId
, so its value cannot be changed by a subsequent call to this method.
If the echo is successful, the endpoint will return an HTTP 200 and the response will be of type EchoResponse
.
If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type ErrorResponse
or contain a generic error (e.g. a message similar to "There was an error. Please try again later.").
The generic error is used in situations where an ErrorResponse
with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a generic error. If the request signature could be verified, additional information regarding the error will be returned in an ErrorResponse
.
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 1
},
"requestId": "KcgwSKrV76eVNDUbsZ4UA3",
"requestTimestamp": {
"epochMillis": "1481852928293"
},
"paymentIntegratorAccountId": "InvisiCashUSA_USD"
},
"captureRequestId": "awNaC510cefae3IJdNEvW2",
"result": {
"success": {}
}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481852928324"
}
},
"result": {
"success": {}
}
}
HTTP request
POST https://vgw.googleapis.com/gsp/carrier-wallets-v1/captureResultNotification/:PIAID
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"requestHeader": {
object (RequestHeader)
},
"captureRequestId": string,
"result": {
object ( |
Fields | |
---|---|
request |
REQUIRED: Common header for all requests. |
capture |
REQUIRED: A unique identifier for this transaction. This is the This is a string with a max length of 100 characters and contains only the characters "a-z", "A-Z", "0-9", ":", "-", and "_". |
result |
REQUIRED: Result of this capture. |
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 |
|
CaptureResult
Information about the final result of a capture.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
success |
The capture was successful |
charge |
Requested capture amount does not meet the integrator's minimum per-transaction amount. If this code is used, populate the |
charge |
Requested capture amount exceeds the integrator's maximum per-transaction limit. If this code is used, populate the |
charge |
User's account cannot be used for purchases right now as it has exceeded its daily limit. |
charge |
User's account cannot be used for purchases right now as it has exceeded its monthly limit. |
insufficient |
This account does not have sufficient funds to guarantee this capture. |
account |
User's account held with the integrator has been closed. This return value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument. |
account |
User's account with the integrator has been closed, suspected account take over. This return value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument. |
account |
User's account held with the integrator has been closed because of fraud. This return value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument. |
account |
User's account is on hold. |
capture |
It took too long for the integrator to capture the user's funds. Google will treat this decline as a final state, so the integrator must ensure that the user's funds do not get captured later or that the user gets automatically refunded if the capture ended up succeeding. |
invalid |
The user supplied an invalid PIN. |
os |
This payment flow requires an OS lock challenge and the user failed to unlock the device. |
pin |
This payment flow requires user PIN entry. The user failed PIN entry enough times that they ran out of retries. |
user |
User canceled the whole payment attempt (either at the OS lock or at the PIN entry screen). |
monthly |
User's account cannot be used for purchases right now as it has exceeded its monthly transaction attempt limit. |
declined |
This decline code should never be used in steady-state. It is meant as a temporary catch-all code to use when the integrator encounters an unknown decline code from the underlying issuer of the user's instrument. This result code can be used while the integrator determines a more appropriate result code to use or negotiates the addition of a new result code to this specification. Importantly, this decline code is very much a real decline. It is a permanent decline as far as Google is concerned. If the integrator returns this, it is up to them to track down what the issuer's code really means and refund the user if it turns out the code actually meant If this decline code is used for the same underlying decline code for more than a certain number of days, Google will treat it as a bug and track it accordingly with respect to any contractual penalties around fixing bugs. |
risk |
The transaction was declined due to a risk check on the integrator's side. This is a permanent failure for this payment, but does not cause the user's instrument to be closed at Google. |
CaptureRequestExpired
It took too long for the integrator to capture the user's funds. Google will treat this decline as a final state, so the integrator must ensure that the user's funds do not get captured later or that the user gets automatically refunded if the capture ended up succeeding.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
Fields | |
---|---|
raw |
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 rawcode. 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 |
InvalidPin
The user supplied an invalid PIN.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
Fields | |
---|---|
raw |
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 rawcode. 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 |
OsLockFailed
This payment flow requires an OS lock challenge and the user failed to unlock the device.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
Fields | |
---|---|
raw |
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 rawcode. 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 |
PinEntryAttemptsExhausted
This payment flow requires user PIN entry. The user failed PIN entry enough times that they ran out of retries.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
Fields | |
---|---|
raw |
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 rawcode. 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 |
UserExitedPaymentFlow
User canceled the whole payment attempt.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
Fields | |
---|---|
raw |
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 rawcode. 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 |
MonthlyFrequencyLimitExceeded
User's account cannot be used for purchases right now as it has exceeded its monthly transaction attempt limit.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
Fields | |
---|---|
raw |
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 rawcode. 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 |
DeclinedByIssuer
This decline code should never be used in steady-state. It is meant as a temporary catch-all code to use when the integrator encounters an unknown decline code from the underlying issuer of the user's instrument. This result code can be used while the integrator determines a more appropriate result code to use or negotiates the addition of a new result code to this specification.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
Fields | |
---|---|
raw |
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 rawcode. 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 |
CaptureResultNotificationResponse
Response object for the captureResultNotification
method.
JSON representation |
---|
{
"responseHeader": {
object (ResponseHeader)
},
"result": {
object ( |
Fields | |
---|---|
response |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result of this call. |
CaptureResultNotificationResult
Result codes for the captureResultNotification
method.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
success |
Capture result notification was successfully processed. |