# Submit Source of Income POST https://api-gateway-stg.transak.com/api/v2/user/source-of-income Content-Type: application/json **Submit Source of Income** is an **authenticated** API call that allows the submission of a user’s income source details as part of the KYC verification process. This step may be mandatory based on jurisdictional or regulatory requirements and is used for compliance validation. The valid source of income information must be provided as part of the **Enhanced KYC flow** Reference: https://docs.transak.com/api/whitelabel/kyc/submit-source-of-income ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: whitelabel-api version: 1.0.0 paths: /api/v2/user/source-of-income: post: operationId: submit-source-of-income summary: Submit Source of Income description: >- **Submit Source of Income** is an **authenticated** API call that allows the submission of a user’s income source details as part of the KYC verification process. This step may be mandatory based on jurisdictional or regulatory requirements and is used for compliance validation. The valid source of income information must be provided as part of the **Enhanced KYC flow** tags: - subpackage_kyc parameters: - name: authorization in: header description: >- Authorization token is the accessToken received from the API -` api/v2/auth/verify` required: true schema: type: string default: YOUR_USER_AUTH_TOKEN - name: x-user-identifier in: header description: >- Your authenticated user Email Id address. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) required: false schema: type: string default: USER_EMAIL_ID - name: x-access-token in: header description: > Your Partner Access Token. Please refer [here](/guides/how-to-create-partner-access-token) for a tutorial on generating your access token. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) required: false schema: type: string default: YOUR_ACCESS_TOKEN responses: '200': description: 200 - Success content: application/json: schema: $ref: '#/components/schemas/KYC_submit-source-of-income_Response_200' '400': description: 400 - Bad Request content: application/json: schema: $ref: >- #/components/schemas/Submit-source-of-incomeRequestBadRequestError '401': description: 401 - Unauthorized content: application/json: schema: $ref: >- #/components/schemas/Submit-source-of-incomeRequestUnauthorizedError '500': description: 500 - Internal Server Error content: application/json: schema: $ref: >- #/components/schemas/Submit-source-of-incomeRequestInternalServerError requestBody: content: application/json: schema: type: object properties: monthlyVolume: type: string default: 1000-5000 sourceOfFundsType: type: string default: SALARY description: value from SOURCE_OF_INCOME form options required: - monthlyVolume - sourceOfFundsType servers: - url: https://api-gateway-stg.transak.com components: schemas: ApiV2UserSourceOfIncomePostResponsesContentApplicationJsonSchemaData: type: object properties: status: type: string required: - status title: ApiV2UserSourceOfIncomePostResponsesContentApplicationJsonSchemaData KYC_submit-source-of-income_Response_200: type: object properties: data: $ref: >- #/components/schemas/ApiV2UserSourceOfIncomePostResponsesContentApplicationJsonSchemaData required: - data title: KYC_submit-source-of-income_Response_200 ApiV2UserSourceOfIncomePostResponsesContentApplicationJsonSchemaError: type: object properties: statusCode: type: integer message: type: string required: - statusCode - message title: ApiV2UserSourceOfIncomePostResponsesContentApplicationJsonSchemaError Submit-source-of-incomeRequestBadRequestError: type: object properties: error: $ref: >- #/components/schemas/ApiV2UserSourceOfIncomePostResponsesContentApplicationJsonSchemaError required: - error title: Submit-source-of-incomeRequestBadRequestError Submit-source-of-incomeRequestUnauthorizedError: type: object properties: error: $ref: >- #/components/schemas/ApiV2UserSourceOfIncomePostResponsesContentApplicationJsonSchemaError required: - error title: Submit-source-of-incomeRequestUnauthorizedError Submit-source-of-incomeRequestInternalServerError: type: object properties: error: $ref: >- #/components/schemas/ApiV2UserSourceOfIncomePostResponsesContentApplicationJsonSchemaError required: - error title: Submit-source-of-incomeRequestInternalServerError ``` ## SDK Code Examples ```python Sucsess import requests url = "https://api-gateway-stg.transak.com/api/v2/user/source-of-income" headers = { "authorization": "YOUR_USER_AUTH_TOKEN", "x-user-identifier": "USER_EMAIL_ID", "x-access-token": "YOUR_ACCESS_TOKEN", "Content-Type": "application/json" } response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript Sucsess const url = 'https://api-gateway-stg.transak.com/api/v2/user/source-of-income'; const options = { method: 'POST', headers: { authorization: 'YOUR_USER_AUTH_TOKEN', 'x-user-identifier': 'USER_EMAIL_ID', 'x-access-token': 'YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' }, body: undefined }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Sucsess package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api-gateway-stg.transak.com/api/v2/user/source-of-income" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("authorization", "YOUR_USER_AUTH_TOKEN") req.Header.Add("x-user-identifier", "USER_EMAIL_ID") req.Header.Add("x-access-token", "YOUR_ACCESS_TOKEN") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Sucsess require 'uri' require 'net/http' url = URI("https://api-gateway-stg.transak.com/api/v2/user/source-of-income") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["authorization"] = 'YOUR_USER_AUTH_TOKEN' request["x-user-identifier"] = 'USER_EMAIL_ID' request["x-access-token"] = 'YOUR_ACCESS_TOKEN' request["Content-Type"] = 'application/json' response = http.request(request) puts response.read_body ``` ```java Sucsess import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/user/source-of-income") .header("authorization", "YOUR_USER_AUTH_TOKEN") .header("x-user-identifier", "USER_EMAIL_ID") .header("x-access-token", "YOUR_ACCESS_TOKEN") .header("Content-Type", "application/json") .asString(); ``` ```php Sucsess request('POST', 'https://api-gateway-stg.transak.com/api/v2/user/source-of-income', [ 'headers' => [ 'Content-Type' => 'application/json', 'authorization' => 'YOUR_USER_AUTH_TOKEN', 'x-access-token' => 'YOUR_ACCESS_TOKEN', 'x-user-identifier' => 'USER_EMAIL_ID', ], ]); echo $response->getBody(); ``` ```csharp Sucsess using RestSharp; var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/user/source-of-income"); var request = new RestRequest(Method.POST); request.AddHeader("authorization", "YOUR_USER_AUTH_TOKEN"); request.AddHeader("x-user-identifier", "USER_EMAIL_ID"); request.AddHeader("x-access-token", "YOUR_ACCESS_TOKEN"); request.AddHeader("Content-Type", "application/json"); IRestResponse response = client.Execute(request); ``` ```swift Sucsess import Foundation let headers = [ "authorization": "YOUR_USER_AUTH_TOKEN", "x-user-identifier": "USER_EMAIL_ID", "x-access-token": "YOUR_ACCESS_TOKEN", "Content-Type": "application/json" ] let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/user/source-of-income")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ```python KYC_submit-source-of-income_example import requests url = "https://api-gateway-stg.transak.com/api/v2/user/source-of-income" payload = { "monthlyVolume": "1000-5000", "sourceOfFundsType": "SALARY" } headers = { "authorization": "YOUR_USER_AUTH_TOKEN", "x-user-identifier": "USER_EMAIL_ID", "x-access-token": "YOUR_ACCESS_TOKEN", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript KYC_submit-source-of-income_example const url = 'https://api-gateway-stg.transak.com/api/v2/user/source-of-income'; const options = { method: 'POST', headers: { authorization: 'YOUR_USER_AUTH_TOKEN', 'x-user-identifier': 'USER_EMAIL_ID', 'x-access-token': 'YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' }, body: '{"monthlyVolume":"1000-5000","sourceOfFundsType":"SALARY"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go KYC_submit-source-of-income_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-gateway-stg.transak.com/api/v2/user/source-of-income" payload := strings.NewReader("{\n \"monthlyVolume\": \"1000-5000\",\n \"sourceOfFundsType\": \"SALARY\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("authorization", "YOUR_USER_AUTH_TOKEN") req.Header.Add("x-user-identifier", "USER_EMAIL_ID") req.Header.Add("x-access-token", "YOUR_ACCESS_TOKEN") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby KYC_submit-source-of-income_example require 'uri' require 'net/http' url = URI("https://api-gateway-stg.transak.com/api/v2/user/source-of-income") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["authorization"] = 'YOUR_USER_AUTH_TOKEN' request["x-user-identifier"] = 'USER_EMAIL_ID' request["x-access-token"] = 'YOUR_ACCESS_TOKEN' request["Content-Type"] = 'application/json' request.body = "{\n \"monthlyVolume\": \"1000-5000\",\n \"sourceOfFundsType\": \"SALARY\"\n}" response = http.request(request) puts response.read_body ``` ```java KYC_submit-source-of-income_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/user/source-of-income") .header("authorization", "YOUR_USER_AUTH_TOKEN") .header("x-user-identifier", "USER_EMAIL_ID") .header("x-access-token", "YOUR_ACCESS_TOKEN") .header("Content-Type", "application/json") .body("{\n \"monthlyVolume\": \"1000-5000\",\n \"sourceOfFundsType\": \"SALARY\"\n}") .asString(); ``` ```php KYC_submit-source-of-income_example request('POST', 'https://api-gateway-stg.transak.com/api/v2/user/source-of-income', [ 'body' => '{ "monthlyVolume": "1000-5000", "sourceOfFundsType": "SALARY" }', 'headers' => [ 'Content-Type' => 'application/json', 'authorization' => 'YOUR_USER_AUTH_TOKEN', 'x-access-token' => 'YOUR_ACCESS_TOKEN', 'x-user-identifier' => 'USER_EMAIL_ID', ], ]); echo $response->getBody(); ``` ```csharp KYC_submit-source-of-income_example using RestSharp; var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/user/source-of-income"); var request = new RestRequest(Method.POST); request.AddHeader("authorization", "YOUR_USER_AUTH_TOKEN"); request.AddHeader("x-user-identifier", "USER_EMAIL_ID"); request.AddHeader("x-access-token", "YOUR_ACCESS_TOKEN"); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"monthlyVolume\": \"1000-5000\",\n \"sourceOfFundsType\": \"SALARY\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift KYC_submit-source-of-income_example import Foundation let headers = [ "authorization": "YOUR_USER_AUTH_TOKEN", "x-user-identifier": "USER_EMAIL_ID", "x-access-token": "YOUR_ACCESS_TOKEN", "Content-Type": "application/json" ] let parameters = [ "monthlyVolume": "1000-5000", "sourceOfFundsType": "SALARY" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/user/source-of-income")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```