Summary

This document describes how to integrate the One Inc ClaimsPay JavaScript library into an existing web-based application and invoke the create approval request and check approval request status methods. When these methods are invoked, a modal will open which will allow a user to initiate an approval request to make claim payments for one or more parties and view the status of a previously created approval request respectively.

Requirements

Browsers Compatibility

We support the latest versions of the following browsers and platforms. On Windows, we support Internet Explorer 10+. Support of older versions of Internet Explorer may be available at the time of contract negotiation. More specific support information is provided below.

Chrome Firefox Internet Explorer Safari
Android Supported Supported N/A N/A
iOS Supported N/A N/A Supported
Mac OS X Supported Supported N/A Supported
Windows Supported Supported Supported Not Supported

Embedded Payment Form

Plugin dependencies

jQuery library is required to display the modal. Add a script tag to a web page like the one in the following example:

<script src="https://code.jquery.com/jquery-2.2.1.min.js" type="text/javascript"></script>

Loading plugin

To load the One Inc ClaimsPay JavaScript API, use a script tag like the one in the following example:

<script async defer src="https://stgportalone.processonepayments.com/ClaimsPay/AdjusterModal/Cdn/GetAdjusterModalJs" type="text/javascript"></script>

The URL contained in the script tag is the location of a JavaScript file that loads all of the symbols and definitions you need to use the ClaimsPay™ JavaScript API. The async attribute instructs the browser to render the rest of your website while the ClaimsPay JavaScript API loads. When the API is ready, it will trigger a claimspay.load event as described in the Events section below.

Plugin initialization

For the modal to display on a web page, you must reserve a spot for it. Commonly you do this by creating a named div element and obtaining a reference to this element in the browser's document object model (DOM).

<div id="claimspayContainer"></div>

Getting Session Id

The next thing you should do before initiating your client side invocation is to obtain a Session Id from the ClaimsPay API. This step establishes an additional server to server handshake which significantly increases security of every subsequent operation.

In order to complete your integration you need a ClaimsPay authentication key. This key uniquely identifies you as a customer and it is your responsibility to keep your authentication key secure. To help encourage good security practices, client side requests which would expose the authentication key are not permitted and a server-side request to obtain the Session Id is required. If you do not have your ClaimsPay Authentication Key, please feel free to reach out to us and we can issue one.

GET https://stgportalone.processonepayments.com/ClaimsPay/Api/Session/Create

Get Session Id Request

Parameter Name Description Type Note
ClaimsPayAuthenticationKey Unique Identifier for the modal template. string Required
Request Example:
https://stgportalone.processonepayments.com/ClaimsPay/Api/Session/Create?claimsPayAuthenticationKey=7FD6DECC-A3C3-4D2E-91C4-577A6E3212B6

Get Session Id Response

Field Name Description Type Note
ResponseCode Operation response code string

ResponseCode should be used for programmatic handling of the response.

ResponseMessage Error description string

ResponseMessage is human readable, subject to change and should not be used for programmatic handling of the response.

SessionId Unique Session Id returned from ClaimsPay. Valid for one operation string
Response Example:
{
    "ResponseCode": "Success",
    "SessionId": "5BB90EE4-19A2-43E4-9DCF-835579D3AF7C"
}

Create Approval Request

The ClaimsPay adjuster widget for create approval request provides the ability to create an approval request which will send email(s) to one or more claim parties to capture approvals, collect payment methods, and disburse the claim payment. The email will provide a link to a One Inc hosted web portal, in which the claim party will be authenticated and directed to complete his/her required action as defined by his/her role in the approval request.

  • Upload request data to server

    First you need to upload request data to adjuster modal server. Provided data will be associated with ClaimsPaySessionKey. If uploaded data is not valid appropriate error message will be provided.

    POST https://stgportalone.processonepayments.com/ClaimsPay/AdjusterModal/Operations/LoadRequestData

    LoadRequestDataRequest

    Name Description Type
    ClaimNumber

    Claim number associated with the payment being disbursed.

    string
    ClaimDetails

    Information about the claim that will be displayed to the claim party in the web portal and emails.

    Collection of string
    TotalAmount

    The total payment amount that will be disbursed as part of the current approval request.

    string
    ProcessType

    Specifies the process that the system will follow for the approval request. Allowable values: 1.MultiPartyPayment – system will create an approval request involving multiple parties. Once all claim parties have completed the required actions based upon the role, a payment will be disbursed. 2.SinglePartyPayment – system will create an approval request for a single party. Once the party completes the required action, the system will disburse a payment.

    string
    IsAuthorityHold

    Indicates if the approval request was created with an Authority Hold which requires the approval request to be released prior to initiating the payment process to the approval request parties.

    boolean
    AccountGroupCode

    This field is used to route money from specific customer (carrier) accounts based on predefined associations. If omitted, the default account group configured in your merchant settings will be used.

    string
    ApprovalRequestParties

    Array of ApprovalRequestParty objects for each of the parties that have an interest in the claim. The approval request can have 1-10 parties. At least one party must be a payment recipient. Each party must have a unique AccountId.

    Collection of ApprovalRequestParty
    ExtendedParameters

    The collection of key value pairs for optional parameters.

    Dictionary of string and string
    ClaimsPaySessionKey

    Temporary identifier in a GUID format.

    string

    ApprovalRequestParty

    Name Description Type
    ReferenceId

    An optional external reference identifier to identify the party in the Approval Request Created events.

    string
    AccountId

    ClaimsPay account identifier used to identify a previously saved AccountId and stored wallet.

    integer
    ContactId

    Company Contact identifier. Only applicable to company accounts.

    integer
    ApprovalRole

    The role that defines the actions the claim party will complete as part of the approval request.

    ApprovalRequestPartyRole
    LinkDeliveryType

    The delivery method to receive the link to the ClaimsPay approval portal.

    MessageDeliveryType
    PhoneNumber

    The phone number for the party to which the Approval Request messages will be sent. If DeliveryType is Text and it is not populated, the text will be sent to the phone number associated to the AccountId by default( unless modified by the Adjustor in the Adjustor Modal)

    string
    EmailAddress

    The email address for the party to which the Approval Request emails will be sent. If DeliveryType is Email and it is not populated, the email will be sent to the email address associated to the AccountId by default( unless modified by the Adjustor in the Adjustor Modal)

    string
    PaymentAmount

    The amount of the payment that the party will receive. If role is ApprovalOnly, send 0.00.

    decimal number
    PaymentMethodType

    If the party role is PaymentOnlyActionBypass, the type of payment method that will be used to process the payment.

    PaymentMethodType
    Token

    Token for the bank account or card that will receive the payment for an approval party with the role of PaymentOnlyActionBypass if PaymentMethodType is Bank Account or Card.

    string
    Address

    Address to which a check will be sent if the claim party selects the payment method of check. If the object is not sent and the portal settings allow for check as a payment option, the system will display the address stored for the AccountId or ContactId. Note: the stored primary address will not be updated.

    MailingAddress
    CompanyDetails

    Details on the company and contact for which the ClaimsPay Account will be created or updated. If the AccountId is provided with the request, the system will update the stored companyDetails information. If Contact information is provided without a ContactId, the system will create a new company contact.

    CompanyDetails
    IndividualDetails

    Details on an individual for which the ClaimsPay Account will be created or updated. If the AccountId is provided with the request, the system will update the stored IndividualDetails information.

    IndividualDetails
    ExtendedParameters

    The collection of key value pairs for optional parameters.

    Dictionary of string and string ApprovalRequestPartyExtendedParameters

    CompanyDetails

    NameDescriptionType
    CompanyName

    The name of the company entity.

    string
    TaxId

    The tax ID for the company entity.

    string
    Address

    The physical street address for the company.

    string
    City

    The city for the company.

    string
    State

    The state for the company.

    string
    Zip

    The zip code for the company.

    string
    ContactDetails

    Details of the company contact person to whom the payment method will be associated.

    ContactDetails
    CompanyType

    Type of company: business or vendor

    CompanyType

    ContactDetails

    NameDescriptionType
    ContactId

    The ContactId that is stored in the ClaimsPay system for the company contact. If this value is provided, the system will update the stored information. If the value is not provided the system will create a new account.

    integer
    FirstName

    The first name of the company contact.

    string
    LastName

    The last name of the company contact.

    string
    Email

    The email address for the company contact.

    string
    PhoneNumber

    The phone number for the company contact.

    string
    WebAccess

    Value that will indicate if the contact will have access to the ClaimsCard self-service website. If property is not provided, default value is enable.

    WebAccess

    IndividualDetails

    NameDescriptionType
    FirstName

    The first name of the payee.

    string
    LastName

    The last name of the payee.

    string
    Email

    The email address for the individual payee.

    string
    Address

    The street address for the individual payee.

    string
    City

    The city for the individual payee.

    string
    State

    The state for the individual payee.

    string
    Zip

    The zip code for the individual payee.

    string
    PhoneNumber

    The payee's phone number.

    string

    ApprovalRequestPartyRole

    Possible enumeration values:

    NameValueDescription
    ApprovalOnly

    1

    A claim party that must approve the claim payment but will not receive a payment. The ApprovalOnly role must approve or reject the claim information.

    PaymentOnly

    2

    A claim party that will receive a payment but will not need to approve the claim payment. The PaymentOnly role must specify a payment method which will be used to receive the claim payment funds.

    ApprovalAndPayment

    3

    A claim party that must approve the claim payment and will receive a payment. The ApprovalAndPayment role must approve or reject the claim information and specify a payment method.

    PaymentOnlyActionBypass

    4

    A claim party that will receive a payment and does not need to approve the claim payment. The claim party will not be required to complete any action but the payment information must be included in the request.

    MessageDeliveryType

    Possible enumeration values:

    NameValueDescription
    Email

    1

    The Approval Process link will be sent via email.

    Text

    2

    The Approval Process link will be sent via text message.

    PaymentMethodType

    Possible enumeration values:

    NameValueDescription
    BankAccount

    1

    Bank account payment method.

    Check

    2

    Mail check payment method. Note: to be fulfilled by carrier.

    VirtualCard

    3

    ClaimsCard (virtual prepaid card) payment method.

    PushToCard

    4

    Push to card payment method.

    MailingAddress

    NameDescriptionType
    Address

    The street address.

    string
    City

    The city.

    string
    State

    The state.

    string
    Zip

    The zip code.

    string

    ApprovalRequestPartyExtendedParameters

    Key Description
    VendorServiceDate The date on which the vendor provided services to the claimant. (Applicable to Vendor Payments)
    VendorRefNumber The vendor internal number for the payment request, i.e. invoice, work order number, PO number. Up to 15 characters. (Applicable to Vendor Payments)
    DocumentUrl URL for the support documentation for the claim payment. Up to 250 characters. (Applicable to Vendor Payments)

    CompanyType

    Possible enumeration values:

    NameValueDescription
    Business

    1

    A policyholder or claimant that is a business. Examples: (1) One of your policyholders that has a commercial line policy and filed a claim. (2) One of your policyholders is responsible for damage to a business, which then filed a claim.

    Vendor

    2

    A business that is being paid as a service provider. Examples: a healthcare provider, law office, disaster recovery, autobody shop, etc.

    WebAccessType

    Possible enumeration values:

    NameValueDescription
    Enabled

    0

    Enabled

    Disabled

    1

    Disabled

    Request Formats

    {
    "claimsPayAuthenticationKey": "7FD6DECC-A3C3-4D2E-91C4-577A6E3212B6",
    "claimsPaySessionKey": "d72610dd-4220-40e8-b983-9d2ed19d8a4b",
    "claimNumber": "Claim Number",
    "totalAmount": "200",
    "processType": "MultiPartyPayment",
    "isAuthorityHold": false,
    "accountGroupCode": "",
    "claimDetails": ["Claim Details Line #1"],
    "extendedParameters": {
        "claimantName": "Claimant Name"
    },
    "approvalRequestParties": [{
            "referenceId": "eplbiv066epcfcbfdye135",
            "accountId": "",
            "approvalRole": "PaymentOnly",
            "linkDeliveryType": "Email",
            "paymentAmount": "100",
            "paymentMethodType": "",
            "token": "",
            "extendedParameters": {
                "vendorServiceDate": "9/17/2019",
                "vendorRefNumber": "00295091",
                "documentUrl": "https://documents.hosting.net/main/document.pdf"
            },
            "companyDetails": {
                "companyName": "Company Name",
                "taxId": "123123123",
                "address": "Company Address",
                "city": "Company City",
                "state": "CA",
                "zip": "12345",
                "companyType": "Vendor",
                "contactDetails": {
                    "contactId": "",
                    "firstName": "ContactFirstName",
                    "lastName": "ContactLastName",
                    "email": "[email protected]",
                    "phoneNumber": "1234567890"
                }
            }
        }, {
            "referenceId": "lxiqljfd0ocoryeikyuy",
            "accountId": "",
            "approvalRole": "PaymentOnly",
            "linkDeliveryType": "Email",
            "paymentAmount": "100",
            "paymentMethodType": "",
            "token": "",
            "extendedParameters": {
                "vendorServiceDate": "9/17/2019",
                "vendorRefNumber": "00295091",
                "documentUrl": "https://documents.hosting.net/main/document.pdf"
            },
            "individualDetails": {
                "firstName": "IndividualFirstName",
                "lastName": "IndividualLastName",
                "email": "[email protected]",
                "address": "Individual Address",
                "city": "Individual City",
                "state": "CA",
                "zip": "12345",
                "phoneNumber": "1234567890"
            }
        }
    ]
    }
    

    Response Information

    LoadRequestDataResponse

    NameDescriptionTypeAdditional information
    ResponseCode

    Operation response code.

    string

    ResponseCode should be used for programmatic handling of the response.

    ResponseMessage

    Response message.

    string

    ResponseMessage is human readable, subject to change and should not be used for programmatic handling of the response.

    Response Formats

    {
      "ResponseCode": "sample string 1",
      "ResponseMessage": "sample string 2"
    }
    <LoadRequestDataResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OneInc.PortalOne.ClaimsPay.Areas.AdjusterModal.Models.Contracts">
      <ResponseCode xmlns="http://schemas.datacontract.org/2004/07/OneInc.PortalOne.ClaimsPay.Areas.AdjusterModal.Models">sample string 1</ResponseCode>
      <ResponseMessage xmlns="http://schemas.datacontract.org/2004/07/OneInc.PortalOne.ClaimsPay.Areas.AdjusterModal.Models">sample string 2</ResponseMessage>
    </LoadRequestDataResponse>
  • Create Request

    The following example demonstrates how to start approval request creation using HTML data attributes:

    <button type="button"
        data-toggle="claimspay"
        data-method="createApprovalRequest"
        data-option-claims-pay-session-key="Your Session Id From Previous Step">Create Approval Request</button>
    

    You can also invoke the functions in the library directly by writing JavaScript. The following example calls the same function as the example above. Important Note: In order to get request results, you must wire up to the events exposed by the library.

    
    var claimspayContainer = $('#claimspayContainer');
    var claimsPayData = claimspayContainer.claimspay().data('claimspay');
    claimsPayData.createApprovalRequest({claimsPaySessionKey: 'Your Session Id From Previous Step'});
    

Manage Approval Request

The ClaimsPay Adjuster Manage Approval Request Widget provides the ability to manage existing approval request: view approval request and party status’, cancel the request, and resend emails

Manage Approval Request

The following example demonstrates how to start approval request creation using HTML data attributes:

<button type="button"
    data-toggle="claimspay"
    data-method="manageApprovalRequest"
    data-option-claims-pay-session-key="Your Session Id From Previous Step"
    data-option-approval-request-id="request Id">Manage Approval Request</button>

You can also invoke the functions in the library directly by writing JavaScript. The following example calls the same function as the example above. Important Note: In order to get request results, you must wire up to the events exposed by the library.


var claimspayContainer = $('#claimspayContainer');
var claimsPayData = claimspayContainer.claimspay().data('claimspay');
claimsPayData.manageApprovalRequest({claimsPaySessionKey: 'Your Session Id From Previous Step', approvalRequestId: 'request Id'});

Events

The ClaimsPay provides custom events for most plugins’ unique actions. You can attach and detach event handler functions using standard JavaScript API. The ClaimsPay library declares the following events:

  • Modal Load Event

    Code: claimspay.load
    Occurs when modal dialog is loaded.
    Example:
    $('#claimspayContainer')
        .on('claimspay.load', function() {
            console.log(new Date() + ' claimspay.load');
        });
  • Modal Unload Event

    Code: claimspay.unload
    Occurs when modal dialog is unloaded.

    Example:
    $('#claimspayContainer')
        .on('claimspay.unload', function() {
            console.log(new Date() + ' claimspay.unload');
        });
    
  • Modal Error Event

    Code: claimspay.error
    Occurs on errors.
    Example:
    $('#claimspayContainer')
        .on('claimspay.error', function (e, data) {
            console.error(new Date() + ' claimspay.error.', data.description, data.details);
        });
    

    Event Object Parameter

    Field Name Description Type
    description Error description string
    details Collection of error messages Array of Array of string
    Event Object Example:
    {
        "description": "Create of Approval Request was finished with an error.",
        "details": "Invalid session id"
    }
  • Approval Request Created Event

    Code: claimspay.approvalRequestCreated
    Occurs when approval request is successfully created.
    Example:
    $('#claimspayContainer')
        .on('claimspay.approvalRequestCreated', function(e, data) {
            console.info(
                new Date() + ' claimspay.approvalRequestCreated. Request data is ',
                data
            );
        });
    

    Event Object Parameter

    Field Name Description Type
    approvalRequestId Identifier of created approval request. integer
    creationDate Date the approval request was created. date
    expirationDate Date the approval request will expire. date
    timeZone Approval request time zone. string
    processType The process type for the approval request. string
    isAuthorityHold Indicates if the approval request was created with an Authority Hold which requires the approval request to be released prior to initiating the payment process to the approval request parties. boolean
    accountGroupCode The account group code of created approval request. string
    status The status of the approval request process. ApprovalRequestStatus
    approvalRequestParties The collection of all of the parties included in the approval request. CreatedApprovalRequestParty

    CreatedApprovalRequestParty

    Field Name Description Type
    approvalRequestPartyId Identifier of created party. integer
    referenceId External Reference Id provided with upload request. string
    account Account Information. AccountInformation

    AccountInformation

    Field Name Description Type
    accountId ClaimsPay account Identifier. integer
    contact Contact information. ContactInformation
    operation Data Modification Operation. ModalEntityState

    ContactInformation

    Field Name Description Type
    contactId Identifier of ClaimsPay contact. integer
    operation Data Modification Operation. ModalEntityState

    ApprovalRequestStatus

    Possible enumeration values:

    Name Value Description
    Initiated

    Initiated

    The approval process has been initiated.

    Expired

    Expired

    At least one of the approval request parties did not complete their required action prior to the Expiration Date and no payments were processed as part of the approval request.

    Rejected

    Rejected

    The claim payment was rejected by one of the approval request parties.

    Cancelled

    Cancelled

    The approval request has been canceled.

    Completed

    Completed

    The approval process has been completed (all approval parties completed their actions and if ProcessPayment = true, payments were processed).

    Incomplete

    Incomplete

    At least one of the approval request payment recipients did not complete their required action prior to the Expiration Date, and at least one payment recipient's payment was processed. Applies to two-step sequence for sending approval request welcome communications.

    AuthorityHold

    AuthorityHold

    Approval process is on hold and party actions have not yet been initiated.

    ModalEntityState

    Possible enumeration values:

    Name Value Description
    Unchanged

    0

    The AccountId or ContactId information was not changed.

    Created

    1

    An AccountId or ContactId was created based upon the request information.

    Updated

    2

    The stored AccountId or ContactId information was updated based upon the request information.

    Create Approval Request Object Example:
    {
        "approvalRequestId": 21,
        "creationDate": "2019-09-23T01:43:51.757099",
        "expirationDate": "2019-09-30T01:43:51.757099",
        "timeZone": "PDT",
        "processType": "MultiPartyPayment",
        "accountGroupCode": null,
        "status": "Initiated",
        "approvalRequestParties": [
          {
            "approvalRequestPartyId": 41,
            "referenceId": "eplbiv066epcfcbfdye135",
            "account": {
              "accountId": 45,
              "operation": "Created",
              "contact": {
                "contactId": 23,
                "operation": "Created"
              }
            }
          },
          {
            "approvalRequestPartyId": 42,
            "referenceId": "lxiqljfd0ocoryeikyuy",
            "account": {
              "accountId": 46,
              "operation": "Created",
              "contact": null
            }
          }
        ]
      }
    }
    
  • Approval Request Canceled Event

    Code: claimspay.approvalRequestCanceled
    Occurs when approval request is canceled.
    Example:
    $('#claimspayContainer')
        .on('claimspay.approvalRequestCanceled', function(e, data) {
            console.info(new Date() + ' claimspay.approvalRequestCanceled', data);
        });
    

    Event Object Parameter

    Field Name Description Type
    approvalRequestId Identifier of created request. integer
    Canceled Approval Request Object Example:
    {
        "approvalRequestId": 21
    }
    
  • Involved Party Text Sent Event

    Code: claimspay.involvedPartyTextSent
    Occurs when welcome communication message was resent to party.
    Example:
    $('#claimspayContainer')
        .on('claimspay.involvedPartyTextSent', function() {
            console.log(new Date() + ' claimspay.involvedPartyTextSent');
        });
    
  • Involved Party Email Sent Event

    Code: claimspay.involvedPartyEmailSent
    Occurs when welcome communication email was resent to party.
    Example:
    $('#claimspayContainer')
        .on('claimspay.involvedPartyEmailSent', function() {
            console.log(new Date() + ' claimspay.involvedPartyEmailSent');
        });