curl --request POST \
--url https://{partner_host}/registered_url_for_receipt_payment_requested_events \
--header 'Content-Type: application/json' \
--data '
{
"service": "appointment",
"event": "receipt_payment.requested",
"event_time": 1784875356443,
"transaction_id": "d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443",
"timestamp": 0,
"business_id": "7178133497043052",
"data": {
"appointment_id": "d-486ddbf4-a22b-4266-8420-167191b7d370",
"doctor_id": "do1783067124676",
"patient_id": "178487533949192",
"net_amount": 850,
"url": "https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf"
},
"client_id": ""
}
'import requests
url = "https://{partner_host}/registered_url_for_receipt_payment_requested_events"
payload = {
"service": "appointment",
"event": "receipt_payment.requested",
"event_time": 1784875356443,
"transaction_id": "d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443",
"timestamp": 0,
"business_id": "7178133497043052",
"data": {
"appointment_id": "d-486ddbf4-a22b-4266-8420-167191b7d370",
"doctor_id": "do1783067124676",
"patient_id": "178487533949192",
"net_amount": 850,
"url": "https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf"
},
"client_id": ""
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
service: 'appointment',
event: 'receipt_payment.requested',
event_time: 1784875356443,
transaction_id: 'd-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443',
timestamp: 0,
business_id: '7178133497043052',
data: {
appointment_id: 'd-486ddbf4-a22b-4266-8420-167191b7d370',
doctor_id: 'do1783067124676',
patient_id: '178487533949192',
net_amount: 850,
url: 'https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf'
},
client_id: ''
})
};
fetch('https://{partner_host}/registered_url_for_receipt_payment_requested_events', 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://{partner_host}/registered_url_for_receipt_payment_requested_events",
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([
'service' => 'appointment',
'event' => 'receipt_payment.requested',
'event_time' => 1784875356443,
'transaction_id' => 'd-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443',
'timestamp' => 0,
'business_id' => '7178133497043052',
'data' => [
'appointment_id' => 'd-486ddbf4-a22b-4266-8420-167191b7d370',
'doctor_id' => 'do1783067124676',
'patient_id' => '178487533949192',
'net_amount' => 850,
'url' => 'https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf'
],
'client_id' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://{partner_host}/registered_url_for_receipt_payment_requested_events"
payload := strings.NewReader("{\n \"service\": \"appointment\",\n \"event\": \"receipt_payment.requested\",\n \"event_time\": 1784875356443,\n \"transaction_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443\",\n \"timestamp\": 0,\n \"business_id\": \"7178133497043052\",\n \"data\": {\n \"appointment_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370\",\n \"doctor_id\": \"do1783067124676\",\n \"patient_id\": \"178487533949192\",\n \"net_amount\": 850,\n \"url\": \"https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf\"\n },\n \"client_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://{partner_host}/registered_url_for_receipt_payment_requested_events")
.header("Content-Type", "application/json")
.body("{\n \"service\": \"appointment\",\n \"event\": \"receipt_payment.requested\",\n \"event_time\": 1784875356443,\n \"transaction_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443\",\n \"timestamp\": 0,\n \"business_id\": \"7178133497043052\",\n \"data\": {\n \"appointment_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370\",\n \"doctor_id\": \"do1783067124676\",\n \"patient_id\": \"178487533949192\",\n \"net_amount\": 850,\n \"url\": \"https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf\"\n },\n \"client_id\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_receipt_payment_requested_events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"service\": \"appointment\",\n \"event\": \"receipt_payment.requested\",\n \"event_time\": 1784875356443,\n \"transaction_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443\",\n \"timestamp\": 0,\n \"business_id\": \"7178133497043052\",\n \"data\": {\n \"appointment_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370\",\n \"doctor_id\": \"do1783067124676\",\n \"patient_id\": \"178487533949192\",\n \"net_amount\": 850,\n \"url\": \"https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf\"\n },\n \"client_id\": \"\"\n}"
response = http.request(request)
puts response.read_bodyPayment Link Requested
When a payment link is requested against an appointment, a webhook event is sent to the registered endpoint containing the appointment ID, doctor ID, patient ID, net amount and the payment checkout URL.
The receiving system can share the url with the patient to let them complete the payment, or use the other identifiers to reconcile the request in their own system.
Field Definitions
• service: string - The type of service. For this event, this will be appointment.
• event: string - The type of event. For a payment link request, this will be receipt_payment.requested.
• event_time: integer - Event occurrence timestamp in milliseconds.
• transaction_id: string - Unique transaction identifier for the event.
• timestamp: integer - Timestamp of the event.
• business_id: string - The eka ID of the business.
• client_id: string - Client ID associated with the event.
• data: object - Contains detailed information about the payment request.
• appointment_id: string - Unique identifier for the appointment.
• doctor_id: string - Unique identifier for the doctor.
• patient_id: string - Unique identifier for the patient.
• net_amount: number - Net payable amount for which the payment link is generated.
• url: string - Payment checkout URL to be shared with the patient to complete the payment.
Example Webhook Request
Endpoint: https://your-registered-webhook-url.com
Method: POST
curl --request POST \
--url https://{partner_host}/registered_url_for_receipt_payment_requested_events \
--header 'Content-Type: application/json' \
--data '
{
"service": "appointment",
"event": "receipt_payment.requested",
"event_time": 1784875356443,
"transaction_id": "d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443",
"timestamp": 0,
"business_id": "7178133497043052",
"data": {
"appointment_id": "d-486ddbf4-a22b-4266-8420-167191b7d370",
"doctor_id": "do1783067124676",
"patient_id": "178487533949192",
"net_amount": 850,
"url": "https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf"
},
"client_id": ""
}
'import requests
url = "https://{partner_host}/registered_url_for_receipt_payment_requested_events"
payload = {
"service": "appointment",
"event": "receipt_payment.requested",
"event_time": 1784875356443,
"transaction_id": "d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443",
"timestamp": 0,
"business_id": "7178133497043052",
"data": {
"appointment_id": "d-486ddbf4-a22b-4266-8420-167191b7d370",
"doctor_id": "do1783067124676",
"patient_id": "178487533949192",
"net_amount": 850,
"url": "https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf"
},
"client_id": ""
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
service: 'appointment',
event: 'receipt_payment.requested',
event_time: 1784875356443,
transaction_id: 'd-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443',
timestamp: 0,
business_id: '7178133497043052',
data: {
appointment_id: 'd-486ddbf4-a22b-4266-8420-167191b7d370',
doctor_id: 'do1783067124676',
patient_id: '178487533949192',
net_amount: 850,
url: 'https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf'
},
client_id: ''
})
};
fetch('https://{partner_host}/registered_url_for_receipt_payment_requested_events', 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://{partner_host}/registered_url_for_receipt_payment_requested_events",
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([
'service' => 'appointment',
'event' => 'receipt_payment.requested',
'event_time' => 1784875356443,
'transaction_id' => 'd-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443',
'timestamp' => 0,
'business_id' => '7178133497043052',
'data' => [
'appointment_id' => 'd-486ddbf4-a22b-4266-8420-167191b7d370',
'doctor_id' => 'do1783067124676',
'patient_id' => '178487533949192',
'net_amount' => 850,
'url' => 'https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf'
],
'client_id' => ''
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://{partner_host}/registered_url_for_receipt_payment_requested_events"
payload := strings.NewReader("{\n \"service\": \"appointment\",\n \"event\": \"receipt_payment.requested\",\n \"event_time\": 1784875356443,\n \"transaction_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443\",\n \"timestamp\": 0,\n \"business_id\": \"7178133497043052\",\n \"data\": {\n \"appointment_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370\",\n \"doctor_id\": \"do1783067124676\",\n \"patient_id\": \"178487533949192\",\n \"net_amount\": 850,\n \"url\": \"https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf\"\n },\n \"client_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://{partner_host}/registered_url_for_receipt_payment_requested_events")
.header("Content-Type", "application/json")
.body("{\n \"service\": \"appointment\",\n \"event\": \"receipt_payment.requested\",\n \"event_time\": 1784875356443,\n \"transaction_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443\",\n \"timestamp\": 0,\n \"business_id\": \"7178133497043052\",\n \"data\": {\n \"appointment_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370\",\n \"doctor_id\": \"do1783067124676\",\n \"patient_id\": \"178487533949192\",\n \"net_amount\": 850,\n \"url\": \"https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf\"\n },\n \"client_id\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{partner_host}/registered_url_for_receipt_payment_requested_events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"service\": \"appointment\",\n \"event\": \"receipt_payment.requested\",\n \"event_time\": 1784875356443,\n \"transaction_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443\",\n \"timestamp\": 0,\n \"business_id\": \"7178133497043052\",\n \"data\": {\n \"appointment_id\": \"d-486ddbf4-a22b-4266-8420-167191b7d370\",\n \"doctor_id\": \"do1783067124676\",\n \"patient_id\": \"178487533949192\",\n \"net_amount\": 850,\n \"url\": \"https://payment.eka.care/payment_checkout?transaction_id=345rjeklfsdf\"\n },\n \"client_id\": \"\"\n}"
response = http.request(request)
puts response.read_bodyBody
Type of service
"appointment"
Type of event
receipt_payment.requested "receipt_payment.requested"
Event occurrence timestamp in milliseconds
1784875356443
Unique transaction identifier for the event
"d-486ddbf4-a22b-4266-8420-167191b7d370:receipt_payment.requested:1784875356443"
Timestamp of the event
0
Business ID for the payment request
"7178133497043052"
Show child attributes
Show child attributes
Client ID for the payment request
""
Response
Was this page helpful?

