# RedirectRequest

- [JSON representation](https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/RedirectRequest#SCHEMA_REPRESENTATION)

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 (`https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/RequestHeader`) }, "transactionAmount": { object (`https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/Amount`) }, "transactionDescription": string, "formOfPayment": { object (`https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/FormOfPayment`) } } ``` |

| Fields ||
|---|---|
| `requestHeader` | ``object (`https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/RequestHeader`)`` **REQUIRED**: Common header for all requests. |
| `transactionAmount` | ``object (`https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/Amount`)`` **REQUIRED**: The amount of the transaction. |
| `transactionDescription` | `string` **REQUIRED**: A description of the transaction that can be shown to the user. |
| `formOfPayment` | ``object (`https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/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. |