AI-generated Key Takeaways
-
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 ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
transactionAmount |
REQUIRED: The amount of the transaction. |
transactionDescription |
REQUIRED: A description of the transaction that can be shown to the user. |
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 |