Overview
This document describes Billd’s Widget SDK implementation as a package within a partner web application. Also included are code examples of implementation within a frame and the authorization process for both QA and Production.
Implementation
Prerequisites
Please provide Billd with the QA and Production domains that will host the NPM package. Since the NPM package will be making calls to Billd APIs, it is essential that these domains are added to the Billd allow list.
Step 1: Receive Initial NPM Package Info
From Billd, you will receive a link to the NPM package that will need to be added to your application. And a set of credentials.
Step 2: Application server setup
Next, you will need to create an NPM configuration file called .npmrc, at the root of your web application if it doesn’t already exist.
Within the .npmrc file you will need to add a registry entry for the @billd scope.
Step 3: Download and install the package
Open a terminal window and cd to the root directory of your web application. This will be the location where the NPM package will be installed. It is also the directory where the .npmrc file is located.
Login to the Billd NPM repository using the following command with the credentials that Billd provided. This is where you actually retrieve that package.
After successful login, you are ready to install the SDK widget with the following command:
Step 4: Implement the widget in your application
Implementation example using Angular.
Additional Information:
Below is a set of sample fields that can be passed in as intake parameters within the session.
externalPartnerPartyIdentifier:
Unique ID for the contractor
externalPartnerProjectIdentifier:
Unique ID for the project
externalPartnerPayAppIdentifier:
Unique ID for the Payment Application
taxId:
Tax ID for the contractor
projectDescription:
Description of the project scope
projectStreetAddress:
Physical address of project
projectCity:
Physical address of project
projectState:
Physical address of project
projectZip:
Physical address of project
projectCounty:
Physical address of project
projectContractAmount:
Contract amount between subcontractor and general contractor
payAppNumber:
Number for the Pay App being referenced
SDK QA Get the Access Token
| Environment |
QA |
auth_url |
POST https://auth-qa.billd.com/oauth2/token |
client_id |
from Billd |
client_secret |
from Billd |
scope |
from Billd |
SDK PROD Get the Access Token
| Environment |
QA |
auth_url |
POST https://auth.billd.com/oauth2/token |
client_id |
from Billd |
client_secret |
from Billd |
scope |
from Billd |