Beneficiary App Integration
This document is a guide for integrating Beneficiary Apps as network participants on the UBI Network. Beneficiaries are responsible for fetching benefits, sending applications to providers, validating them using eligibility and verification SDKs if needed, and showing the status of the applications.
Sequence of API Calls
Search API (
/search→/on_search) The BAP (Seeker) initiates a search request to discover available benefits or schemes. This request goes through the UBI Network to the BPPs (Providers). Each BPP responds with an/on_searchcall containing the list of benefits they offer, along with metadata such as title, description, eligibility, sponsoring entities, and required documents.Select API (
/select→/on_select) When the user selects a benefit to view or apply, the BAP sends a/selectcall to the UBI Network. The BPP responds with an/on_selectcall that includes detailed benefit information and the form schema. This schema defines the form fields, types, validation rules, and required documents. Based on this schema, the BAP generates the application form dynamically (no iframe approach).Init API (
/init→/on_init) Once the user confirms they want to apply for a particular benefit, the BAP first creates an application record in its own database. This record includes a newly generatedbap_application_id, along with thetransaction_id,benefit_id, andbpp_id. The BAP then sends an/initrequest containing the applicant’s profile data (from Verifiable Credentials) and the generatedbap_application_id. The BPP processes this request and returns an/on_initresponse, which includes a confirmation and a uniqueorder_idgenerated on the BPP side. The BAP should update its application record with the returnedorder_id.Confirm API (
/confirm→/on_confirm) After the user completes the form and attaches all required Verifiable Credentials (VCs), the BAP sends a/confirmrequest. The payload contains the user data, document data, and VC information. The BPP validates the received data and credentials using the Verification SDK, ensuring that the VCs are authentic and untampered. The BPP then responds with/on_confirm, acknowledging successful application submission and returning abpp_application_id. The BAP updates its application record with thisbpp_application_idand marks the status as “Submitted”.Status API (
/status→/on_status) The BAP can periodically query the application status using the/statusAPI. The request includes thetransaction_idorbap_application_idfor the given application. The BPP looks up the application on its end and responds with/on_status, containing the current state such as Pending, Approved, Rejected, or Needs Update. The BAP updates its local database and displays the current status to the user.
Integration Flow
The user searches for benefits in the Beneficiary App (BAP). The BAP sends a
/searchrequest through the UBI Network, and each BPP responds with/on_search, listing available benefits.The user selects one benefit from the list. The BAP sends a
/selectcall to retrieve detailed benefit information and the dynamic form schema from the BPP’s/on_selectresponse.The BAP creates an application record locally before initiating the application. It generates a unique
bap_application_idand associates it with thetransaction_id,bpp_id, andbenefit_id.The BAP calls
/initto initialize the application on the BPP side. The BPP responds with/on_init, providing confirmation and anorder_id, which the BAP stores in its record.The BAP sends the filled application data and Verifiable Credentials in the
/confirmrequest. The BPP verifies the received credentials and application data using the Verification SDK, then responds with/on_confirm, returning thebpp_application_id.The BAP stores this
bpp_application_idand marks the application as “Submitted”. Any further modifications or updates to the application can be done through an/updateAPI (if supported).To track application progress, the BAP periodically sends
/statusrequests. The BPP responds with/on_status, returning the latest application state and remarks. The BAP updates the local record and reflects the current status in the UI.
Flow Diagram
API Integration Details
1. Search API - Find Available Benefits
Endpoint: POST https://dev-bap.ubi.com/client/search
Purpose: Search for available benefits on the UBI network
Request Structure:
You will get the response to this as:
⚠️ Important Note on transaction_id and message_id Usage
transaction_id and message_id UsageIn all transaction APIs across the UBI Network (e.g., search, select, init, confirm, status), both transaction_id and message_id are critical for ensuring traceability and uniqueness of requests.
message_idMust be unique for every individual API call.
Used to track and identify each message/request independently.
Helps in debugging and ensuring idempotency at the network level.
transaction_idRepresents the entire lifecycle of a single application or transaction.
Generated by the Seeker (BAP) after a successful
selectresponse from the Provider (BPP).Must remain constant across all subsequent API calls related to that transaction — i.e.
init,confirm, andstatus.Enables both BAP and BPP to track, resubmit, or update the same application consistently.
The Seeker app should:
Capture and persist the
transaction_idreceived post-selectAPI response.Store it in the local database along with relevant application metadata.
Reuse the same
transaction_idfor subsequent API calls related to that benefit application.
This ensures the entire flow — from initiation to confirmation and status tracking — can be reliably linked and managed across the network.
2. Select API - Get Benefit Details
Endpoint: POST https://your-bap.client.com/api/select
Purpose: Get detailed information about a specific benefit
Headers:
Request Structure:
You will get the response to this as:
3. Init API – Start Application Process
Endpoint: POST https://your-bap.client.com/api/init
Purpose: Initialize the application process for a selected benefit and create a local application record on the BAP side before submitting data to the network.
Process Overview
When the user decides to apply for a selected benefit:
The Beneficiary App (BAP) creates a new application record in its database.
Generates a unique
bap_application_id.Stores
transaction_id,benefit_id,bpp_id, and user reference.Sets the application state to initiated.
The BAP sends an
/initAPI request to the UBI network, which forwards it to the corresponding BPP.The BPP validates the request and returns an
/on_initresponse with anorder_id.The BAP updates its local record with this
order_id.
Request Structure:
You will get the response to this as:
Notes
The
bap_application_idgenerated by the BAP must be unique per application and stored for tracking.The
transaction_idmust remain the same across all APIs (init,confirm,status,update) for that application.The BPP will generate its own
order_idorbpp_application_id, which should be updated in the BAP database once received.
4. Confirm API – Submit Application
Endpoint: POST https://your-bap.client.com/api/confirm
Purpose: Submit the completed application with user data and attached Verifiable Credentials (VCs) to the UBI network for provider verification and acknowledgment.
Process Overview
Once the user completes the form, the BAP compiles all input data and associated VCs.
The BAP sends this data using the
/confirmAPI call.The BPP validates the submitted data and uses the Verification SDK to verify that all VCs are authentic and untampered.
The BPP responds with
/on_confirm, providing a confirmation acknowledgment and the generatedbpp_application_id.The BAP updates its local record with the new ID and status.
Request Structure:
You will get the response to this as:
5. Update API – Modify / Resubmit Application
When to use
Use /update when a beneficiary (or BAP) needs to modify an existing application (corrections, additional documents, resubmission after rejection, or to add missing VCs). The update flow avoids creating a new transaction; it updates the existing application tied to the same transaction_id.
Endpoint:
POST https://your-bap.client.com/api/update
Purpose: Update an existing application record on the Provider side without restarting the application lifecycle.
Key Rules
Use the same
transaction_idandbap_application_idas the original application.message_idmust be unique for this update request.If the BPP re-runs verification/eligibility, it should mention that in its
/on_updateresponse.BPP must merge or version the incoming updates and persist the changes.
BAP-side Process
User edits application in BAP UI.
BAP updates its local DB (optional draft) and calls
/updatewithtransaction_id+bap_application_id+ updated fields + VCs.BPP receives
/update, validates, updates its DB record, and responds with/on_update.BAP updates its local record based on
/on_update.
Request Structure:
You will get the response to this as:
6. Status API – Track Application
Endpoint: POST https://your-bap.client.com/api/status
Purpose: The Status API allows the BAP to query the current state of a previously submitted application. This is typically used by the beneficiary app to check whether their application is pending, approved, rejected, or requires additional action.
Request Structure:
You will get the response to this as:
Notes
transaction_idremains the single linking identifier acrossinit,confirm,update,status.BAP should persist the returned
bpp_application_idandorder_id(from init) for later reconciliation.
Last updated
