Direct User Initiation API
This document explains how to perform a comprehensive user onboarding in a single API call, including user creation, KYC submission, and bank account linking.
Overview
The initiate-direct endpoint is a powerful utility designed for merchants who want to streamline the onboarding process. Instead of making multiple calls to create a user, submit KYC, and add a bank, this endpoint allows you to provide all the necessary information in one request.
Initiate Direct User Onboarding
Description: Creates a new user, processes their KYC documents, and links their bank account details simultaneously.
Request Body Payload
| Property Name | Type | Mandatory | Description |
|---|---|---|---|
user | object | Yes | Contains basic user identification. |
user.user_id | string | Yes | The unique UUID for the user (must be unique across your client account). |
user.user_type | string | Yes | The type of user (e.g., individual). |
kyc | array | Yes | An array of KYC document objects. |
kyc[].document_type | string | Yes | Type of document (pid or tid). |
kyc[].document_name | string | Yes | Name of the document (e.g., aadhar, pan). |
kyc[].document_number | string | Yes | The document identification number. |
kyc[].dateOfBirth | string | Yes | User’s date of birth (YYYY-MM-DD). |
kyc[].nameOnCard | string | Yes | The name as it appears on the document. |
bank | object | Yes | Contains the user’s bank account details. |
bank.account_number | string | Yes | The bank account number. |
bank.ifsc_code | string | Yes | The IFSC code of the bank branch. |
bank.account_holder_name | string | Yes | The name of the account holder. |
bank.bank_name | string | Yes | The name of the bank. |
cURL Command
curl --request POST \
--url https://api.swiftramp.in/v1/user/initiate-direct \
--header 'Authorization: Bearer [JWT_TOKEN]' \
--header 'Content-Type: application/json' \
--data '{
"user": {
"user_id": "87b2b208-a8e6-4185-90ba-67629a95eb52",
"user_type": "individual"
},
"kyc": [
{
"document_type": "pid",
"document_name": "aadhar",
"document_number": "987654321001",
"dateOfBirth": "2004-05-24",
"nameOnCard": "Ravinder Joshi"
},
{
"document_type": "tid",
"document_name": "pan",
"document_number": "JFGKE8767L",
"dateOfBirth": "2004-05-24",
"nameOnCard": "Ravinder Joshi"
}
],
"bank": {
"account_number": "987654321123",
"ifsc_code": "SBIN0000031",
"account_holder_name": "Ravinder Joshi",
"bank_name": "State Bank Of India"
}
}'Success Response (201 Created)
{
"status": true,
"code": 201,
"message": "User, KYC, and Bank creation req received. check data for detail",
"data": {
"createdUser": {
"data": {
"user_id": "87b2b208-a8e6-4185-90ba-67629a95eb53",
"user_type": "individual",
"email": "1775455148931-2405@leoppay-random.com"
},
"message": "user added successfully"
},
"createdKYC": {
"data": [
{
"status": true,
"message": "KYC created",
"data": {
"document_name": "aadhar",
"kyc_status": "success",
"verified_by": "system"
}
}
],
"message": "KYC processed"
},
"createdBank": {
"data": {
"status": true,
"message": "Bank created",
"data": {
"account_number": "987654321123",
"bank_status": "pending"
}
},
"message": "Bank processed"
}
}
}Error Response (409 Conflict)
User ID Already Exists
{
"status": false,
"code": 409,
"message": "User uuid given by client is already asigned to another user",
"data": {}
}Important Notes
- 💡 Atomic-like Operation: While the system attempts to create all entities, you should check the nested
dataobjects in the response to confirm the status of each component (User, KYC, and Bank). - 💡 Duplicate User ID: If the
user_idprovided has already been used by your client account, the API will return a 409 error. - 💡 Bank Verification: The bank account is initially created with a
pendingstatus and will undergo verification.