Login As a Guest And Redirect

Description

The loginAsGuestRoleThirdpartyAndRedirect endpoint is used to login as a guest and redirect the user to the make a payment page.

Request

Endpoint

/v2/loginAsGuestRoleThirdpartyAndRedirect

Method

GET

Attributes

ELEMENT DESCRIPTION FORMAT FIELD CONSTRAINTS
merchantCode Required

The unique code used for the respective merchant.
e.g., VELA
returnURL Required

The Return URL must be in Base64 Encoded to accommodate '+', '/' and '=' characters into special percent-encoded hexadecimal sequences.

Upon successful completion, the user will be redirected to this URL with a payment response.

Upon failure, the user will be redirected to the Originated page.
e.g., http://whatever.xyzcompany.com/return?invoiceId=AB-123-X-12345&subscriptionId=1248abc&cardNetworkName&cardExpiry&status=OK&signature=4d30141ab0a7416c308b62d56e52dfeaf25b7
684cedf9e11082ac6bdbf84ee98

The Signature will include the Merchant Secret Key + Invoice Number + Subscription Id + Card Network Name + Card Expiry + Response Status + Error Code with a semicolon(;) as a delimiter.

The value of status is 'OK' for approved transactions and 'KO' for declined/failed transactions.

errorCode: If the status’ is 'KO', include the reason for the failure. e.g., 'E452'

Signature = sha-256(Merchant's Secret Key + ';' + invoiceNumber + ';' + subscriptionId + ';' + status + ';' + errorCode)
invoiceNumber Required

Invoice number related to the payment.
e.g., 123456 Invoice Number should be at least 2 characters long and cannot exceed 30 characters

Cannot accept special characters except '-' and '_'
bookingNumber Required

Booking or Transaction number related to the payment.
e.g., 123456 Field length depends upon merchant level configuration.

Cannot accept special characters.
membershipNumber Optional

membership number related to the payment.
e.g., 123456 Membership Number can only contain digits and should be at least one digit long and cannot exceed 11 digits.
checkInDate Required

Check-in Date for which the payment is being initiated.

The Date Format depends on the Merchant settings.
e.g., yyyy-MM-dd

2022-05-06
Should be greater than the Current Date and less than Check-out Date.
checkOutDate Required

Check-Out Date for which the payment is being initiated.

The Date Format depends on the Merchant settings.
e.g., yyyy-MM-dd

2022-05-07
Should be greater than Check-in Date.
firstName Required

First Name of the user related to the payment.
e.g., John Accent Characters are not allowed.
lastName Required

Last Name of the user related to the payment.
e.g., Smith Accent Characters are not allowed.
nameOnCard Required

Cardholder name related to the payment.
e.g., John Smith Accent Characters are not allowed.
emailAddress Optional

Email Address of the user to which the Payment details are to be sent.
e.g., john.smith@xyz.com
callingCode Optional

Calling Code of the Country.
e.g., +1
mobileNumber Optional

Mobile Number to which the payment details have to be sent.
e.g., 1234567890 Mobile # must be at least 9 digits long.

No other characters are allowed including spaces and hyphens except digits.
addressLine1 Optional

Address that is related to the card used.

when the selected country is NOT Brazil
e.g., 1234 ABC Road Must be at least 5 characters long and cannot exceed 40 characters.
addressLine2 Optional

Address that is related to the card used.
e.g., Suite 123 Cannot exceed 40 characters.
addressLine3 Optional

Address that is related to the card used.
e.g., Near XXXX Cannot exceed 40 characters.
streetName Optional

Address that is related to the card used.

when the selected country is Brazil
e.g., Near XXXX Cannot exceed 40 characters.
streetNumber Optional

Address that is related to the card used.

when the selected country is Brazil
e.g., Near 1234

Cannot exceed 10 characters.
city Optional

City.
e.g., ABC City Must be at least 2 characters long and cannot exceed 35 characters.
state Optional

State to which the card belongs to.
e.g., GA Two character Standard ISO State Code
zipCode Optional

Zip or Postal Code.
e.g., 12345 ZIP/Postal Code must be at least 2 characters long and cannot exceed 10 characters.
country Optional

Country.
e.g., USA Three character Standard ISO Country Code
locale Optional

Language.
e.g., en_US

Other supported locale's are fr_CA, pt_BR, and es_MX.
paymentAction Required

Possible values: SALE, PRE_AUTHORIZATION, ZERO_DOLLAR_AUTH
e.g., SALE, PRE_AUTHORIZATION, ZERO_DOLLAR_AUTH
amount Required

Transaction Amounts
e.g., 100.00 Commas are allowed while entering the value.
currency Required

Currency used for the payment
e.g., USD Three character Standard ISO Currency Code
environment Required

The environment in which the redirection occurs
e.g., TEST, UAT, STAGING, PERF or PROD
signature Required

The Signature will include the VELA Secret Key + Booking Number + Invoice Number with a semicolon(;) as a delimiter.
Test Environment: Value is iVGZoMkXRi7tG7JB
NOTE: For Merchant Specific Secret Key or Custom Secret Key, please contact vela@datumtg.com.
Production Environment: To Obtain the Production VELA Secret Key, please contact vela@datumtg.com
NOTE: If the Signature fails the user will be redirected to the BASE_URL.

Given all the details as above, the request Endpoint would appear as follows:

<BASE_URL>/ui/v2/loginAsGuestRoleThirdpartyAndRedirect?merchantCode=VELA&currencyCode=USD&bookingNumber=123456&invoiceNumber=123456&paymentAction=SALE&amount=100.00&checkInDate=2022-05-11&checkOutdate=2022-0512&firstName=John&lastName=Smith&nameOnCard=JohnSmith&EmailAddress=john.smith@xyz.com&callingCode=1&mobileNumber=1111111111&addressLine1=123ABCRoad&addressLine2=Suite350&addressLine3=VELA&city=ABC&state=GA&zipCode=12345&country=USA&locale=en_US&returnURL=/confirmation&environment=TEST&signature=dfa7df0e1d1862d02ab9e4402a822d0b97f5be505a4f9c1a34539eac346b614805a4f9c1a34539eac346b6148

Note

BASE_URL is derived from the merchant code.
For Test Environment, the BASE_URL will be "https://vela.datumsoftware.com"
For Production Environment, to Obtain the BASE_URL, please contact vela@datumtg.com.

Response

"The User will be redirected to the Make a payment page of the respective merchant."

In some cases if the user is not ACTIVE or if any attribute is Invalid, the API request returns with the following error code(s) and message(s) instead of redirecting the user to the Make A Payment page.

DESCRIPTION ERROR CODE ERROR MESSAGE
If the user Status is not ACTIVE -1 UNAUTHORIZED
If the user is not assoicated with a Channel containing Payment methods -2 MISCONFIGURATION
If under the user's Billing Information State Code is not valid

State Code is not valid

ex: GAA instead of GA
-3 INVALID_ISO_STATE_CODE
If under the user's Billing Information Country code is not valid

Country Code is not valid

ex: USAD instead of USA
-4 INVALID_ISO_COUNTRY_CODE
If the Signature is invalid -5 SIGNATURE_INVALID
If the Signature is Empty -6 SIGNATURE_EMPTY

With one of the error code as above, the response would appear as follows:

<BASE_URL>/ui/v2//thirdpartyapp/resources/test?status=KO&errorCode=-4&errorMsg=INVALID_ISO_COUNTRY_CODE

Updated As Of Version 6.0.0.0