TopUpRedirectRequest

Request object for the Top-Up Redirect flow.

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


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 1,
      "revision": 0
    },
    "requestId": "G112YZH4XPDV88J",
    "requestTimestamp": "1481907920000"
  },
  "associationId": "LmddbXBsZSByZWZlcmVuY2UgdG9rZW4gdmFsdWU_"
}

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

Base64UrlEncode(
  PGPSignAndEncrypt(
{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 1,
      "revision": 0
    },
    "requestId": "G112YZH4XPDV88J",
    "requestTimestamp": "1481907920000"
  },
  "associationId": "LmddbXBsZSByZWZlcmVuY2UgdG9rZW4gdmFsdWU_"
}
  )
)

or

Base64UrlEncode(
  JWSignAndEncrypt(
{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 1,
      "revision": 0
    },
    "requestId": "G112YZH4XPDV88J",
    "requestTimestamp": "1481907920000"
  },
  "associationId": "LmddbXBsZSByZWZlcmVuY2UgdG9rZW4gdmFsdWU_"
}
  )
)
JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "associationId": string,
  "targetBalance": {
    object (Amount)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

associationId

string

REQUIRED: The associationId that represents the user's account. This is public-facing ID for the user's account that was provided by Google during the associateAccount call.

targetBalance

object (Amount)

OPTIONAL: The target balance to reach, in micros.