- HTTP request
- Request body
- Response body
- RedirectPaymentNotificationRequestResult
- RedirectPaymentCompleteNotificationResponse
- RedirectPaymentNotificationResult
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 ( |
Fields | |
---|---|
request |
REQUIRED: Common header for all requests. |
redirect |
REQUIRED: The 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 |
REQUIRED: Result of this redirect payment. |
form |
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 |
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 |
|
RedirectPaymentNotificationRequestResult
Result details of the redirect payment.
JSON representation |
---|
{ // Union field |
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 |
Successful redirect payment, deliver the goods. |
charge |
This redirect payment request |
charge |
This redirect payment request |
insufficient |
This account does not have sufficient funds to guarantee this redirect payment. |
account |
This account does not support the requested currency. |
user |
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. |
risk |
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. |
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. |
otp |
OTP did not match what the integrator sent. |
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 |
RedirectPaymentCompleteNotificationResponse
Response object for the redirectPaymentCompleteNotification
method.
JSON representation |
---|
{
"responseHeader": {
object (ResponseHeader)
},
"result": {
object ( |
Fields | |
---|---|
response |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Contains the result of the request. |
RedirectPaymentNotificationResult
Details corresponding to the result.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
accepted |
The |