Skip to main content
POST
/
payout
/
v1
/
selfWithdrawal
Self Withdrawal
curl --request POST \
  --url https://payout-api.cashfree.com/payout/v1/selfWithdrawal \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "withdrawalId": "<string>",
  "amount": 123,
  "remarks": "<string>"
}
'
import requests

url = "https://payout-api.cashfree.com/payout/v1/selfWithdrawal"

payload = {
"withdrawalId": "<string>",
"amount": 123,
"remarks": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({withdrawalId: '<string>', amount: 123, remarks: '<string>'})
};

fetch('https://payout-api.cashfree.com/payout/v1/selfWithdrawal', 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://payout-api.cashfree.com/payout/v1/selfWithdrawal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'withdrawalId' => '<string>',
'amount' => 123,
'remarks' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);

$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://payout-api.cashfree.com/payout/v1/selfWithdrawal"

payload := strings.NewReader("{\n \"withdrawalId\": \"<string>\",\n \"amount\": 123,\n \"remarks\": \"<string>\"\n}")

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

req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://payout-api.cashfree.com/payout/v1/selfWithdrawal")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"withdrawalId\": \"<string>\",\n \"amount\": 123,\n \"remarks\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://payout-api.cashfree.com/payout/v1/selfWithdrawal")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"withdrawalId\": \"<string>\",\n \"amount\": 123,\n \"remarks\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "status": "SUCCESS",
  "message": "Request submitted successfully. Withdrawal Id : W55",
  "statusCode": "200"
}
{}
{
"status": "ERROR",
"subCode": "403",
"message": "APIs not enabled. Please fill out the [Support Form](https://merchant.cashfree.com/merchants/landing?env=prod&raise_issue=1)"
}
Please use this Authorization token in headers to call any payout API (Refresh this page if the token is expired)
Sub codeStatusMessageNext action
200SUCCESS-
403ERRORToken is not validVerify the generated token.
412ERRORwithdrawalId missing in the requestEnter a withdrawal ID.
412ERRORToken missing in the requestEnter the generated token as the value for Authorization under Headers

Headers

Authorization
string
required

Bearer auth token

Content-Type
string
required

application/json

Body

application/json
withdrawalId
string
required

Unique identifier for the withdrawal, alphanumeric allowed (50 character limit)

amount
number<float>
required

Amount to be withdrawn, decimal (>= 1.00)

remarks
string

Remarks, if any. Alphanumeric and white space (70 character limit)

Response

200

status
string
Example:

"SUCCESS"

message
string
Example:

"Request submitted successfully. Withdrawal Id : W55"

statusCode
string
Example:

"200"