Skip to main content
POST
/
bbps
/
cou
/
v1
/
billers
/
request
/
bill-payment
Bill Payment Request
curl --request POST \
  --url https://sandbox.cashfree.com/bbps/cou/v1/billers/request/bill-payment \
  --header 'Content-Type: application/json' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '
{
  "bill_payment_request": {
    "head": {
      "bill_fetch_ref_id": "HENSVVR4QOS7X1UGPY7JGUV444P10102202",
      "pg_reference_id": "PG_REF_001"
    },
    "customer": {
      "mobile": "9505987798",
      "tag": [
        {
          "name": "EMAIL",
          "value": "customer@example.com"
        }
      ]
    },
    "agent": {
      "id": "OU01AI34INT001123456",
      "device": {
        "tag": [
          {
            "name": "INITIATING_CHANNEL",
            "value": "INT"
          },
          {
            "name": "IP",
            "value": "124.170.23.22"
          }
        ]
      }
    },
    "bill_details": {
      "biller": {
        "id": "VODA00000MUM03"
      },
      "customer_params": {
        "tag": [
          {
            "name": "RefFld1",
            "value": "XX1234ABCD"
          }
        ]
      }
    },
    "biller_response": {
      "customer_name": "Manoj Chekuri",
      "amount": "120000",
      "due_date": "2021-09-24",
      "bill_date": "2021-01-02",
      "bill_number": "1232332",
      "bill_period": "MONTHLY"
    },
    "payment_method": {
      "quick_pay": "No",
      "split_pay": "No",
      "off_us_pay": "No",
      "payment_mode": "UPI"
    },
    "amount": {
      "amt": {
        "amount": "120000",
        "cust_conv_fee": "1000",
        "cou_cust_conv_fee": "1500",
        "currency": "356"
      }
    },
    "payment_information": {
      "tag": [
        {
          "name": "VPA",
          "value": "account@provider"
        }
      ]
    }
  }
}
'
import requests

url = "https://sandbox.cashfree.com/bbps/cou/v1/billers/request/bill-payment"

payload = { "bill_payment_request": {
"head": {
"bill_fetch_ref_id": "HENSVVR4QOS7X1UGPY7JGUV444P10102202",
"pg_reference_id": "PG_REF_001"
},
"customer": {
"mobile": "9505987798",
"tag": [
{
"name": "EMAIL",
"value": "customer@example.com"
}
]
},
"agent": {
"id": "OU01AI34INT001123456",
"device": { "tag": [
{
"name": "INITIATING_CHANNEL",
"value": "INT"
},
{
"name": "IP",
"value": "124.170.23.22"
}
] }
},
"bill_details": {
"biller": { "id": "VODA00000MUM03" },
"customer_params": { "tag": [
{
"name": "RefFld1",
"value": "XX1234ABCD"
}
] }
},
"biller_response": {
"customer_name": "Manoj Chekuri",
"amount": "120000",
"due_date": "2021-09-24",
"bill_date": "2021-01-02",
"bill_number": "1232332",
"bill_period": "MONTHLY"
},
"payment_method": {
"quick_pay": "No",
"split_pay": "No",
"off_us_pay": "No",
"payment_mode": "UPI"
},
"amount": { "amt": {
"amount": "120000",
"cust_conv_fee": "1000",
"cou_cust_conv_fee": "1500",
"currency": "356"
} },
"payment_information": { "tag": [
{
"name": "VPA",
"value": "account@provider"
}
] }
} }
headers = {
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
bill_payment_request: {
head: {
bill_fetch_ref_id: 'HENSVVR4QOS7X1UGPY7JGUV444P10102202',
pg_reference_id: 'PG_REF_001'
},
customer: {mobile: '9505987798', tag: [{name: 'EMAIL', value: 'customer@example.com'}]},
agent: {
id: 'OU01AI34INT001123456',
device: {
tag: [
{name: 'INITIATING_CHANNEL', value: 'INT'},
{name: 'IP', value: '124.170.23.22'}
]
}
},
bill_details: {
biller: {id: 'VODA00000MUM03'},
customer_params: {tag: [{name: 'RefFld1', value: 'XX1234ABCD'}]}
},
biller_response: {
customer_name: 'Manoj Chekuri',
amount: '120000',
due_date: '2021-09-24',
bill_date: '2021-01-02',
bill_number: '1232332',
bill_period: 'MONTHLY'
},
payment_method: {quick_pay: 'No', split_pay: 'No', off_us_pay: 'No', payment_mode: 'UPI'},
amount: {
amt: {
amount: '120000',
cust_conv_fee: '1000',
cou_cust_conv_fee: '1500',
currency: '356'
}
},
payment_information: {tag: [{name: 'VPA', value: 'account@provider'}]}
}
})
};

fetch('https://sandbox.cashfree.com/bbps/cou/v1/billers/request/bill-payment', 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/bbps/cou/v1/billers/request/bill-payment",
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([
'bill_payment_request' => [
'head' => [
'bill_fetch_ref_id' => 'HENSVVR4QOS7X1UGPY7JGUV444P10102202',
'pg_reference_id' => 'PG_REF_001'
],
'customer' => [
'mobile' => '9505987798',
'tag' => [
[
'name' => 'EMAIL',
'value' => 'customer@example.com'
]
]
],
'agent' => [
'id' => 'OU01AI34INT001123456',
'device' => [
'tag' => [
[
'name' => 'INITIATING_CHANNEL',
'value' => 'INT'
],
[
'name' => 'IP',
'value' => '124.170.23.22'
]
]
]
],
'bill_details' => [
'biller' => [
'id' => 'VODA00000MUM03'
],
'customer_params' => [
'tag' => [
[
'name' => 'RefFld1',
'value' => 'XX1234ABCD'
]
]
]
],
'biller_response' => [
'customer_name' => 'Manoj Chekuri',
'amount' => '120000',
'due_date' => '2021-09-24',
'bill_date' => '2021-01-02',
'bill_number' => '1232332',
'bill_period' => 'MONTHLY'
],
'payment_method' => [
'quick_pay' => 'No',
'split_pay' => 'No',
'off_us_pay' => 'No',
'payment_mode' => 'UPI'
],
'amount' => [
'amt' => [
'amount' => '120000',
'cust_conv_fee' => '1000',
'cou_cust_conv_fee' => '1500',
'currency' => '356'
]
],
'payment_information' => [
'tag' => [
[
'name' => 'VPA',
'value' => 'account@provider'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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/bbps/cou/v1/billers/request/bill-payment"

payload := strings.NewReader("{\n \"bill_payment_request\": {\n \"head\": {\n \"bill_fetch_ref_id\": \"HENSVVR4QOS7X1UGPY7JGUV444P10102202\",\n \"pg_reference_id\": \"PG_REF_001\"\n },\n \"customer\": {\n \"mobile\": \"9505987798\",\n \"tag\": [\n {\n \"name\": \"EMAIL\",\n \"value\": \"customer@example.com\"\n }\n ]\n },\n \"agent\": {\n \"id\": \"OU01AI34INT001123456\",\n \"device\": {\n \"tag\": [\n {\n \"name\": \"INITIATING_CHANNEL\",\n \"value\": \"INT\"\n },\n {\n \"name\": \"IP\",\n \"value\": \"124.170.23.22\"\n }\n ]\n }\n },\n \"bill_details\": {\n \"biller\": {\n \"id\": \"VODA00000MUM03\"\n },\n \"customer_params\": {\n \"tag\": [\n {\n \"name\": \"RefFld1\",\n \"value\": \"XX1234ABCD\"\n }\n ]\n }\n },\n \"biller_response\": {\n \"customer_name\": \"Manoj Chekuri\",\n \"amount\": \"120000\",\n \"due_date\": \"2021-09-24\",\n \"bill_date\": \"2021-01-02\",\n \"bill_number\": \"1232332\",\n \"bill_period\": \"MONTHLY\"\n },\n \"payment_method\": {\n \"quick_pay\": \"No\",\n \"split_pay\": \"No\",\n \"off_us_pay\": \"No\",\n \"payment_mode\": \"UPI\"\n },\n \"amount\": {\n \"amt\": {\n \"amount\": \"120000\",\n \"cust_conv_fee\": \"1000\",\n \"cou_cust_conv_fee\": \"1500\",\n \"currency\": \"356\"\n }\n },\n \"payment_information\": {\n \"tag\": [\n {\n \"name\": \"VPA\",\n \"value\": \"account@provider\"\n }\n ]\n }\n }\n}")

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

req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")

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/bbps/cou/v1/billers/request/bill-payment")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bill_payment_request\": {\n \"head\": {\n \"bill_fetch_ref_id\": \"HENSVVR4QOS7X1UGPY7JGUV444P10102202\",\n \"pg_reference_id\": \"PG_REF_001\"\n },\n \"customer\": {\n \"mobile\": \"9505987798\",\n \"tag\": [\n {\n \"name\": \"EMAIL\",\n \"value\": \"customer@example.com\"\n }\n ]\n },\n \"agent\": {\n \"id\": \"OU01AI34INT001123456\",\n \"device\": {\n \"tag\": [\n {\n \"name\": \"INITIATING_CHANNEL\",\n \"value\": \"INT\"\n },\n {\n \"name\": \"IP\",\n \"value\": \"124.170.23.22\"\n }\n ]\n }\n },\n \"bill_details\": {\n \"biller\": {\n \"id\": \"VODA00000MUM03\"\n },\n \"customer_params\": {\n \"tag\": [\n {\n \"name\": \"RefFld1\",\n \"value\": \"XX1234ABCD\"\n }\n ]\n }\n },\n \"biller_response\": {\n \"customer_name\": \"Manoj Chekuri\",\n \"amount\": \"120000\",\n \"due_date\": \"2021-09-24\",\n \"bill_date\": \"2021-01-02\",\n \"bill_number\": \"1232332\",\n \"bill_period\": \"MONTHLY\"\n },\n \"payment_method\": {\n \"quick_pay\": \"No\",\n \"split_pay\": \"No\",\n \"off_us_pay\": \"No\",\n \"payment_mode\": \"UPI\"\n },\n \"amount\": {\n \"amt\": {\n \"amount\": \"120000\",\n \"cust_conv_fee\": \"1000\",\n \"cou_cust_conv_fee\": \"1500\",\n \"currency\": \"356\"\n }\n },\n \"payment_information\": {\n \"tag\": [\n {\n \"name\": \"VPA\",\n \"value\": \"account@provider\"\n }\n ]\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.cashfree.com/bbps/cou/v1/billers/request/bill-payment")

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

request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bill_payment_request\": {\n \"head\": {\n \"bill_fetch_ref_id\": \"HENSVVR4QOS7X1UGPY7JGUV444P10102202\",\n \"pg_reference_id\": \"PG_REF_001\"\n },\n \"customer\": {\n \"mobile\": \"9505987798\",\n \"tag\": [\n {\n \"name\": \"EMAIL\",\n \"value\": \"customer@example.com\"\n }\n ]\n },\n \"agent\": {\n \"id\": \"OU01AI34INT001123456\",\n \"device\": {\n \"tag\": [\n {\n \"name\": \"INITIATING_CHANNEL\",\n \"value\": \"INT\"\n },\n {\n \"name\": \"IP\",\n \"value\": \"124.170.23.22\"\n }\n ]\n }\n },\n \"bill_details\": {\n \"biller\": {\n \"id\": \"VODA00000MUM03\"\n },\n \"customer_params\": {\n \"tag\": [\n {\n \"name\": \"RefFld1\",\n \"value\": \"XX1234ABCD\"\n }\n ]\n }\n },\n \"biller_response\": {\n \"customer_name\": \"Manoj Chekuri\",\n \"amount\": \"120000\",\n \"due_date\": \"2021-09-24\",\n \"bill_date\": \"2021-01-02\",\n \"bill_number\": \"1232332\",\n \"bill_period\": \"MONTHLY\"\n },\n \"payment_method\": {\n \"quick_pay\": \"No\",\n \"split_pay\": \"No\",\n \"off_us_pay\": \"No\",\n \"payment_mode\": \"UPI\"\n },\n \"amount\": {\n \"amt\": {\n \"amount\": \"120000\",\n \"cust_conv_fee\": \"1000\",\n \"cou_cust_conv_fee\": \"1500\",\n \"currency\": \"356\"\n }\n },\n \"payment_information\": {\n \"tag\": [\n {\n \"name\": \"VPA\",\n \"value\": \"account@provider\"\n }\n ]\n }\n }\n}"

response = http.request(request)
puts response.read_body
{
  "status": "ACCEPTED",
  "message": "Bill payment request accepted for processing",
  "data": {
    "bill_fetch_ref_id": "HENSVVR4QOS7X1UGPY7JGUV444P10102202",
    "transaction_ref_id": "OU011010ABCD12345678",
    "status": "PROCESSING"
  }
}
{
"message": "bill_fetch_request.agent_id : is missing in the request. Value received: ",
"code": "bill_fetch_request.agent_id_missing",
"type": "invalid_request_error"
}
{
"message": "authentication Failed",
"code": "request_failed",
"type": "authentication_error"
}
{
"message": "Too many requests from IP. Check headers",
"code": "request_failed",
"type": "rate_limit_error"
}
{
"message": "internal Server Error",
"code": "internal_error",
"type": "api_error"
}

Authorizations

x-client-id
string
header
required

Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.

x-client-secret
string
header
required

Your unique client secret issued by Cashfree. Keep this confidential and never expose it in client-side code. You can find this in your Merchant Dashboard.

Body

application/json

Request parameters to initiate a bill payment request.

bill_payment_request
object
required

Response

Success response for initiating a bill payment request.

status
string

Always "ACCEPTED" when the payment request is successfully queued.

Example:

"ACCEPTED"

message
string

Human-readable confirmation that the payment request has been accepted for async processing.

Example:

"Bill payment request accepted for processing"

data
object

Acknowledgement data returned immediately upon request acceptance.