Overview
A VCN goes through a predictable lifecycle: retrieve company configuration → create the VCN → optionally update it → cancel if unused → reconcile at month end. Each step maps to a specific endpoint.Step 1: Retrieve Company Configuration
Before creating a VCN, fetch the available RCNs, templates, and suppliers for your company. The IDs returned here are required in subsequent requests. Endpoint:GET /api/v1/vcn
Query Parameters
Example Request
Example Response (CompanyResponseVO)
Step 2: Create a Virtual Card
Generate a new VCN for a controlled purchase. The VCN (PAN + AVV + expiry) is returned immediately and is ready for use. Endpoint:POST /api/v1/vcn/submit
Request Body (VCNRequestVO)
Control Types
Controls insiderule must match the controls configured in the template. Sending an unsupported control returns 400 Invalid rule control {}.
Example Request Body
Example Response (VCNResponseVO)
id (this is the purchaseId) — it is required for update, cancel, and lookup operations.
Step 3: Update a Virtual Card
Adjust VCN parameters such as the spending limit or supplier. The entireVCNRequestVO must be sent, including all unchanged fields.
Endpoint: POST /api/v1/vcn/{purchaseId}/update
Path Parameter
The request body and response follow the same structure as Step 2. All fields must be included even if not changing.
Step 4: Cancel a VCN
Void one or more purchases that were created in error or are no longer needed. Supports batch cancellation. Endpoint:POST /api/v1/vcn/cancel
Example Request Body (CancelPurchaseRequestVO)
Example Response (CancelPurchaseResponseVO)
cancelled boolean and an errorMessage if the cancellation failed.
Step 5: Reconciliation Reports (Polling Flow)
Reconciliation is a two-step polling flow: trigger the report, then poll for results.5A. Create Report (Trigger)
Endpoint:POST /api/v1/vcn/report
Example Request Body
Example Response (ReportResponseVO)
reportId to poll for results.
5B. Get Report Data (Poll)
Poll untilstatus is Completed. The from/to range controls pagination — the difference must not exceed 100.
Endpoint: GET /api/v1/vcn/report
Example Request
Example Response (ReportVO)
The transactions array is populated for Authorization and Clearing reports. The accountSummary array is populated for ClearingExceptions reports.
Retrieve Purchase by ID
Fetch the full details of a specific VCN purchase, including the VCN itself and all applied rules. Endpoint:GET /api/v1/vcn/{purchaseId}
