Settle a transaction
curl --request PATCH \
--url https://payments.oaknetwork.org/api/v1/transactions/{id}/settle \
--header 'Content-Type: application/json' \
--header 'app-key: <app-key>' \
--data '
{
"data": {
"charge_id": "<string>",
"amount": 123,
"status": "SETTLED"
}
}
'import requests
url = "https://payments.oaknetwork.org/api/v1/transactions/{id}/settle"
payload = { "data": {
"charge_id": "<string>",
"amount": 123,
"status": "SETTLED"
} }
headers = {
"app-key": "<app-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'app-key': '<app-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {charge_id: '<string>', amount: 123, status: 'SETTLED'}})
};
fetch('https://payments.oaknetwork.org/api/v1/transactions/{id}/settle', 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://payments.oaknetwork.org/api/v1/transactions/{id}/settle",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'charge_id' => '<string>',
'amount' => 123,
'status' => 'SETTLED'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"app-key: <app-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://payments.oaknetwork.org/api/v1/transactions/{id}/settle"
payload := strings.NewReader("{\n \"data\": {\n \"charge_id\": \"<string>\",\n \"amount\": 123,\n \"status\": \"SETTLED\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("app-key", "<app-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.patch("https://payments.oaknetwork.org/api/v1/transactions/{id}/settle")
.header("app-key", "<app-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"charge_id\": \"<string>\",\n \"amount\": 123,\n \"status\": \"SETTLED\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payments.oaknetwork.org/api/v1/transactions/{id}/settle")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["app-key"] = '<app-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"charge_id\": \"<string>\",\n \"amount\": 123,\n \"status\": \"SETTLED\"\n }\n}"
response = http.request(request)
puts response.read_body{
"msg": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"type": "<string>",
"provider": "<string>",
"source": {
"amount": 123,
"currency": "<string>",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"payment_method": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"chain": "<string>"
}
},
"destination": {
"amount": 123,
"currency": "<string>",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"payment_method": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"chain": "<string>"
}
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"settlement_date": "2023-11-07T05:31:56Z"
}
}{
"msg": "<string>",
"data": null,
"provider_message": "<string>"
}{
"msg": "Resource not found",
"data": null
}{
"msg": "Validation error message",
"data": null
}Transactions
Settle a transaction
Mark a transaction as settled. Requires app-key authentication.
PATCH
/
api
/
v1
/
transactions
/
{id}
/
settle
Settle a transaction
curl --request PATCH \
--url https://payments.oaknetwork.org/api/v1/transactions/{id}/settle \
--header 'Content-Type: application/json' \
--header 'app-key: <app-key>' \
--data '
{
"data": {
"charge_id": "<string>",
"amount": 123,
"status": "SETTLED"
}
}
'import requests
url = "https://payments.oaknetwork.org/api/v1/transactions/{id}/settle"
payload = { "data": {
"charge_id": "<string>",
"amount": 123,
"status": "SETTLED"
} }
headers = {
"app-key": "<app-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'app-key': '<app-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {charge_id: '<string>', amount: 123, status: 'SETTLED'}})
};
fetch('https://payments.oaknetwork.org/api/v1/transactions/{id}/settle', 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://payments.oaknetwork.org/api/v1/transactions/{id}/settle",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'charge_id' => '<string>',
'amount' => 123,
'status' => 'SETTLED'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"app-key: <app-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://payments.oaknetwork.org/api/v1/transactions/{id}/settle"
payload := strings.NewReader("{\n \"data\": {\n \"charge_id\": \"<string>\",\n \"amount\": 123,\n \"status\": \"SETTLED\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("app-key", "<app-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.patch("https://payments.oaknetwork.org/api/v1/transactions/{id}/settle")
.header("app-key", "<app-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"charge_id\": \"<string>\",\n \"amount\": 123,\n \"status\": \"SETTLED\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payments.oaknetwork.org/api/v1/transactions/{id}/settle")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["app-key"] = '<app-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"charge_id\": \"<string>\",\n \"amount\": 123,\n \"status\": \"SETTLED\"\n }\n}"
response = http.request(request)
puts response.read_body{
"msg": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"type": "<string>",
"provider": "<string>",
"source": {
"amount": 123,
"currency": "<string>",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"payment_method": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"chain": "<string>"
}
},
"destination": {
"amount": 123,
"currency": "<string>",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"payment_method": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"chain": "<string>"
}
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"settlement_date": "2023-11-07T05:31:56Z"
}
}{
"msg": "<string>",
"data": null,
"provider_message": "<string>"
}{
"msg": "Resource not found",
"data": null
}{
"msg": "Validation error message",
"data": null
}Headers
Application key for settlement authorization
Path Parameters
Transaction UID
Body
application/json
Show child attributes
Show child attributes
⌘I