Skip to main content

Pre-filling end-user information

2-3 days

If you already hold information about an end customer, you can return that data from your backend so Unit can pre-fill the hosted bill pay application and reduce the steps the customer has to complete.

Expose a GET endpoint over HTTPS that Unit can call. When an end user starts the Ready-to-Launch Bill Pay application flow, Unit requests your URL once (per user, identified by the JWT sub) with Authorization: Bearer <JWT>.

  • Response: Return HTTP 200 with a JSON:API document — data.type must be whiteLabelAppEndUserConfig, and data.attributes must follow that type (including optional applicantDetails where applicable).
  • Security: Validate the JWT on every request (issuer, audience, signature, expiry) using the same auth setup as your integration. See Custom JWT Authentication.
  • Privacy: Treat any returned applicant data as personally identifiable information: send it only over HTTPS (encrypted), avoid logging sensitive fields, and handle it per your policies.
Note

Contact Unit to complete the setup — Unit must register and allowlist your Application Prefill endpoint URL for calls to work.

Pre-filled application form

When a new customer starts the bill pay application, fields can appear already filled in from the data your endpoint returned in applicantDetails—for example legal business name, the name the business trades under, and website—so they complete less manual entry.

Request

Unit sends this request to your server when an eligible end user begins the bill pay application. The response you return is what Unit uses to pre-fill the hosted application (see Response below).

ItemDetail
MethodGET
URLYour Application Prefill Endpoint URL, as registered for your environment by Unit
HeadersAuthorization: Bearer and the end user's JWT (sub identifies the user)
ConnectionHTTPS only (encrypted traffic); endpoint must be reachable from Unit
curl -X GET 'https://yourdomain.com/unit/prefill' \
-H "Authorization: Bearer ${JWT_TOKEN}"

Implement the handler so repeated calls for the same user return the same payload.

Response

The response body is a JSON:API document. Use the White-label App end user config reference for the full attribute list, supported application types, and a complete example.

{
"data": {
"type": "whiteLabelAppEndUserConfig",
"attributes": {
"allowedApplicationTypes": ["SoleProprietorship", "SingleMemberBusiness"],
"requestedProducts": ["BillPay"],
"applicantDetails": {
"applicationType": "SoleProprietorship",
"email": "user@example.com"
}
}
}
}

For Ready-to-Launch Bill Pay, allowedApplicationTypes accepts any combination of SoleProprietorship, SingleMemberBusiness, and MultipleMemberBusiness. Individual is not supported for this product. See the API reference for the full list of prefill fields available per application type.

Test in sandbox

  1. Deploy your GET handler and contact Unit to register your sandbox Application Prefill endpoint URL.
  2. Call your endpoint with curl (using a sandbox JWT) and confirm you receive HTTP 200 with a valid whiteLabelAppEndUserConfig document.
  3. Run through the bill pay application in the app and confirm the expected fields appear pre-filled.