Update wallet balance
curl --request PATCH \
--url https://api.example.com/wallets/{id}/balance \
--header 'Content-Type: application/json' \
--data '
{
"action": "credit",
"amount": 1000
}
'import requests
url = "https://api.example.com/wallets/{id}/balance"
payload = {
"action": "credit",
"amount": 1000
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({action: 'credit', amount: 1000})
};
fetch('https://api.example.com/wallets/{id}/balance', 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://api.example.com/wallets/{id}/balance",
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([
'action' => 'credit',
'amount' => 1000
]),
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://api.example.com/wallets/{id}/balance"
payload := strings.NewReader("{\n \"action\": \"credit\",\n \"amount\": 1000\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/wallets/{id}/balance")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"credit\",\n \"amount\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wallets/{id}/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"credit\",\n \"amount\": 1000\n}"
response = http.request(request)
puts response.read_body{
"data": {
"account_id": "c2f9e33c-7f28-402b-974f-493546f11f2b",
"amount": {
"amount": 1000,
"currency": "USD"
},
"correlation_id": "9f7d3278-71f4-44b0-968d-99ef6c0e983d",
"created_at": "2025-08-08T11:17:34Z",
"customer_id": "0997de13-834c-4cc5-88ca-ca321730c938",
"description": "Id consequatur distinctio et!",
"destination": null,
"error": null,
"fee": {
"amount": 0,
"currency": "USD"
},
"id": "48160506-2dbb-4f7d-ab2f-09af335aca1d",
"metadata": {},
"reference": null,
"source": null,
"type": "credit",
"updated_at": "2025-08-08T11:17:34Z",
"wallet_id": "c4f43392-1438-4ab4-8d85-5327f34ca238"
}
}{}wallets
Update wallet balance
PATCH
/
wallets
/
{id}
/
balance
Update wallet balance
curl --request PATCH \
--url https://api.example.com/wallets/{id}/balance \
--header 'Content-Type: application/json' \
--data '
{
"action": "credit",
"amount": 1000
}
'import requests
url = "https://api.example.com/wallets/{id}/balance"
payload = {
"action": "credit",
"amount": 1000
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({action: 'credit', amount: 1000})
};
fetch('https://api.example.com/wallets/{id}/balance', 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://api.example.com/wallets/{id}/balance",
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([
'action' => 'credit',
'amount' => 1000
]),
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://api.example.com/wallets/{id}/balance"
payload := strings.NewReader("{\n \"action\": \"credit\",\n \"amount\": 1000\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/wallets/{id}/balance")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"credit\",\n \"amount\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wallets/{id}/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"credit\",\n \"amount\": 1000\n}"
response = http.request(request)
puts response.read_body{
"data": {
"account_id": "c2f9e33c-7f28-402b-974f-493546f11f2b",
"amount": {
"amount": 1000,
"currency": "USD"
},
"correlation_id": "9f7d3278-71f4-44b0-968d-99ef6c0e983d",
"created_at": "2025-08-08T11:17:34Z",
"customer_id": "0997de13-834c-4cc5-88ca-ca321730c938",
"description": "Id consequatur distinctio et!",
"destination": null,
"error": null,
"fee": {
"amount": 0,
"currency": "USD"
},
"id": "48160506-2dbb-4f7d-ab2f-09af335aca1d",
"metadata": {},
"reference": null,
"source": null,
"type": "credit",
"updated_at": "2025-08-08T11:17:34Z",
"wallet_id": "c4f43392-1438-4ab4-8d85-5327f34ca238"
}
}{}Body
application/json
Update wallet balance params
Response
Transaction
Response schema for a transaction
Transaction details
Show child attributes
Show child attributes
Example:
{
"account_id": "c2f9e33c-7f28-402b-974f-493546f11f2b",
"amount": { "amount": 1000, "currency": "USD" },
"correlation_id": "9f7d3278-71f4-44b0-968d-99ef6c0e983d",
"created_at": "2025-08-08T11:17:34Z",
"customer_id": "0997de13-834c-4cc5-88ca-ca321730c938",
"description": "Id consequatur distinctio et!",
"destination": null,
"error": null,
"fee": { "amount": 0, "currency": "USD" },
"id": "48160506-2dbb-4f7d-ab2f-09af335aca1d",
"metadata": {},
"reference": null,
"source": null,
"type": "credit",
"updated_at": "2025-08-08T11:17:34Z",
"wallet_id": "c4f43392-1438-4ab4-8d85-5327f34ca238"
}
⌘I