Create Patron Session
In order to complete a transaction using the VIP Connect 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.
POST /api/patronsession/new
For end users that do not have an existing VIP account, submit the end user’s information to open a session.
The ID information 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 Request:
{
"patronId": "309345c8-3724-481a-9cb4-ea0b8a670fde",
"firstName": "hello",
"middleInitial": "M",
"lastName": "frd",
"dateOfBirth": "07/03/1964",
"email": "8zN2Emyp@5JP6oEaZ.com",
"mobilePhone": "8434811326",
"streetName": "28 NQqodHNdv",
"city": "prZYfAYqa",
"state": "TN",
"zip": "282926017",
"country": "USA",
"idType": "SS",
"idNumber": "111223333",
"routingNumber": "",
"accountNumber": "",
"walletBalance": "1000",
"remainingDailyDeposit": "1000",
"transactionId": "tranid2345",
"transactionAmount": 10.33,
"returnUrl":"https://www.onlinebettingportal.com/success",
"productType":"preferred",
"androidPackageName":"com.pavilionpay.igaming",
"ssn":"111223333",
"oneClickDiscountApplied":true,
"cancelRedirectUrl": "https://www.onlinebettingportal.com/cancel"
}
Parameters List
Parameter Name | Description | Required | Type | Example | Length |
---|---|---|---|---|---|
patronId | Unique ID to identify end user (generated on operator site) | Yes | String | 309345c8-3724-481a-9cb4-ea0b8a670fde | 8 - 36 |
firstName | End user first name | Yes | String | John | 20 max |
middleInitial | End user middle initial (if exists) | No | String | K | 20 max |
lastName | End user last name | Yes | String | Smith | 20 max |
dateOfBirth | End user's date of birth | Yes | DateTime (mm/dd/yyyy) | 07/03/1964 | 10 |
End user's email address | Yes | String | john@smith.com | 40 max | |
mobilePhone | End user's mobile phone number | Yes | String | 9724587854 | 10 - 15 |
streetName | End user's street address | Yes | String | 15th Ave | 30 max |
city | End user's city name | Yes | String | Plano | 32 max |
state | End user's state | Yes | String | TX | 2 |
zip | End user's zip code | Yes | String | 75024 | 5 or 9 |
country | End user's country name | Yes | String | USA | 32 max |
idType | Identification number type | Yes, if SSN is not provided | String | SS | 2 |
idNumber | Identification number | Yes, if SSN is not provided | String | 111223333 | 6 - 30 |
accountNumber | End user selected bank account number | No | String | 457852155 | 4 - 17 |
routingNumber | Routing number for bank selected | No | String | 4578521559 | 8 or 9 |
remainingDailyDeposit | REFER below | No | Decimal | 25.00 | 9 max |
walletBalance | REFER below | No | Decimal | 999.99 | 9 max |
transactionId* | Unique ID to identify deposit/withdraw request | Yes | Alphanumeric text | vip12345Id | 8 - 36 |
transactionAmount | Transaction amount to deposit/withdraw | No | Decimal | 10.33 | 9 max |
transactionType | End user selected Transaction Flow (Deposit or Withdraw) | Yes | Enum Value | "deposit"(or 0), "withdraw"(or 1) | 8 max |
returnUrl | An Optional value to navigate back to Operator provided URL after successful transaction. This would override the value set in the Operator data. | No | String | https://www.onlinebettingportal.com/success | 256 max |
cancelRedirectUrl | An Optional value to navigate back to Operator provided URL after the patron cancels the transaction. | No | String | https://www.onlinebettingportal.com/cancel | 256 max |
productType | VIP product type (VIP Preferred or VIP Online) | No | String | preferred | 10 max |
androidPackageName | Android package to return control to | No | String | com.pavilionpay.igaming | 256 max |
ssn | End user's social security number | Yes, if idType and idNumber are not provided | String | 111223333 | 9 |
oneClickDiscountApplied | Discount on transaction enabled for operator (eligibility determined by oneClickDiscountEligible from Account Inquiry response) | No | Boolean | false | 5 |
transactionId is assigned by the Operator. Max Length: 25 characters, Min Length: 8 characters productType is a future feature and is optional at this time. If not provided it will default to preferred.
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",
"transactionSucceeded": false,
"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 Error Response:
If an error occurs, an error model will be included in the response as shown below. If an error is returned then the operatorDeclineDescription should be shown to the user and the VIP Connect should NOT be loaded.
See Error Responses page for list of all possible errors.
{
"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",
"transactionSucceeded": false,
"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."
}
}
POST /api/patronsession/existing
For end users that do have an existing VIP account, submit the end user’s VIP card number to avoid having to send sensitive PII. An end user’s date of birth will be used to validate the cardholder. All fields are required.
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
Example Request
{
"patronId": "309345c8-3724-481a-9cb4-ea0b8a670fde",
"vipCardNumber": "7210536159",
"dateOfBirth": "07/03/1964",
"remainingDailyDeposit": 25.00,
"walletBalance": 1000.23,
"transactionId": "tranid1099",
"transactionAmount": 10.33,
"transactionType": 0,
"returnUrl":"https://www.onlinebettingportal.com/success",
"productType":"preferred",
"androidPackageName":"com.pavilionpay.igaming",
"oneClickDiscountApplied":false,
"cancelRedirectUrl": "https://www.onlinebettingportal.com/cancel"
}
Parameters List
Parameter Name | Description | Required | Type | Example | Length |
---|---|---|---|---|---|
patronId | Unique ID to identify end user (generated on operator site) | Yes | String | 309345c8-3724-481a-9cb4-ea0b8a670fde | 8 - 36 |
vipCardNumber | VIP account number | Yes | String | 7210536159 | 10 |
dateOfBirth | End user's date of birth | Yes | DateTime (mm/dd/yyyy) | 07/03/1964 | 10 |
remainingDailyDeposit | REFER | No | Decimal | 25.00 | 9 max |
walletBalance | REFER | No | Decimal | 999.99 | 9 max |
transactionId* | Unique ID to identify deposit/withdraw request | Yes | Alphanumeric text | vip12345Id | 8 - 36 |
transactionAmount | Transaction amount to deposit/withdraw | Yes | Decimal | 10.33 | 9 max |
transactionType | End user selected Transaction Flow (Deposit or Withdraw) | Yes | Enum Value | "deposit"(or 0), "withdraw"(or 1) | 8 max |
returnUrl | An Optional value to navigate back to Operator provided URL after successful transaction. This would override the value set in the Operator data. | No | String | https://www.onlinebettingportal.com/success | 256 max |
cancelRedirectUrl | An Optional value to navigate back to Operator provided URL after the patron cancels the transaction. | No | String | https://www.onlinebettingportal.com/cancel | 256 max |
productType | VIP product type (VIP Preferred or VIP Online) | No | String | preferred | 10 max |
androidPackageName | Android package to return control to | No | String | com.pavilionpay.igaming | 256 max |
oneClickDiscountApplied | Discount enabled for end user (eligibility determined by oneClickDiscountEligible from Account Inquiry response) | No | Boolean | false | 5 |
transactionId is assigned by the Operator. Max Length: 25 characters, Min Length: 8 characters productType is a future feature and is optional at this time. If not provided it will default to preferred.
Response
Status | Description |
---|---|
200 OK | Returns Session Details |
This API will return HTTP 400 if the VIP account does not exist; if this occurs the operator should use the /new api instead.
Example Success Response:
Use the SessionId data to render the
{
"patronId": "0ef56720-47b6-46bc-9a3a-b81bd511d10a",
"sessionId": "73a747bb-4d3c-4776-af73-945f8fdeaef8",
"expires": "2024-04-26T17:20:31.6361748+00:00",
"enrollmentStatus": "complete",
"vipCardNumber": "7210536159",
"operatorName": "Operator - 1",
"transactionSucceeded": false,
"depositLimit": 999.99,
"minDeposit": 10.00,
"withdrawLimit": 1000.0,
"minWithdraw": 1.00,
"transactionId": "tranid1099",
"transactionAmount": 10.33,
"returnUrl": "https://www.onlinebettingportal.com/success",
"patronProductType": "Preferred",
"oneClickDiscountApplied": false,
"cancelRedirectUrl": "https://www.onlinebettingportal.com/cancel"
}
Example Error Response:
If an error occurs, an error model will be included in the response as shown below. If an error is returned then the operatorDeclineDescription should be shown to the user and the VIP Connect should NOT be loaded.
See Error Responses page for list of all possible errors.
{
"patronId": "0ef56720-47b6-46bc-9a3a-b81bd511d10a",
"sessionId": "00000000-0000-0000-0000-000000000000",
"expires": "2024-04-26T15:18:30.8687626+00:00",
"enrollmentStatus": "none",
"operatorName": "Operator - 1",
"transactionSucceeded": false,
"depositLimit": 999.99,
"minDeposit": 10.00,
"withdrawLimit": 1000.0,
"minWithdraw": 1.00,
"transactionId": "tranid1099",
"transactionAmount": 10.33,
"returnUrl": "https://www.onlinebettingportal.com/success",
"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."
}
}
RemainingDailyDeposit
Operators should specify RemainingDailyDeposit value if they institute daily deposit limits for end users. The remaining daily deposit should be recalculated before each session is created to account for any deposits made earlier in the day.
WalletBalance
WalletBalance is the end user’s current balance on the operator site. If provided, the end user will not be allowed to withdraw more than this balance. Negative balances will prevent withdrawal.