Refund Transaction
POST
Refund Transaction
Authorizations
Path Parameters
Example:
"txn_5bbbe4d3-2d82-4da1-8191-aaa491d025de"
Response
201 - application/json; charset=utf-8
Created
Example:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url http://localhost:5001/refund-transaction/{id} \
--header 'X-blnk-key: <api-key>'import requests
url = "http://localhost:5001/refund-transaction/{id}"
headers = {"X-blnk-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-blnk-key': '<api-key>'}};
fetch('http://localhost:5001/refund-transaction/{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_PORT => "5001",
CURLOPT_URL => "http://localhost:5001/refund-transaction/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-blnk-key: <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"
"net/http"
"io"
)
func main() {
url := "http://localhost:5001/refund-transaction/{id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-blnk-key", "<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("http://localhost:5001/refund-transaction/{id}")
.header("X-blnk-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:5001/refund-transaction/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["X-blnk-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "txn_043d4ac3-4caf-4149-9c0d-927ae637d83f",
"tag": "Refund",
"reference": "ref_70ffd90f-7bcf-43b8-90ba-70505c113b52",
"amount": 300,
"currency": "NGN",
"payment_method": "",
"description": "",
"drcr": "Debit",
"status": "APPLIED",
"ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
"balance_id": "bln_0be360ca-86fe-457d-be43-daa3f966d8f0",
"credit_balance_before": 600,
"debit_balance_before": 0,
"credit_balance_after": 600,
"debit_balance_after": 300,
"balance_before": 600,
"balance_after": 300,
"created_at": "2024-02-20T05:40:52.630481718Z",
"scheduled_for": "0001-01-01T00:00:00Z",
"risk_tolerance_threshold": 0,
"risk_score": 0.03108,
"meta_data": {
"refunded_transaction_id": "txn_5bbbe4d3-2d82-4da1-8191-aaa491d025de"
},
"group_ids": null
}"txn_5bbbe4d3-2d82-4da1-8191-aaa491d025de"
Created
Show child attributes
{
"refunded_transaction_id": "txn_5bbbe4d3-2d82-4da1-8191-aaa491d025de"
}
Was this page helpful?
curl --request POST \
--url http://localhost:5001/refund-transaction/{id} \
--header 'X-blnk-key: <api-key>'import requests
url = "http://localhost:5001/refund-transaction/{id}"
headers = {"X-blnk-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-blnk-key': '<api-key>'}};
fetch('http://localhost:5001/refund-transaction/{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_PORT => "5001",
CURLOPT_URL => "http://localhost:5001/refund-transaction/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-blnk-key: <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"
"net/http"
"io"
)
func main() {
url := "http://localhost:5001/refund-transaction/{id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-blnk-key", "<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("http://localhost:5001/refund-transaction/{id}")
.header("X-blnk-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:5001/refund-transaction/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["X-blnk-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "txn_043d4ac3-4caf-4149-9c0d-927ae637d83f",
"tag": "Refund",
"reference": "ref_70ffd90f-7bcf-43b8-90ba-70505c113b52",
"amount": 300,
"currency": "NGN",
"payment_method": "",
"description": "",
"drcr": "Debit",
"status": "APPLIED",
"ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
"balance_id": "bln_0be360ca-86fe-457d-be43-daa3f966d8f0",
"credit_balance_before": 600,
"debit_balance_before": 0,
"credit_balance_after": 600,
"debit_balance_after": 300,
"balance_before": 600,
"balance_after": 300,
"created_at": "2024-02-20T05:40:52.630481718Z",
"scheduled_for": "0001-01-01T00:00:00Z",
"risk_tolerance_threshold": 0,
"risk_score": 0.03108,
"meta_data": {
"refunded_transaction_id": "txn_5bbbe4d3-2d82-4da1-8191-aaa491d025de"
},
"group_ids": null
}