Method: createMandateResultNotification

Notify Google of the result of a mandate creation after a createMandate method call has been made.

The createMandateResult value is idempotent for this createMandateRequestId, so its value cannot be changed by a subsequent call to this method.

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": 2
    },
    "requestId": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
    "requestTimestamp": {
      "epochMillis": "1502220196077"
    },
    "paymentIntegratorAccountId": "InvisiCashIN_INR"
  },
  "createMandateRequestId": "zXCbyY2hhbnQgdHJhbnNhY3Rpb49qaAH",
  "updateSequenceTimestamp": {
      "epochMillis": "1502220196077"
  },
  "createMandateResult" : {
    "success" : {}
  }
}

An example response looks like:


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

HTTP request

POST https://vgw.googleapis.com/gsp/e-wallets-v2/createMandateResultNotification/:PIAID

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "createMandateRequestId": string,
  "updateSequenceTimestamp": {
    object (Timestamp)
  },
  "createMandateResult": {
    object (CreateMandateResult)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

createMandateRequestId

string

REQUIRED: The unique identifier for the mandate that is being created. This is the requestId generated by Google during the asynchronousCreateMandate call which this mandate 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 "_".

updateSequenceTimestamp

object (Timestamp)

REQUIRED: A timestamp (in UTC) describing when this request was sent. Google will use this timestamp to order createMandateResultNotification calls and other mandate modification calls (updateMandateStatus) that arrive around the same time, to determine which request is the most recent.

createMandateResult

object (CreateMandateResult)

REQUIRED: The result of this mandate creation.

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 (CreateMandateResultNotificationResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

CreateMandateResult

Information about the final result of a create mandate.

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  },
  "userDeclinedMandate": {
    object (UserDeclinedMandate)
  },
  "accountDoesNotSupportMandate": {
    object (AccountDoesNotSupportMandate)
  },
  "suspectedFraud": {
    object (SuspectedFraud)
  },
  "accountClosed": {
    object (AccountClosed)
  },
  "accountClosedAccountTakenOver": {
    object (AccountClosedAccountTakenOver)
  },
  "accountClosedFraud": {
    object (AccountClosedFraud)
  },
  "accountOnHold": {
    object (AccountOnHold)
  },
  "insufficientFunds": {
    object (InsufficientFunds)
  },
  "invalidPin": {
    object (InvalidPin)
  },
  "declinedByIssuer": {
    object (DeclinedByIssuer)
  },
  "osLockFailed": {
    object (OsLockFailed)
  },
  "pinEntryAttemptsExhausted": {
    object (PinEntryAttemptsExhausted)
  },
  "userExitedPaymentFlow": {
    object (UserExitedPaymentFlow)
  },
  "riskDeclined": {
    object (RiskDeclined)
  }
  // End of list of possible types for union field result.
}
Fields
Union field result. REQUIRED: The result must contain exactly one of these messages. result can be only one of the following:
success

object (Empty)

The mandate is active and could be used for transactions.

userDeclinedMandate

object (UserDeclinedMandate)

The mandate is declined by the user.

accountDoesNotSupportMandate

object (AccountDoesNotSupportMandate)

User's account held with the integrator is not supported for mandate creation.

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.

insufficientFunds

object (InsufficientFunds)

This account does not have sufficient funds needed to create this mandate.

invalidPin

object (InvalidPin)

The user supplied an invalid PIN.

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.

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

riskDeclined

object (RiskDeclined)

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.

UserDeclinedMandate

This mandate is declined by the user.

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.

AccountDoesNotSupportMandate

This account does not support mandate creation.

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.

SuspectedFraud

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

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

CreateMandateResultNotificationResponse

Response object for the createMandateResultNotification method.

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

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (CreateMandateResultNotificationResult)

REQUIRED: Result of this call.

CreateMandateResultNotificationResult

Result codes for the createMandateResultNotification method.

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  }
  // End of list of possible types for union field result.
}
Fields
Union field result. REQUIRED: The result must contain exactly one of these messages. result can be only one of the following:
success

object (Empty)

Create mandate result notification was successfully processed.