RedirectResponse

  • The RedirectResponse object, returned after a Complete Redirect flow, is encrypted, signed (using PGP or JWE+JWS), and web-safe base64 encoded.

  • It contains details about the redirect request, including a unique identifier (redirectRequestId), the selected form of payment (formOfPayment), and the result of the payment (result or errorResponse).

  • If successful, the result field provides information about the payment outcome; if unsuccessful, the errorResponse field contains details about the error.

  • The formOfPayment is optional and should be set to noneChosen if the user made no choice or it doesn't apply, but it is required when result is present.

  • The redirectRequestId is a mandatory string with a maximum length of 100 characters, containing only alphanumeric characters, colon, hyphen, and underscore.

Response object for the Complete Redirect flow.

Here's an example of a clear text JSON request:


{
  "redirectRequestId": "cmVxdWVzdDE",
  "result": {
    "success": {}
  },
  "formOfPayment": {
    "issuerId": {
      "value": "123ABC"
    }
  }
}

The RedirectResponse is encrypted and signed using PGP or JWE+JWS. Further, this value is web-safe base64 encoded. This encoding is referred to below as Base64UrlEncode. In other words, the clear text JSON version of the RedirectResponse must be passed through the following functions:

Base64UrlEncode(
  PGPSignAndEncrypt(
{
  "redirectRequestId": "cmVxdWVzdDE",
  "result": {
    "success": {}
  },
  "formOfPayment": {
    "issuerId": {
      "value": "123ABC"
    }
  }
}
  )
)

or

Base64UrlEncode(
  JWSignAndEncrypt(
{
  "redirectRequestId": "cmVxdWVzdDE",
  "result": {
    "success": {}
  },
  "formOfPayment": {
    "issuerId": {
      "value": "123ABC"
    }
  }
}
  )
)
JSON representation
{
  "redirectRequestId": string,
  "formOfPayment": {
    object (FormOfPayment)
  },

  // Union field redirectResult can be only one of the following:
  "result": {
    object (RedirectPaymentResult)
  },
  "errorResponse": {
    object (CompleteRedirectErrorResponse)
  }
  // End of list of possible types for union field redirectResult.
}
Fields
redirectRequestId

string

REQUIRED: Unique identifier of the initiating redirect 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 "_".

formOfPayment

object (FormOfPayment)

OPTIONAL: 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. Required to be set when result is set.

Union field redirectResult. REQUIRED: The result of the redirect payment. redirectResult can be only one of the following:
result

object (RedirectPaymentResult)

Result of this redirect payment if it was successful, declined, or pending.

errorResponse

object (CompleteRedirectErrorResponse)

Details if the redirect failed because of an error. Redirect payments that receive this reply are kept open, and the integrator can later send a redirectPaymentCompleteNotification if the payment was successful or declined.