GeneratePaymentTokenRedirectRequest

Stay organized with collections Save and categorize content based on your preferences.

Request object for the Generate Payment Token Redirect flow.

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


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 1,
      "revision": 0
    },
    "requestId": "G112YZH4XPDV88J",
    "requestTimestamp": "1481907920000"
  },
  "paymentIntegratorAccountId": "InvisiCashUSA_USD",
  "transactionAmount": {
    "amountMicros": "109900000",
    "currencyCode": "INR"
  },
  "transactionDescription": "Google Store Purchase",
  "shippingAddress": {
    "name": "Example Customer",
    "addressLine": ["123 Main St"],
    "localityName": "Springfield",
    "administrativeAreaName": "CO",
    "postalCodeNumber": "80309",
    "countryCode": "US"
  },
  "googleAccountDetails": {
    "emailAddress": "example@gmail.com"
  }
}

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

Base64UrlEncode(
  PGPSignAndEncrypt(
{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 1,
      "revision": 0
    },
    "requestId": "G112YZH4XPDV88J",
    "requestTimestamp": "1481907920000"
  },
  "paymentIntegratorAccountId": "InvisiCashUSA_USD",
  "transactionAmount": {
    "amountMicros": "109900000",
    "currencyCode": "INR"
  },
  "transactionDescription": "Google Store Purchase",
  "shippingAddress": {
    "name": "Example Customer",
    "addressLine": ["123 Main St"],
    "localityName": "Springfield",
    "administrativeAreaName": "CO",
    "postalCodeNumber": "80309",
    "countryCode": "US"
  },
  "googleAccountDetails": {
    "emailAddress": "example@gmail.com"
  }
}
  )
)

or

Base64UrlEncode(
  JWSignAndEncrypt(
{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 1,
      "revision": 0
    },
    "requestId": "G112YZH4XPDV88J",
    "requestTimestamp": "1481907920000"
  },
  "paymentIntegratorAccountId": "InvisiCashUSA_USD",
  "transactionAmount": {
    "amountMicros": "109900000",
    "currencyCode": "INR"
  },
  "transactionDescription": "Google Store Purchase",
  "shippingAddress": {
    "name": "Example Customer",
    "addressLine": ["123 Main St"],
    "localityName": "Springfield",
    "administrativeAreaName": "CO",
    "postalCodeNumber": "80309",
    "countryCode": "US"
  },
  "googleAccountDetails": {
    "emailAddress": "example@gmail.com"
  }
}
  )
)
JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "paymentIntegratorAccountId": string,
  "transactionAmount": {
    object (Amount)
  },
  "transactionDescription": string,
  "shippingAddress": {
    object (Address)
  },
  "googleAccountDetails": {
    object (GoogleAccountDetails)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

paymentIntegratorAccountId

string

REQUIRED: This is the payment integrator account identifier that identifies contractual constraints around this transaction.

transactionAmount

object (Amount)

REQUIRED: The amount of the transaction.

transactionDescription

string

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

shippingAddress

object (Address)

OPTIONAL: The shipping address of the customer. This is used when there are physical goods being shipped to the user making the purchase.

googleAccountDetails

object (GoogleAccountDetails)

OPTIONAL: This is information about the user's Google account that Google has verified.

Amount

Associates an amount in micros with a currency code.

JSON representation
{
  "amountMicros": string,
  "currencyCode": string
}
Fields
amountMicros

string (Int64Value format)

REQUIRED: An amount in micros.

currencyCode

string

REQUIRED: ISO 4217 3-letter currency code

GoogleAccountDetails

Details about the user's Google account.

JSON representation
{
  "emailAddress": string
}
Fields
emailAddress

string

OPTIONAL: The email address associated with the customer.