Skip to main content

AndDone JS

Embedded Premium Finance (EPF)

The Embedded Premium Finance solution enables agents to display IPFS Premium Finance quoting in the AndDoneJS payment widget. The customer is able to choose between a pay-in-full option and financing their premium through IPFS.

The Embedded Premium Finance solution enables agents to display IPFS Premium Finance quoting in the AndDoneJS payment widget. The customer is able to choose between a pay-in-full option and financing their premium through IPFS.

The Embedded Premium Finance payment flow comprises the following steps:

  1. A customer elects to purchase an insurance policy at a dollar amount quoted by the merchant.
  2. The merchant application submits a payment intent request using the collected customer information, accepted payment types (Credit, Debit, and/or ACH) and the total premium amount.
  3. The AndDone server generates the payment intent and sends back a paymentToken to the merchant server.
  4. The merchant server uses the paymentToken to call the POST Generate Quote method. This method generates an IPFS financing quote based on the provided premium amount, customer information, and merchant information.
  5. The POST Generate Quote method returns a batchId which associates the IPFS financing quote with the original payment intent. This batchId is used in place of the original payment token to initialize AndDoneJS.
  6. AndDoneJS displays the IPFS premium financing quote to the customer beside the pay-in-full option.
  7. If the customer selects the IPFS premium financing option, they will make the initial down payment through AndDoneJS.
  8. AndDoneJS securely transmits the payment request from the customer's browser to the AndDone server.
  9. The AndDone server completes the authorization and payment process, providing transaction status, and the details of the IPFS agreement to the merchant server via webhook.

Prerequisites

This section covers the prerequisites that must be met to enable Embedded Premium Finance.

Enable Supporting Functionality

The merchant must have the following AndDone functionalities enabled in the Merchant Portal:

  • AndDoneJS
  • Embedded Premium Finance
  • IPFS Payments - Enables direct routing of the down payment to IPFS
  • Split Payments

Set Technology and Processing Fees

The AndDone Technology Fee must be set to an amount equal to or greater than the processing fee.

Merchant Setup with IPFS

The merchant must have an IPFS Account with a UserID and Web Access Code. AndDone will require the BranchID and PLUSID.

The agent should have one or more programs set up with IPFS. The corresponding Program ID, provided by IPFS, is required to generate a quote.

Embedded Premium Finance Transaction Process

Completing a Transaction with Embedded Premium Finance involves three steps:

  • Create a Payment Intent
  • Generate an IPFS premium finance quote
  • Initialize AndDoneJS

Create a Payment Intent

The embedded premium finance process is initiated by creating a payment intent request. Set the enablePremiumFinance parameter to true. Set the amount to the total premium amount to be collected if the customer elects to pay-in-full.

Example: POST Create Payment Intent request body

    
{
	"saveForFuture": false,
	"title": "Pmt-12345653421",
	"AccountNumber": "ACH-001",
	"shortDescription": "Premium payment",
	"enablePremiumFinance": true,
	"paymentDescription": "Commercial property insurance premium payment.",
	"invoiceNumber": "EPF_single",
	"expiresIn": "30000000",
	"intent": {
		"paymentTypes": [
						 "ACH",
						 "CreditCard",
 						 "DebitCard"
						]
		},
	"amount": 1000.00,
	"splits": null
}
    

The POST Create Payment Intent method response returns a paymentToken. The paymentToken is used in the next step to generate an IPFS premium finance quote.

Example: POST Create Payment Intent response

    
{
    "splits": null,
    "saveForFuture": false,
    "quoteKey": null,
    "accountNumber": "ACH-001",
    "enablePremiumFinance": true,
    "paymentToken": "RdQRzB4v",
    "title": "Title_Shirt_455",
    "amount": 1000.0,
    "invoiceNumber": "EPF_single",
    "expireOn": "07-28-2024 21:35:50",
    "shortDescription": "short_Description",
    "paymentDescription": "payment_Description",
    "intent": {
        "paymentTypes": [
            			"ACH",
            			"CreditCard",
            			"DebitCard"
        				]
    }
}
    

Generate an IPFS Premium Finance Quote

Next, the POST Generate Quote method is called to generate an IPFS Premium Finance Quote and associate it with the payment intent. The paymentToken returned by the payment intent request is passed in the PaymentIntentId parameter. This method requires information about the Insured, Agency, and Policy that is used by IPFS to provide an appropriate premium finance quote. See POST Generate Quote for information about the request parameters.

You must also provide the ID(s) of the IPFS Programs (ProgramIds) that will be used to generate the quote. To automate the EPF process, it is essential to have a system design in place that can determine the appropriate program to use for a specific insured or policy. AndDone does not provide the logic for selecting the optimal program and will generate a quote against the program ID that is specified in the POST Generate Quote request.

Example: POST Generate Quote request body

    
{
"PaymentIntentId": "RdQRzB4v",
"Details": {
	"CouponInvoicePrinted": null,
	"Installments": null,
	"ProgramIds":[82262],
	"BatchId": "Batch-001",
	"Commercial": null,
	"Coupon": null,
	"Interval": null,
	"DownPaymentMethod": null,
	"DownPaymentPaidBy": "Insured"
	},
"Insured": {
	"AgentCustomerNumber": "CST543212345",
	"Email": "[email protected]",
	"CareOf": "",
	"Address": {
		"Name": "Sam Fischer",
		"Address1": "1055 Broadway",
		"Address2": "",
		"City": "Kansas City",
		"State": "MO",
		"Zip": "64105",
		"Phone": ""
	}
},
"Agent": {
	"UniqueId": "000000",// Merchant Id
	"Email": "[email protected]",
	"Address": {
		"Name": "Mayur Said",
		"Address1": "PO Box 486",
		"Address2": "",
		"City": "Kansas City",
		"State": "MO",
		"Zip": "64105",
		"Phone": ""
	}
},
"Policies": [
	{
	"PolicyId": 2,
	"Premium": 1200.0,
	"Fee": null,
	"Tax": null,
	"Coverage": "FIRE",
	"EffectiveDate": "2023-04-16T00:00:00",
	"ExpirationDate": "2024-11-14T00:00:00",
	"Term": 8,
	"MinimumEarned": null,
	"MinimumLiability": null,
	"MaximumLiability": null,
	"InvoiceNumber": null,
	"PolicyFees": null,
	"Company": {
		"BestNumber": "",
		"Name": "IPFS",
		"Address1": "",
		"Address2": "",
		"City": "",
		"State": "",
		"Zip": "",
		"Phone": ""
	}
}
]
}
    

A successful quote request returns a batchID which will be used in place of the original paymentToken in the next step to initialize the AndDoneJS payment widget. It also returns detailed information about the generated quote, including the down payment amount, amount to be financed, finance charge and the amount of each installment.

Example: POST Generate Quote response

    
[
    {
        "integrationID": "dd5709c0-4829-4c31-81c0-3fd7ce9a552e",
        "isSuccess": true,
        "message": "Sucess",
        "item": {
            "errors": null,
            "pfa": null,
            "electronicSignatureURL": "https://app-stage.ipfs.com/Private/Quoting/ViewPFA.aspx?QuoteID%3d5e59bac7-9330-4ec6-8cbd-58b8c7becf19%26SessionID%3d5984a9b5-a0eb-4869-a5db-e07996536b26%26BranchID%3d3%26EntityType%3d1%26EntityID%3d1603078",
            "quoteKey": 23734513,
            "premium": 1000.0,
            "downAmount": 150.0,
            "amountFinanced": 850.0,
            "financeCharge": 52.3,
            "totalPayments": 902.3,
            "paymentAmount": 90.23,
            "docStamp": 0.0,
            "firstDueDate": "2023-08-25T00:00:00",
            "apr": 0.132,
            "installments": 10,
            "batchId": "RdQRzB4v",
            "paymentsRetained": 0,
            "paymentRetainedAmount": 0.0,
            "retailAgentRegisterLoginURL": "",
            "eSignResult": {
                "processed": false,
                "message": null,
                "batchId": null,
                "agentUrl": null,
                "insuredUrl": null,
                "eSignOption": 0
            },
            "unsignedPFAUrl": "https://v1-252010964968-pfastore.s3.amazonaws.com/UnsignedPFA/23734513_unsigned?AWSAccessKeyId=ASIATVLIGE7UOOJ7FJ6M..."
        }
    }
]
    

POST Generate Quote Response fields

Field Name Data Type Description
IntegrationID String Unique identifier for the API call generated by IPFS.
isSuccess Boolean Indicates if the quote generation was successful.
message String API call success status.
item Object
errors String Description of any error returned by the API call.
pfa String Not used at this time.
electronicSignatureURL String The URL of the agent login with IPFS that can be used to make a payment directly on the IPFS system. The user must have an IPFS username and password to access this URL.
quoteKey Numeric Uniques IPFS identifier for the generated quote.
premium Numeric Quoted premium amount of policy.
downAmount Numeric Amount to be collected as the down payment.
amountFinanced Numeric Amount that will be financed after the down payment.
financeCharge Numeric Cost of financing charged by IPFS.
totalPayments Numeric Total amount to be paid after down payment. This is amountFinanced + financeCharge.
paymentAmount Numeric The amount of the individual installments.
docStamp Numeric Not currently in use. In the future, this will indicate the documentation filing fee from IPFS for states that require it (based on the state where the Insured resides).
firstDueDate String Date on which the first installment payment is due.
apr Numeric The annual percentage rate charged on the financed amount (4.56 = 4.56%).
Installments Numeric Total number of installment payments to be made.
batchID String The intent token associated with this quote.
paymentsRetained Numeric Number of installments included in the down payment if the effective date of the policy is in the past.
paymentsRetainedAmount Numeric Amount of installments included in the down payment if the effective date of the policy is in the past.
retailAgentRegisterLoginURL String Not currently in use.
eSignResult Object Not currently in use.
unsignedPFAUrl String Link to hosted PFA (Not Signed)

Initialize AndDoneJS

To display the IPFS Quote to the customer, initialize the AndDoneJS payment widget using the BatchId returned from the POST Generate Quote method in place of the Payment Intent token. In the AndDoneJS payment form, the customer is presented with options to pay the premium in full or to accept the IPFS premium financing quote.

If the customer opts to use IPFS premium financing, they are required to make a down payment in the quoted amount. Once the customer submits the payment, AndDoneJS returns the transaction status and information regarding the premium financing agreement to the merchant server via webhook.