KYB (Know Your Business) verification is how UrbanpayX confirms that a business customer is allowed to send payments. The subject of every KYB flow is a business customer: a company record owned by your client, identified by its company_name, registration_number, and country. A business customer must reach a verified state before UrbanpayX will initiate payments on its behalf.
All KYB endpoints live under /api/v1/kyb and require a client Bearer token. Each endpoint checks a specific permission and the caller's account role, described in the sections below.
Verification modes
Every business customer carries a verification_mode that determines how it gets verified. Business customers support two modes (the urbanpayx_kyc mode is for individuals and is rejected here):
urbanpayx_kyb- UrbanpayX-managed KYB. UrbanpayX initiates a hosted verification session with its KYB provider, the business completes it through a verification link, and the provider's decision drives the business'skyb_status. This is the default mode when none is specified.external_attestation- The client attests that the business was verified elsewhere. There is no hosted session and nokyb_statuslifecycle; instead the client reports anexternal_verification_statusthrough the external status endpoint.
A business's mode can be switched with the Update Verification Mode endpoint as long as it is not already verified under the current mode.
Status lifecycle
For urbanpayx_kyb businesses, the kyb_status field tracks the verification lifecycle. The values are:
kyb_status | Meaning | Payment eligible |
|---|---|---|
none | Created but KYB not yet initiated. | No (KYB_REQUIRED) |
pending | A verification session was initiated; awaiting the provider decision. | No (KYB_PENDING) |
approved | The provider approved the business. | Yes |
rejected | The provider rejected the business. | No |
on_hold | A previously approved business placed under review by ongoing monitoring. | No (KYB_ON_HOLD) |
For external_attestation businesses, eligibility is driven by external_verification_status instead:
external_verification_status | Meaning | Payment eligible |
|---|---|---|
pending | Awaiting the client's attestation. | No (EXTERNAL_VERIFICATION_PENDING) |
verified | The client attested the business is verified. | Yes |
rejected | The client marked the business as rejected. | No (EXTERNAL_VERIFICATION_REJECTED) |
Only approved (for urbanpayx_kyb) or verified (for external_attestation) makes a business eligible to initiate payments. Any other state blocks payment initiation with the error code shown above.
Typical flow
For a UrbanpayX-managed (urbanpayx_kyb) business, the core endpoints run in this order:
- Create Business Customer - register the business and choose its
verification_modeand KYB level. - Initiate KYB Verification - start a hosted verification session and receive a
verification_urlto hand to the business. This moveskyb_statustopending. - Get Business KYB Status - poll the business's current
kyb_statuswhile verification is in progress. - Get KYB Decision - fetch and reconcile the provider's full decision on demand (the fallback path when a webhook was missed), or Get KYB Verification Detail to read the latest normalized, curated verification record.
For an external_attestation business, replace steps 2 through 4 with the Update External Verification Status endpoint, which sets external_verification_status directly.
Authentication and permissions
All KYB endpoints authenticate with a client Bearer token and enforce a per-endpoint permission plus an account role check:
- Read endpoints (list businesses, get status, list KYB levels, read verification detail) require
kyb.businesses.read. - Creating and updating business customers and switching verification mode require
kyb.businesses.write. - Initiating verification and fetching the KYB decision require
kyb.verification.initiate. - Updating external verification status requires
kyb.external_status.write.
Role requirements vary by endpoint: the business list, KYB status, and KYB level reads are available to OWNER, DEVELOPER, and OPERATIONS; reading verification detail and detail history is restricted to OWNER and OPERATIONS; write and verification endpoints (including the KYB decision) are restricted to OWNER and OPERATIONS; deactivating or activating a business is restricted to OWNER.
Error responses
Beyond standard authentication and authorization failures, the KYB endpoints return:
| HTTP status | When it happens |
|---|---|
400 Bad Request | Mode mismatch for the operation (for example, initiating KYB on an external_attestation business, or posting an external status on a urbanpayx_kyb business). |
403 Forbidden | The caller's role is not permitted, or KYB link generation is disabled for the client. |
404 Not Found | The business customer, verification session, or verification record does not exist for this client. |
409 Conflict | A business already exists with a different verification_mode, or an identity field is locked after verification. |
422 Unprocessable Entity | An unsupported kyb_level was supplied. See the Get KYB Levels endpoint for valid keys. |
502 Bad Gateway | The KYB provider returned an unexpected or incomplete response. |
503 Service Unavailable | The KYB provider is not configured for the client or platform, or the stored KYB level is not recognized. |