Hosted Fields
Overview
Splitit's Hosted Fields is a unique, low-PCI compliance product that allows you to fully integrate Splitit into the checkout process on your website, both stylistically and functionally. Hosted Fields utilize individual iFrames plugged directly into the Splitit servers, but since you can extensively customize them, they look and feel like they are native to your site.
Hosted Fields Demo
Usage
To use Hosted Fields, you begin by starting a plan using Splitit APIs on your server. A plan number is returned that you then send to your front end. On your front end, you import the Hosted Fields library and generate a stylable Hosted Fields instance by interacting with your browser's window object, providing it with the plan number. You can subsequently manipulate your Hosted Fields instance in various ways.
Step-by-Step Guide
1. Establish a Plan on Your Server
A. Authenticate
Fetch a bearer token using the instructions under "Authentication". Attach it as a header to all subsequent API calls.
B. Initiate the Plan
Initiate a new Splitit plan, adding your own TerminalId from your merchant portal as well as any data you'd like to pass initially. In the object that is returned, note the plan number in the field InstallmentPlanNumber. (For testing purposes, you can generate plan numbers at the Splitit test plan URL).
2. Set Up Your Front End
A. Add a Container <div>
Set a <div> in your HTML to receive your Hosted Fields:
<div id="flex-form"></div>
B. Import the Hosted Fields Library:
<script src="https://flex-form.sandbox.splitit.com/flex-form.js"></script>