Skip to main content
POST
/
import
/
transactions
/
{cf_payment_id}
Upload Payment Verification Details
curl --request POST \
  --url https://sandbox.cashfree.com/import/transactions/{cf_payment_id} \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-version: <x-api-version>' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --form 'importer_name=<string>' \
  --form 'invoice_number=<string>' \
  --form invoice_file='@example-file' \
  --form 'goods_description=<string>' \
  --form 'importer_address=<string>' \
  --form 'importer_address_postal_code=<string>' \
  --form 'hs_code=<string>' \
  --form 'shipment_date=<date>' \
  --form 'port_of_loading=<string>' \
  --form 'ecommerce_order_serial_number=<string>'
import requests

url = "https://sandbox.cashfree.com/import/transactions/{cf_payment_id}"

files = { "invoice_file": ("example-file", open("example-file", "rb")) }
payload = {
    "importer_name": "<string>",
    "invoice_number": "<string>",
    "goods_description": "<string>",
    "importer_address": "<string>",
    "importer_address_postal_code": "<string>",
    "hs_code": "<string>",
    "shipment_date": "<date>",
    "port_of_loading": "<string>",
    "ecommerce_order_serial_number": "<string>"
}
headers = {
    "x-api-version": "<x-api-version>",
    "x-client-id": "<api-key>",
    "x-client-secret": "<api-key>"
}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
const form = new FormData();
form.append('importer_name', '<string>');
form.append('invoice_number', '<string>');
form.append('invoice_file', '@/path/to/file.pdf');
form.append('goods_description', '<string>');
form.append('importer_address', '<string>');
form.append('importer_address_postal_code', '<string>');
form.append('hs_code', '<string>');
form.append('shipment_date', '<date>');
form.append('port_of_loading', '<string>');
form.append('ecommerce_order_serial_number', '<string>');

const options = {
  method: 'POST',
  headers: {
    'x-api-version': '<x-api-version>',
    'x-client-id': '<api-key>',
    'x-client-secret': '<api-key>'
  }
};

options.body = form;

fetch('https://sandbox.cashfree.com/import/transactions/{cf_payment_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sandbox.cashfree.com/import/transactions/{cf_payment_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"invoice_number\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"invoice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.pdf\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"goods_description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_address_postal_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"hs_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shipment_date\"\r\n\r\n<date>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"port_of_loading\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ecommerce_order_serial_number\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
  CURLOPT_HTTPHEADER => [
    "Content-Type: multipart/form-data",
    "x-api-version: <x-api-version>",
    "x-client-id: <api-key>",
    "x-client-secret: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.cashfree.com/import/transactions/{cf_payment_id}"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"invoice_number\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"invoice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.pdf\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"goods_description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_address_postal_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"hs_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shipment_date\"\r\n\r\n<date>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"port_of_loading\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ecommerce_order_serial_number\"\r\n\r\n<string>\r\n-----011000010111000001101001--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-version", "<x-api-version>")
	req.Header.Add("x-client-id", "<api-key>")
	req.Header.Add("x-client-secret", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://sandbox.cashfree.com/import/transactions/{cf_payment_id}")
  .header("x-api-version", "<x-api-version>")
  .header("x-client-id", "<api-key>")
  .header("x-client-secret", "<api-key>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"invoice_number\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"invoice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.pdf\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"goods_description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_address_postal_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"hs_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shipment_date\"\r\n\r\n<date>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"port_of_loading\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ecommerce_order_serial_number\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.cashfree.com/import/transactions/{cf_payment_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-version"] = '<x-api-version>'
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"invoice_number\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"invoice_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n@/path/to/file.pdf\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"goods_description\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"importer_address_postal_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"hs_code\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shipment_date\"\r\n\r\n<date>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"port_of_loading\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ecommerce_order_serial_number\"\r\n\r\n<string>\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
{ "uploaded_documents": [ { "doc_name": "invoice_number", "doc_type": "VALUE", "doc_status": "VERIFIED", "remarks": null, "added_on": null, "last_updated_on": null }, { "doc_name": "importer_name", "doc_type": "VALUE", "doc_status": "IN_REVIEW", "remarks": null, "added_on": null, "last_updated_on": null }, { "doc_name": "invoice_file", "doc_type": "DOCUMENT", "doc_status": "IN_REVIEW", "remarks": null, "added_on": null, "last_updated_on": null } ], "missing_documents": [ { "doc_name": "ecommerce_order_serial_number", "doc_type": "VALUE", "doc_status": "ACTION_REQUIRED", "remarks": null, "added_on": null, "last_updated_on": null }, { "doc_name": "hs_code", "doc_type": "VALUE", "doc_status": "ACTION_REQUIRED", "remarks": null, "added_on": null, "last_updated_on": null }, { "doc_name": "shipment_date", "doc_type": "VALUE", "doc_status": "ACTION_REQUIRED", "remarks": null, "added_on": null, "last_updated_on": null }, { "doc_name": "port_of_loading", "doc_type": "VALUE", "doc_status": "ACTION_REQUIRED", "remarks": null, "added_on": null, "last_updated_on": null }, { "doc_name": "awb_number", "doc_type": "VALUE", "doc_status": "ACTION_REQUIRED", "remarks": null, "added_on": null, "last_updated_on": null } ], "errors": [] }

Authorizations

x-client-id
string
header
required

Client app ID. You can find your app id in the Merchant Dashboard.

x-client-secret
string
header
required

Client secret key. You can find your secret key in the Merchant Dashboard.

Headers

x-api-version
string
required

API version to be used. Format is in YYYY-MM-DD. Ensure to pass 2025-01-01 in header to ensure this version is invoked.

Path Parameters

cf_payment_id
integer<int64>
required

Successful payment ID for the created order.

Body

multipart/form-data

The request body can include multiple document entries. Each key represents a valid doc_name. The value for each key can be either:

  • A string (when doc_type is VALUE)
  • A file (when doc_type is DOCUMENT)
importer_name
string
required

Name of the importer

goods_description
string
required

Description of the goods

importer_address
string

Address of the importer

invoice_number
string

Invoice number

country_of_origin
string

Country of origin

ecommerce_order_serial_number
string

E-commerce order serial number

hs_code
string

HS code

shipment_date
string<date>

Shipment date

port_of_loading
string

Port of loading

importer_address_postal_code
string

Importer address postal code

invoice_file
file

Invoice file

Response

This response can represent either a successful upload (when all documents are processed correctly) or a partial success (when some documents are successfully uploaded while others are missing or encountered errors).

  • Full Success: All documents are uploaded and processed without any issues.
  • Partial Success: Some documents are uploaded successfully, but others are either missing or encountered errors.
  • If documents are missing or errors occur, these will be returned in the response in the missing_documents or errors fields.
missing_documents
object[]

Documents expected for upload but are missing.

uploaded_documents
object[]

Documents successfully uploaded.

errors
object[]

Documents that encountered errors during processing.