Create Session for New Patron
POST/api/patronsession/new
In order to complete a transaction using the VIP Connect SDK an operator must create a session for the end user to use with a valid session ID.
Notes:
- The API Specification section describes the different /api/patronsession calls available.
- The web component will immediately display a loading modal dialog while the backend-to-backend session creation calls are occurring. The modal dialog will then display the VIP user interface after a valid session ID has been returned to the web component.
API Specification
The following APIs are available to authenticated operators to create sessions for end users that do or do not have an existing VIP account.
There is an API specific to new users that need to enroll in VIP Preferred or VIP Online as well as an API that serves already enrolled users. The Account Inquiry API is used to check if a user already has an existing account.
Once you obtain a VIP Preferred Card Number from Pavilion Payments, it's best practice to retain this number and use it for all transactions using the existing patron API.
For end users that do not have an existing VIP account, submit the end user’s information to open a session.
The ID information provided in the patron session will be used to check for an existing VIP account. If a VIP account is found the PII data will be discarded, otherwise the data will be used for enrollment in VIP. End users will need to complete enrollment before continuing to complete a deposit or withdraw.
Example Scenario:
- Operator makes an authenticated call to VIP Connect API.
- VIP Connect API will validate and create a new session.
- Session ID and other properties (refer) are returned as response to the operator.
- Operator uses the session ID to invoke web component
Request
Responses
- 200
- 400
Returns session details.
Example Success Response:
{
"patronId": "309345c8-3724-481a-9cb4-ea0b8a670fdf",
"sessionId": "78c18d5a-0476-46e3-839a-32a28949ec03",
"expires": "2024-04-26T17:15:04.7345433+00:00",
"enrollmentStatus": "none",
"operatorName": "Operator - 1",
"depositLimit": 1000.0,
"minDeposit": 10.00,
"withdrawLimit": 1000.0,
"minWithdraw": 1.00,
"transactionId": "tranid2345",
"transactionAmount": 10.33,
"returnUrl": "https://www.onlinebettingportal.com/success",
"patronProductType": "Online",
"oneClickDiscountApplied": false,
"cancelRedirectUrl": "https://www.onlinebettingportal.com/cancel"
}
Example Response With Error Details:
{
"patronId": "309345c8-3724-481a-9cb4-ea0b8a670fdf",
"sessionId": "78c18d5a-0476-46e3-839a-32a28949ec03",
"expires": "2024-04-26T17:15:04.7345433+00:00",
"enrollmentStatus": "none",
"operatorName": "Operator - 1",
"depositLimit": 1000.0,
"minDeposit": 10.00,
"withdrawLimit": 1000.0,
"minWithdraw": 1.00,
"transactionId": "tranid2345",
"transactionAmount": 10.33,
"returnUrl": "https://www.onlinebettingportal.com/success",
"patronProductType": "Online",
"oneClickDiscountApplied": false,
"cancelRedirectUrl": "https://www.onlinebettingportal.com/cancel",
"errorModel": {
"errorCode": "99",
"transactionStage": "VIP Account Inquiry",
"operatorErrorMessage": "Invalid Account.",
"operatorDeclineDescription": "This transaction has been requested from an account that has been closed. For further assistance please contact Pavilion Gaming Services customer support at 1-800-500-1973 with reference code E-99.",
"patronErrorMessage": "Sorry, unable to complete this request. Please contact CAMS at 1-800-500-1973 for support using error code E-99."
}
}
API received the request but validation errors occurred
Example Response
{
"errorCode": "400",
"operatorErrorMessage": "Validation failed: LastName: 'Last Name' must not be empty.; FirstName: 'First Name' must not be empty.",
"patronErrorMessage": "Invalid request data. Please check your input and try again."
}