Method: getRedirectPaymentStatus

Get completion details about a specific redirect payment. If the user never redirected back to Google or there was a problem with the redirect, this API will be called to obtain the final result of a payment.

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

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1
    },
    "requestId": "ak31kzZk3l19",
    "requestTimestamp": {
      "epochMillis": "1481899949606"
    },
    "paymentIntegratorAccountId": "InvisiRedirectPaymentUSA_USD"
  },
  "redirectRequestId": "cmVxdWVzdDE"
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": "1481899949611"
    }
  },
  "result": {
    "success": {}
  },
  "formOfPayment": {
    "issuerId": {
      "value": "123ABC"
    }
  }
}

HTTP request

POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-redirect/getRedirectPaymentStatus

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "redirectRequestId": string
}
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 "_".

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

HTTP 4XX / 5XX Status

object (ErrorResponse)

GetRedirectPaymentStatusResponse

Response object for the redirect-fop-v1.getRedirectPaymentStatus method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": {
    object (RedirectPaymentResult)
  },
  "formOfPayment": {
    object (FormOfPayment)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (RedirectPaymentResult)

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.

RedirectPaymentResult

Result details of the redirect payment.

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  },
  "pending": {
    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, declined, or pending. result can be only one of the following:
success

object (Empty)

Successful redirect payment, deliver the goods.

pending

object (Empty)

Payment is pending a final answer. This is a non-terminal state to indiciate the redirect payment was inconclusive and will resolve to be a success or decline in the future via a redirectPaymentCompleteNotification.

Depending on the Google product being purchased, if it takes too long for the integrator to tell Google the payment was successful, the payment may be considered canceled due to the user dropping out of session. A payment that is late in being marked successful (for some products) will immediately be refunded after the payment was reported as success.

A pending result should not be used to indicate system errors, those should be reported using the ErrorResponse.

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.

ChargeExceedsTransactionLimit

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

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

  // Union field limit can be only one of the following:
  "transactionLimit": {
    object (Amount)
  }
  // End of list of possible types for union field limit.
}
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.

Union field limit. REQUIRED: The per-transaction limit which was exceeded by this transaction. limit can be only one of the following:
transactionLimit

object (Amount)

REQUIRED: This is the maximum amount the user could spend on a transaction.

The currencyCode of transactionLimit must match the currencyCode of the request.

RawResult

Raw result object.

JSON representation
{
  "scope": string,
  "rawCode": string
}
Fields
scope

string

OPTIONAL: Scope of the rawCode, can be empty.

rawCode

string

REQUIRED: Raw code from the integrator or subsystems within it.

ChargeUnderLimit

This request's amount does not meet the minimum transaction amount.

JSON representation
{
  "rawResult": {
    object (RawResult)
  },
  "minimumTransactionLimit": {
    object (Amount)
  }
}
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.

minimumTransactionLimit

object (Amount)

OPTIONAL: This is the minimum amount the user could spend on a transaction. Note: this field will transition to REQUIRED in a future version of the API.

InsufficientFunds

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

JSON representation
{
  "rawResult": {
    object (RawResult)
  },
  "currentBalance": {
    object (Amount)
  }
}
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.

currentBalance

object (Amount)

OPTIONAL: This is the current available balance for the account. If provided, this value will be included in user-facing messaging.

AccountDoesNotSupportCurrency

This account does not support the requested currency.

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.

UserExitedPaymentFlow

User canceled the whole payment attempt.

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.

RiskDeclined

The transaction was declined due to a risk check on the integrator's side.

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.