- HTTP request
- Request body
- Response body
- InstantPaymentInfo
- CreateMandateResult
- UserDeclinedMandate
- AccountDoesNotSupportMandate
- CreateMandateRequestExpired
- SuspectedFraud
- AccountClosed
- AccountClosedAccountTakenOver
- AccountClosedFraud
- AccountOnHold
- InsufficientFunds
- RemedyMethod
- InvalidPin
- MandateExceedsCountLimit
- DeclinedByIssuer
- OsLockFailed
- PinEntryAttemptsExhausted
- UserExitedPaymentFlow
- RiskDeclined
- MandateCreationFailedChargeSucceeded
- CreateMandateResultNotificationResponse
- CreateMandateResultNotificationResult
Notify Google of the result of a mandate creation after a createMandateWithOptionalInstantPayment
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": 1,
"minor": 0,
"revision": 0
},
"requestId": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
"requestTimestamp": "1502220196078"
},
"paymentIntegratorAccountId": "InvisiCashIN_INR",
"paymentIntegratorTransactionId": "5243098752039874502983745",
"createMandateRequestId": "zXCbyY2hhbnQgdHJhbnNhY3Rpb49qaAH",
"instantPaymentInfo": {
"referenceNumber": "referenceNumber",
"paymentTimestamp": {
"epochMillis": "1521855969203"
},
"paidAmount": {
"amountMicros": "728000000",
"currencyCode": "USD"
}
},
"payerInfo": {
"payerTaxInfo": {
"brazil": {
"cnpj": "66818021000127"
}
},
"payerBankAccountIdentifier": {
"brazilBankAccount": {
"bankCode": "12345678",
"branchCode": "1234567890",
"accountNumber": "1234567890123456"
}
}
},
"createMandateResult" : {
"success" : {}
}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": "1481900013178"
},
"result": {
"success": {}
}
}
HTTP request
POST https://vgw.googleapis.com/gsp/refundable-one-time-payment-code-v1/createMandateResultNotification/:PIAID
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "requestHeader": { object (RequestHeader) }, "paymentIntegratorAccountId": string, "paymentIntegratorTransactionId": string, "createMandateRequestId": string, "instantPaymentInfo": { object ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
paymentIntegratorAccountId |
REQUIRED: This is the payment integrator account identifier that identifies contractual constraints around this transaction. |
paymentIntegratorTransactionId |
OPTIONAL: This identifier is specific to the integrator and is generated by the integrator. This is the identifier by which the integrator knows this transaction. For convenience, this identifier is included when the payment integrator requests remittanceStatementDetails. |
createMandateRequestId |
REQUIRED: The unique identifier for the mandate that is being created. 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 "_". |
instantPaymentInfo |
OPTIONAL: Details about the instant payment, if one was made. This field is required only if an instant payment was part of the mandate creation. |
payerInfo |
OPTIONAL: Details about the person making the payment. This may include tax information, bank account details, etc. Providing this information enhances our ability to detect and prevent fraudulent activity by adding Risk checks, making the payment system more secure for one-time payment code form of payment. If this information is not provided, the payment system will still function normally but may not be as secure. |
createMandateResult |
REQUIRED: The result of this mandate creation. |
Union field end_to_end_network_identifier . OPTIONAL: Identifier specific for a newwork. end_to_end_network_identifier can be only one of the following: |
|
pixEndToEndId |
This ID is created by Banco Central do Brasil (BCB) for the Brazilian instant payment ecosystem (Pix). This ID is used to identify the operation on a transaction, either a payment or a refund. |
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 |
|
InstantPaymentInfo
Details about an instant payment made during mandate creation.
JSON representation |
---|
{ "referenceNumber": string, "paymentTimestamp": { object (Timestamp) }, "paidAmount": { object (Amount) } } |
Fields | |
---|---|
referenceNumber |
REQUIRED: The reference number associated with the instant payment, if one was made. This field is required only if an instant payment was part of the mandate creation. For legacy integrations, this is the For new integrations, this is the |
paymentTimestamp |
REQUIRED: The timestamp recorded by the integrator when the user paid this reference number (represented as milliseconds since epoch). This field is required only if an instant payment was part of the mandate creation. |
paidAmount |
REQUIRED: The amount actually paid by the user when initiating the mandate. The user should not be allowed to pay a different amount than the instant payment amount sent in the |
CreateMandateResult
Information about the final result of a create mandate.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field result . REQUIRED: The result must contain exactly one of these messages. result can be only one of the following: |
|
success |
The mandate is active and could be used for transactions. |
userDeclinedMandate |
The mandate is declined by the user. |
accountDoesNotSupportMandate |
User's account held with the integrator is not supported for mandate creation. |
createMandateRequestExpired |
The create mandate request has expired. Google will treat this decline as a final state, so the integrator must ensure that the creation doesn't succeed later or that the mandate gets automatically revoked if the creation ends up being successful. |
suspectedFraud |
The integrator has reason to suspect that this transaction is fraudulent. |
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 |
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 |
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 |
User's account is on hold. |
insufficientFunds |
This account does not have sufficient funds needed to create this mandate. |
invalidPin |
The user supplied an invalid PIN. |
mandateExceedsCountLimit |
User's account cannot be used to create a mandate right now as it has exceeded its limit for the number of mandates. |
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 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 |
This payment flow requires an OS lock challenge and the user failed to unlock the device. |
pinEntryAttemptsExhausted |
This payment flow requires user PIN entry. The user failed PIN entry enough times that they ran out of retries. |
userExitedPaymentFlow |
User canceled the whole payment attempt (either at the OS lock or at the PIN entry screen). |
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. |
mandateCreationFailedChargeSucceeded |
This decline code is for the case when the mandate creation failed but the instant payment associated with the mandate succeeded. |
UserDeclinedMandate
This mandate is declined by the user.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 |
AccountDoesNotSupportMandate
This account does not support mandate creation.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 |
CreateMandateRequestExpired
The create mandate request has expired. Google will treat this decline as a final state, so the integrator must ensure that the creation doesn't succeed later or that the mandate gets automatically revoked if the creation ended up succeeding.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 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 |
SuspectedFraud
The integrator has reason to suspect that this transaction is fraudulent.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 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 |
AccountClosed
The user's account held with the integrator has been closed.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 |
AccountClosedAccountTakenOver
The user's account with the integrator has been closed, suspected account take over.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 |
AccountClosedFraud
The user's account held with the integrator has been closed because of fraud.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 |
AccountOnHold
The account is on hold.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 |
InsufficientFunds
This account does not have sufficient funds to guarantee this capture.
JSON representation |
---|
{
"rawResult": {
object (RawResult)
},
"currentBalance": {
object (Amount)
},
"remedyMethod": {
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 |
currentBalance |
OPTIONAL: This is the current available balance for the account. If provided, this value will be included in user-facing messaging. |
remedyMethod |
OPTIONAL: This is the remedy method to be applied for the user to help with the insufficient funds issue. |
RemedyMethod
Remedy method for InsufficientFunds
.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field remedy_method . REQUIRED: Oneof remedy method for InsufficientFunds . remedy_method can be only one of the following: |
|
topUp |
This account does not have sufficient funds to guarantee this transfer. The user should be recommended to top-up. |
InvalidPin
The user supplied an invalid PIN.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 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 |
MandateExceedsCountLimit
User's account cannot be used to create a mandate right now as it has exceeded its limit for the number of mandates.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 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 | |
---|---|
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 |
OsLockFailed
This payment flow requires an OS lock challenge and the user failed to unlock the device.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 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 | |
---|---|
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 |
UserExitedPaymentFlow
User canceled the whole payment attempt.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 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 |
RiskDeclined
The transaction was declined due to a risk check on the integrator's side.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 |
MandateCreationFailedChargeSucceeded
Mandate creation failed but the instant payment associated with the mandate succeeded.
JSON representation |
---|
{ "rawResult": { object (RawResult) } } |
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 |
CreateMandateResultNotificationResponse
Response object for the createMandateResultNotification
method.
JSON representation |
---|
{
"responseHeader": {
object (ResponseHeader)
},
"result": {
object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result of this call. |
CreateMandateResultNotificationResult
Result codes for the createMandateResultNotification
method.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field result . REQUIRED: The result must contain exactly one of these messages. result can be only one of the following: |
|
success |
Create mandate result notification was successfully processed. |