RedirectRequest

  • The Begin Redirect flow utilizes a JSON request object to initiate the process.

  • This JSON request is encrypted, signed (using PGP or JWE+JWS), and then base64 encoded for security.

  • The request object includes details like transaction amount, description, and selected form of payment.

  • The formOfPayment field indicates the user's payment choice and guides further actions, like redirecting to the integrator's site for payment selection if none is chosen.

Request object for the Begin Redirect flow.

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


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1
    },
    "requestId": "cmVxdWVzdDE",
    "requestTimestamp": {
      "epochMillis": "1481899949606"
    },
    "paymentIntegratorAccountId": "InvisiRedirectPaymentUSA_USD"
  },
  "transactionAmount": {
    "amountMicros": "109900000",
    "currencyCode": "INR"
  },
  "transactionDescription": "Play Movies",
  "formOfPayment": {
    "issuerId": {
      "value": "123ABC"
    }
  }
}

The RedirectRequest 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 RedirectRequest must be passed through the following functions:

Base64UrlEncode(
  PGPSignAndEncrypt(
{
  "requestHeader": {
    "protocolVersion": {
      "major": 1
    },
    "requestId": "cmVxdWVzdDE",
    "requestTimestamp": {
      "epochMillis": "1481899949606"
    },
    "paymentIntegratorAccountId": "InvisiRedirectPaymentUSA_USD"
  },
  "transactionAmount": {
    "amountMicros": "109900000",
    "currencyCode": "INR"
  },
  "transactionDescription": "Play Movies",
  "formOfPayment": {
    "issuerId": {
      "value": "123ABC"
    }
  }
}
  )
)

or

Base64UrlEncode(
  JWSignAndEncrypt(
{
  "requestHeader": {
    "protocolVersion": {
      "major": 1
    },
    "requestId": "cmVxdWVzdDE",
    "requestTimestamp": {
      "epochMillis": "1481899949606"
    },
    "paymentIntegratorAccountId": "InvisiRedirectPaymentUSA_USD"
  },
  "transactionAmount": {
    "amountMicros": "109900000",
    "currencyCode": "INR"
  },
  "transactionDescription": "Play Movies",
  "formOfPayment": {
    "issuerId": {
      "value": "123ABC"
    }
  }
}
  )
)
JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "transactionAmount": {
    object (Amount)
  },
  "transactionDescription": string,
  "formOfPayment": {
    object (FormOfPayment)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

transactionAmount

object (Amount)

REQUIRED: The amount of the transaction.

transactionDescription

string

REQUIRED: A description of the transaction that can be shown to the user.

formOfPayment

object (FormOfPayment)

REQUIRED: The form of payment that the user already selected for this payment. If the user made no choice or it does not apply, this will be set to noneChosen. In the noneChosen case, the user should be redirected to the integrator's website to allow the user to select a form of payment.