Method: captureResultNotification

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.

Responses to this query may be empty if this method does not return an HTTP 200. They are empty 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 HTTP 404 with an empty body.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 2
    },
    "requestId": "KcgwSKrV76eVNDUbsZ4UA3",
    "requestTimestamp": {
      "epochMillis": "1481852928293"
    },
    "paymentIntegratorAccountId": "InvisiCashUSA_USD"
  },
  "captureRequestId": "awNaC510cefae3IJdNEvW2",
  "result": {
    "success": {}
  }
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": "1481852928324"
    },
    "requestId": "KcgwSKrV76eVNDUbsZ4UA3"
  },
  "result": {
    "success": {}
  }
}

HTTP request

POST https://billpaynotification.googleapis.com/secure-serving/gsp/v2/captureResultNotification

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "captureRequestId": string,
  "result": {
    object (CaptureResult)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

captureRequestId

string

REQUIRED: A unique identifier for this transaction. This is the requestId generated by Google during the capture or asynchronousCapture call which this request is associated with.

This is a string with a max length of 100 characters and contains only the characters "a-z", "A-Z", "0-9", ":", "-", and "_".

result

object (CaptureResult)

REQUIRED: Result of this capture.

Response body

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

Response object for the captureResultNotification method.

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

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (CaptureResultNotificationResult)

REQUIRED: Result of this call.

CaptureResult

Information about the final result of a capture.

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  },
  "chargeUnderTransactionLimit": {
    object (ChargeUnderTransactionLimit)
  },
  "chargeExceedsTransactionLimit": {
    object (ChargeExceedsTransactionLimit)
  },
  "chargeExceedsDailyLimit": {
    object (ChargeExceedsDailyLimit)
  },
  "chargeExceedsMonthlyLimit": {
    object (ChargeExceedsMonthlyLimit)
  },
  "insufficientFunds": {
    object (InsufficientFunds)
  },
  "suspectedFraud": {
    object (SuspectedFraud)
  },
  "accountClosed": {
    object (AccountClosed)
  },
  "accountClosedAccountTakenOver": {
    object (AccountClosedAccountTakenOver)
  },
  "accountClosedFraud": {
    object (AccountClosedFraud)
  },
  "accountOnHold": {
    object (AccountOnHold)
  },
  "otpNotMatched": {
    object (OtpNotMatched)
  },
  "otpAlreadyUsed": {
    object (OtpAlreadyUsed)
  },
  "captureRequestExpired": {
    object (CaptureRequestExpired)
  },
  "invalidPin": {
    object (InvalidPin)
  },
  "osLockFailed": {
    object (OsLockFailed)
  },
  "pinEntryAttemptsExhausted": {
    object (PinEntryAttemptsExhausted)
  },
  "userExitedPaymentFlow": {
    object (UserExitedPaymentFlow)
  },
  "monthlyFrequencyLimitExceeded": {
    object (MonthlyFrequencyLimitExceeded)
  },
  "declinedByIssuer": {
    object (DeclinedByIssuer)
  }
  // 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)

The capture was successful

chargeUnderTransactionLimit

object (ChargeUnderTransactionLimit)

Requested capture amount does not meet the integrator's minimum per-transaction amount. If this code is used, populate the transactionMinLimit field with the minimum transaction amount for user messaging purposes.

chargeExceedsTransactionLimit

object (ChargeExceedsTransactionLimit)

Requested capture amount exceeds the integrator's maximum per-transaction limit. If this code is used, populate the transactionMaxLimit field with the transaction limit for user messaging purposes.

chargeExceedsDailyLimit

object (ChargeExceedsDailyLimit)

User's account cannot be used for purchases right now as it has exceeded its daily limit.

chargeExceedsMonthlyLimit

object (ChargeExceedsMonthlyLimit)

User's account cannot be used for purchases right now as it has exceeded its monthly limit.

insufficientFunds

object (InsufficientFunds)

This account does not have sufficient funds to guarantee this capture.

suspectedFraud

object (SuspectedFraud)

The integrator has reason to suspect that this transaction is fraudulent.

accountClosed

object (AccountClosed)

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.

accountClosedAccountTakenOver

object (AccountClosedAccountTakenOver)

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.

accountClosedFraud

object (AccountClosedFraud)

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.

accountOnHold

object (AccountOnHold)

User's account is on hold.

otpNotMatched

object (OtpNotMatched)

OTP did not match what the integrator sent.

otpAlreadyUsed

object (OtpAlreadyUsed)

OTP was already used.

captureRequestExpired

object (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.

invalidPin

object (InvalidPin)

The user supplied an invalid PIN.

osLockFailed

object (OsLockFailed)

This payment flow requires an OS lock challenge and the user failed to unlock the device.

pinEntryAttemptsExhausted

object (PinEntryAttemptsExhausted)

This payment flow requires user PIN entry. The user failed PIN entry enough times that they ran out of retries.

userExitedPaymentFlow

object (UserExitedPaymentFlow)

User canceled the whole payment attempt (either at the OS lock or at the PIN entry screen).

monthlyFrequencyLimitExceeded

object (MonthlyFrequencyLimitExceeded)

User's account cannot be used for purchases right now as it has exceeded its monthly transaction attempt limit.

declinedByIssuer

object (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.

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 SUCCESS.

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.

ChargeUnderTransactionLimit

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

transactionLimit

object (Amount)

REQUIRED: This is the minimum allowable amount the user can spend on a transaction. This is used for structured, user facing messaging and decline rate analysis.

ChargeExceedsTransactionLimit

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

transactionLimit

object (Amount)

REQUIRED: This is the maximum allowable amount the user can spend on a transaction. This is used for structured, user facing messaging and decline rate analysis.

ChargeExceedsDailyLimit

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

ChargeExceedsMonthlyLimit

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

InsufficientFunds

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

SuspectedFraud

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

AccountClosed

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

AccountClosedAccountTakenOver

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

AccountClosedFraud

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

AccountOnHold

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

OtpNotMatched

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

OtpAlreadyUsed

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

CaptureRequestExpired

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

InvalidPin

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

OsLockFailed

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

PinEntryAttemptsExhausted

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

UserExitedPaymentFlow

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

MonthlyFrequencyLimitExceeded

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

DeclinedByIssuer

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

object (RawResult)

OPTIONAL: Raw result of this capture. 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 scope would be "visa" and the rawCode would be whatever the VISA network returned.

CaptureResultNotificationResult

Result codes for the captureResultNotification method.

JSON representation
{
  "success": {
    object (Empty)
  }
}
Fields
success

object (Empty)

Capture result notification was successfully processed.