Method: redirectPaymentCompleteNotification

Notify Google of the status of a redirect payment.

If the endpoint encounters an error while processing the request, the response from this endpoint will be of type ErrorResponse.

Responses to this query may be empty if this method does not return an HTTP 200. The response body is 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 an HTTP 404 with an empty body. If the request signature could be verified, additional information regarding the error will be returned in the response body.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1
    },
    "requestId": "aBcEIzjekl291A",
    "requestTimestamp": {
      "epochMillis": "1481899949606"
    },
    "paymentIntegratorAccountId": "InvisiRedirectPaymentUSA_USD"
  },
  "redirectRequestId": "cmVxdWVzdDE",
  "result": {
    "chargeExceedsTransactionLimit": {
      "transactionLimit": {
        "amountMicros": "1000000000000",
        "currencyCode": "INR"
      }
    }
  },
  "formOfPayment": {
    "issuerId": {
      "value": "123ABC"
    }
  }
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": "1481899949611"
    }
  },
  "result": {
    "accepted": {}
  }
}

HTTP request

POST https://vgw.googleapis.com/gsp/redirect-fop-v1/redirectPaymentCompleteNotification/:PIAID

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "redirectRequestId": string,
  "result": {
    object (RedirectPaymentNotificationRequestResult)
  },
  "formOfPayment": {
    object (FormOfPayment)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

redirectRequestId

string

REQUIRED: The requestId sent in the original/initiating redirect payment request.

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

result

object (RedirectPaymentNotificationRequestResult)

REQUIRED: Result of this redirect payment.

formOfPayment

object (FormOfPayment)

REQUIRED: The form of payment that the user selected for this payment. If the user made no choice or it does not apply, this should be set to noneChosen.

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

HTTP 4XX / 5XX Status

object (ErrorResponse)

RedirectPaymentNotificationRequestResult

Result details of the redirect payment.

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  },
  "chargeExceedsTransactionLimit": {
    object (ChargeExceedsTransactionLimit)
  },
  "chargeUnderLimit": {
    object (ChargeUnderLimit)
  },
  "insufficientFunds": {
    object (InsufficientFunds)
  },
  "accountDoesNotSupportCurrency": {
    object (AccountDoesNotSupportCurrency)
  },
  "userExitedPaymentFlow": {
    object (UserExitedPaymentFlow)
  },
  "riskDeclined": {
    object (RiskDeclined)
  }
  // End of list of possible types for union field result.
}
Fields
Union field result. The result of the redirect payment. The message specifies if this payment was successful or declined. result can be only one of the following:
success

object (Empty)

Successful redirect payment, deliver the goods.

chargeExceedsTransactionLimit

object (ChargeExceedsTransactionLimit)

This redirect payment request amount exceeds per-transaction limit. If this code is used populate the transactionLimit field for user messaging purposes.

chargeUnderLimit

object (ChargeUnderLimit)

This redirect payment request amount does not meet the minimum transaction amount.

insufficientFunds

object (InsufficientFunds)

This account does not have sufficient funds to guarantee this redirect payment.

accountDoesNotSupportCurrency

object (AccountDoesNotSupportCurrency)

This account does not support the requested currency.

userExitedPaymentFlow

object (UserExitedPaymentFlow)

User canceled the whole payment attempt. At any point in the payment flow, the user performed an action that canceled the payment. This should be used only when the payment will not complete in the future.

riskDeclined

object (RiskDeclined)

The transaction was declined due to a risk check done by the integrator.

This does not cause the user's instrument to be closed at Google.

RedirectPaymentCompleteNotificationResponse

Response object for the redirectPaymentCompleteNotification method.

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

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (RedirectPaymentNotificationResult)

REQUIRED: Contains the result of the request.

RedirectPaymentNotificationResult

Details corresponding to the result.

JSON representation
{

  // Union field result can be only one of the following:
  "accepted": {
    object (Empty)
  }
  // End of list of possible types for union field result.
}
Fields

Union field result.

result can be only one of the following:

accepted

object (Empty)

The RedirectPaymentCompleteNotificationRequest was valid and is now being processed by Google.