> For a complete page index, fetch https://docs.transak.com/llms.txt # Upload Proof Document POST https://api-gateway-stg.transak.com/api/v2/kyc/upload Content-Type: multipart/form-data **Upload Proof Document** is an **authenticated** API call that allows submission of a user’s source of income document proof as part of the KYC verification process. This step is required when Enhanced KYC is triggered and Source of income is submitted. Valid proof documents (e.g., passport, national ID, driver’s license, or utility bill) must be submitted after completing the submission of Source of income Form. **Note:** Any invalid, unclear, or missing documents may lead to KYC verification failure or delays in completing the onboarding process. Reference: https://docs.transak.com/api/whitelabel/kyc/upload-proof-document ## Request ### Headers - `x-user-ip` (string, required) — End user's originating IP. More details [here](/guides/mandatory-security-changes#user-ip-header-in-apis) - `x-api-key` (string, required) — Partner API Key present in Transak Dashboard. - `authorization` (string, optional) — Authorization token is the accessToken received from the API -` api/v2/auth/verify` Note: This is not applicable for [Auth Reliance Flows](/features/auth-reliance) - `x-user-identifier` (string, optional) — Your authenticated user Email Id address. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) - `x-access-token` (string, optional) — 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) ### Body (multipart/form-data) This endpoint expects a multipart form containing a file. - `docId` (string, required) — Document optionId present in the `DOCUMENT_PROOF` Form - `file` (file, required) — Document Proof ## Response ### 200 200 - Success - `data` (ApiV2KycUploadPostResponsesContentApplicationJsonSchemaData, required) ## Errors ### 400 Bad Request Error 400 - Bad Request - `error` (ApiV2KycUploadPostResponsesContentApplicationJsonSchemaError, required) ### 401 Unauthorized Error 401 - Unauthorized - `error` (ApiV2KycUploadPostResponsesContentApplicationJsonSchemaError, required) ### 404 Not Found Error 404 - User Not Found - `error` (ApiV2KycUploadPostResponsesContentApplicationJsonSchemaError, required) ### 500 Internal Server Error 500 - Internal Server Error - `error` (ApiV2KycUploadPostResponsesContentApplicationJsonSchemaError, required) ## Types ### ApiV2KycUploadPostResponsesContentApplicationJsonSchemaData - `partnerUserId` (string, required) - `docId` (string, required) - `originalFileName` (string, required) ### ApiV2KycUploadPostResponsesContentApplicationJsonSchemaError - `statusCode` (integer, required) - `message` (string, required) ## Examples **Request** ```json { "docId": "PAYSLIP", "file": "" } ``` **Response** ```json { "data": { "partnerUserId": "3016dfff-f2d5-4c66-a834-9554e189b0a9", "docId": "PAYSLIP", "originalFileName": "dec.pdf" } } ``` **SDK Code** ```python Submitted Proof Document import requests url = "https://api-gateway-stg.transak.com/api/v2/kyc/upload" files = { "file": "open('payslip.pdf', 'rb')" } payload = { "docId": "PAYSLIP" } headers = { "x-api-key": "", "x-user-ip": "" } response = requests.post(url, data=payload, files=files, headers=headers) print(response.json()) ``` ```javascript Submitted Proof Document const url = 'https://api-gateway-stg.transak.com/api/v2/kyc/upload'; const form = new FormData(); form.append('docId', 'PAYSLIP'); form.append('file', 'payslip.pdf'); const options = {method: 'POST', headers: {'x-api-key': '', 'x-user-ip': ''}}; options.body = form; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Submitted Proof Document package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-gateway-stg.transak.com/api/v2/kyc/upload" payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"docId\"\r\n\r\nPAYSLIP\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"payslip.pdf\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("x-user-ip", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Submitted Proof Document require 'uri' require 'net/http' url = URI("https://api-gateway-stg.transak.com/api/v2/kyc/upload") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["x-user-ip"] = '' request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"docId\"\r\n\r\nPAYSLIP\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"payslip.pdf\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n" response = http.request(request) puts response.read_body ``` ```java Submitted Proof Document import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/kyc/upload") .header("x-api-key", "") .header("x-user-ip", "") .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"docId\"\r\n\r\nPAYSLIP\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"payslip.pdf\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n") .asString(); ``` ```php Submitted Proof Document request('POST', 'https://api-gateway-stg.transak.com/api/v2/kyc/upload', [ 'multipart' => [ [ 'name' => 'docId', 'contents' => 'PAYSLIP' ], [ 'name' => 'file', 'filename' => 'payslip.pdf', 'contents' => null ] ] 'headers' => [ 'x-api-key' => '', 'x-user-ip' => '', ], ]); echo $response->getBody(); ``` ```csharp Submitted Proof Document using RestSharp; var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/kyc/upload"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("x-user-ip", ""); request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"docId\"\r\n\r\nPAYSLIP\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"payslip.pdf\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Submitted Proof Document import Foundation let headers = [ "x-api-key": "", "x-user-ip": "" ] let parameters = [ [ "name": "docId", "value": "PAYSLIP" ], [ "name": "file", "fileName": "payslip.pdf" ] ] let boundary = "---011000010111000001101001" var body = "" var error: NSError? = nil for param in parameters { let paramName = param["name"]! body += "--\(boundary)\r\n" body += "Content-Disposition:form-data; name=\"\(paramName)\"" if let filename = param["fileName"] { let contentType = param["content-type"]! let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8) if (error != nil) { print(error as Any) } body += "; filename=\"\(filename)\"\r\n" body += "Content-Type: \(contentType)\r\n\r\n" body += fileContent } else if let paramValue = param["value"] { body += "\r\n\r\n\(paramValue)" } } let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/kyc/upload")! 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() ```