- HTTP request
- Request body
- Response body
- GenerateRedirectPaymentUrlResponse
- GenerateRedirectPaymentUrlResult
- SuccessDetails
- RedirectDetails
- GetRequest
- PostFormRequest
- BodyPair
- BodyEncoding
Provides basic information about this transaction to allow the integrator to create a redirect URL. The URL returned from a successful request will be sent to the user and the user's browser/device will be redirected to that URL.
If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type
.ErrorResponse
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 1
},
"requestId": "cmVxdWVzdDE",
"requestTimestamp": {
"epochMillis": "1481899949606"
},
"paymentIntegratorAccountId": "InvisiRedirectPaymentUSA_USD"
},
"transactionAmount": {
"amountMicros": "109900000",
"currencyCode": "INR"
},
"transactionDescription": "Play Movies",
"formOfPayment": {
"issuerId": {
"value": "123ABC"
}
},
"callbackUrl": "https://example.google.com/return/url/"
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481899949611"
}
},
"result": {
"success": {
"redirectDetails": {
"getMethod": {
"url": "https://example.com/target/redirect/url/"
}
}
}
}
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-redirect/generateRedirectPaymentUrl
Request body
The request body contains data with the following structure:
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 |
callbackUrl |
REQUIRED: The URL the user should be redirected to when the redirect payment is complete. The URL has a max length of 512 characters. |
Response body
This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse
, consult the ErrorResponse
object and HTTP status codes documentation.
Possible response messages | |
---|---|
HTTP 200 Status |
|
HTTP 4XX / 5XX Status |
|
GenerateRedirectPaymentUrlResponse
Response object for the redirect-fop-v1.generateRedirectPaymentUrl
method.
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result details of the |
GenerateRedirectPaymentUrlResult
Result details of the redirect-fop-v1.generateRedirectPaymentUrl
request.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field result . The result of the generate request. The message specifies if this request was successful or rejected. result can be only one of the following: |
|
success |
The integrator successfully generated a redirect URL. Details about the results are within this message. |
invalidIssuerId |
The [ This should only be used in cases where this form of payment is not valid in the integrator's system. It should not be used to communicate outages or other minor issues with an otherwise valid form of payment. |
cardNotActivated |
The card has not been activated. |
cardNumberInvalid |
The card number is invalid. |
cardExpired |
The card has expired. |
cardExpirationDateInvalid |
The expiration date on the card was invalid. |
cardIssuanceDateInvalid |
The issuance date on the card was invalid. |
cardHolderNameInvalid |
The card holder name on the card was invalid. |
restrictedCard |
The card is restricted from making this type of purchase. |
invalidCardDetails |
This decline code should never be used in steady-state. It is meant as a temporary code to use when the integrator encounters a generic invalid card information decline code from the underlying issuer of the user's instrument. This result code can be used while the integrator determines a more appropriate result code to use or negotiates the addition of a new result code to this specification. Declined because the card details, while formatted correctly, were invalid. (e.g. The card holder name was invalid). |
insufficientFunds |
This account does not have sufficient funds to guarantee this redirect payment. |
notSupportedByIssuer |
The issuer can not support a redirect payment for this request. |
declinedByIssuer |
This decline code should never be used in steady-state. It is meant as a temporary catch-all code to use when the integrator encounters an unknown decline code from the underlying issuer of the user's instrument. This result code can be used while the integrator determines a more appropriate result code to use or negotiates the addition of a new result code to this specification. |
SuccessDetails
The integrator successfully generated a redirect URL. Details about the results are within this message.
JSON representation |
---|
{
"redirectDetails": {
object ( |
Fields | |
---|---|
redirectDetails |
REQUIRED: Details about the redirect parameters to pass on to the user's browser/device. |
RedirectDetails
This contains the result of the redirectUrl
request when it is supported.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field redirect_details . Specifies the type of redirect that will be used. redirect_details can be only one of the following: |
|
getMethod |
The user's browser should be redirected using an HTTPS GET. |
postFormMethod |
The user's browser should be redirected using an HTTPS POST with content time |
GetRequest
This contains details for redirecting the user's browser using an HTTPS GET.
JSON representation |
---|
{ "url": string } |
Fields | |
---|---|
url |
REQUIRED: The URL that the user's browser should be redirected to with a GET request. Should not exceed 2048 characters in length. |
PostFormRequest
This contains details for redirecting the user's browser using an HTTPS POST.
JSON representation |
---|
{ "url": string, "body": [ { object ( |
Fields | |
---|---|
url |
REQUIRED: The url the user will be redirected to. Should not exceed 2048 characters in length. |
body[] |
REQUIRED: Data for the body of the POST for the redirect. This list represents the HTTPS POST body. For example:
Would be formatted as this in the POST body:
. |
bodyEncoding |
REQUIRED: The character set used for the body. UTF-8 is recommended. |
BodyPair
JSON representation |
---|
{ "name": string, "value": string } |
Fields | |
---|---|
name |
REQUIRED: Name of the parameter. |
value |
REQUIRED: Value of the parameter. |
BodyEncoding
Enums | |
---|---|
BODY_ENCODING_UNSPECIFIED |
DO NOT USE |
BODY_ENCODING_ISO_8859_1 |
ISO-8859-1 character set for the POST body |
BODY_ENCODING_UTF_8 |
UTF-8 character set for the POST body |
BODY_ENCODING_US_ASCII |
US-ASCII character set for the POST body |