> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.littglobal.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.littglobal.com/_mcp/server.

# Reverse Wallet Balance

POST TBD/api/v2/users/reverse-wallet-balance
Content-Type: application/json

This API endpoint lets a partner take back a wallet load it made with Add Wallet Balance, for example to reverse an unused conversion. It is called server to server: it is restricted to the partner's IP addresses and does not use a user API token.

Each load can be reversed once, in full. Repeating the request returns the original reversal.

### Request Body

- `user_id` (string): The member's user ID.
    
- `transaction_reference` (string): The reference used when the wallet was loaded.
    

### Response

The reversal wallet transaction. The fields a partner needs:

- `transaction_id` (string): The ID of the reversal transaction.
    
- `from` (string): The member's user ID.
    
- `amount` (string): The amount taken back.
    
- `transaction_type` (string): `30` (Partner wallet load reversal).
    
- `related_transaction_id` (string): The `transaction_id` of the load it reverses.
    
- `description` (string): Copied from the load.
    
- `created_at` (string): When the load was reversed.
    

`status` is `error`, with a `message` explaining why, when no load was made with this reference for the member, or when the member's wallet balance no longer covers the full amount (already spent). Nothing is reversed in either case.

Reference: https://docs.littglobal.com/litt-white-label/api-reference/digital-wallet/reverse-wallet-balance

## Request

### Body (application/json)

This endpoint expects an object.

- `api` (string, optional)
- `data` (ApiV2UsersReverseWalletBalancePostRequestBodyContentApplicationJsonSchemaData, optional)

## Response

### 200

Reverse Wallet Balance

- `message` (string, optional)
- `api` (string, optional)
- `status` (string, optional)
- `data` (ApiV2UsersReverseWalletBalancePostResponsesContentApplicationJsonSchemaData, optional)

## Types

### ApiV2UsersReverseWalletBalancePostRequestBodyContentApplicationJsonSchemaData

- `user_id` (string, optional)
- `transaction_reference` (string, optional)

### ApiV2UsersReverseWalletBalancePostResponsesContentApplicationJsonSchemaData

- `transaction_id` (string, optional)
- `from` (string, optional)
- `to` (string, optional)
- `amount` (string, optional)
- `invoice_id` (any, optional, nullable)
- `currency_id` (integer, optional)
- `exchange_rate` (double, optional)
- `original_amount` (string, optional)
- `original_currency_id` (integer, optional)
- `original_exchange_rate` (double, optional)
- `commission_percentage` (any, optional, nullable)
- `commission` (any, optional, nullable)
- `commission_discount` (any, optional, nullable)
- `net` (any, optional, nullable)
- `loyalty_percentage` (any, optional, nullable)
- `loyalty_min_transaction` (string, optional)
- `loyalty_max_cashback` (string, optional)
- `loyalty_cashback_status` (integer, optional)
- `promotion` (any, optional, nullable)
- `related_transaction_id` (string, optional)
- `disbursement_id` (any, optional, nullable)
- `transaction_type` (string, optional)
- `description` (string, optional)
- `external_request` (string, optional)
- `external_transaction_reference` (any, optional, nullable)
- `created_at` (datetime, optional)
- `updated_at` (datetime, optional)

## Examples

**Request**

```json
{
  "api": "reverse-wallet-balance",
  "data": {
    "user_id": "2ef350a0-f8cd-4730-8e29-9b5fc5db0ada",
    "transaction_reference": "PARTNER-LOAD-123"
  }
}
```

**Response**

```json
{
  "message": "Success",
  "api": "reverse-wallet-balance",
  "status": "success",
  "data": {
    "transaction_id": "7ed524d7-e50f-4670-bb65-8c57b92b90c4",
    "from": "2ef350a0-f8cd-4730-8e29-9b5fc5db0ada",
    "to": "Partner",
    "amount": "10.00",
    "invoice_id": null,
    "currency_id": 1,
    "exchange_rate": 1.000001,
    "original_amount": "10.00",
    "original_currency_id": 1,
    "original_exchange_rate": 1.000001,
    "commission_percentage": null,
    "commission": null,
    "commission_discount": null,
    "net": null,
    "loyalty_percentage": null,
    "loyalty_min_transaction": "0.00",
    "loyalty_max_cashback": "0.00",
    "loyalty_cashback_status": 1,
    "promotion": null,
    "related_transaction_id": "2009f771-dd56-45b9-8de6-fdec8ddc5e23",
    "disbursement_id": null,
    "transaction_type": "30",
    "description": "Points redemption",
    "external_request": "{\"api\":\"reverse-wallet-balance\",\"data\":{\"user_id\":\"2ef350a0-f8cd-4730-8e29-9b5fc5db0ada\",\"transaction_reference\":\"PARTNER-LOAD-123\"}}",
    "external_transaction_reference": null,
    "created_at": "2026-11-03T01:15:15.000000Z",
    "updated_at": "2026-11-03T01:15:15.000000Z"
  }
}
```

**SDK Code**

```python Digital Wallet_reverseWalletBalance_example
import requests

url = "https://tbd/api/v2/users/reverse-wallet-balance"

payload = {
    "api": "reverse-wallet-balance",
    "data": {
        "user_id": "2ef350a0-f8cd-4730-8e29-9b5fc5db0ada",
        "transaction_reference": "PARTNER-LOAD-123"
    }
}
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Digital Wallet_reverseWalletBalance_example
const url = 'https://tbd/api/v2/users/reverse-wallet-balance';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"api":"reverse-wallet-balance","data":{"user_id":"2ef350a0-f8cd-4730-8e29-9b5fc5db0ada","transaction_reference":"PARTNER-LOAD-123"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Digital Wallet_reverseWalletBalance_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tbd/api/v2/users/reverse-wallet-balance"

	payload := strings.NewReader("{\n  \"api\": \"reverse-wallet-balance\",\n  \"data\": {\n    \"user_id\": \"2ef350a0-f8cd-4730-8e29-9b5fc5db0ada\",\n    \"transaction_reference\": \"PARTNER-LOAD-123\"\n  }\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(res)
	fmt.Println(string(body))

}
```

```ruby Digital Wallet_reverseWalletBalance_example
require 'uri'
require 'net/http'

url = URI("https://tbd/api/v2/users/reverse-wallet-balance")

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  \"api\": \"reverse-wallet-balance\",\n  \"data\": {\n    \"user_id\": \"2ef350a0-f8cd-4730-8e29-9b5fc5db0ada\",\n    \"transaction_reference\": \"PARTNER-LOAD-123\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Digital Wallet_reverseWalletBalance_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tbd/api/v2/users/reverse-wallet-balance")
  .header("Content-Type", "application/json")
  .body("{\n  \"api\": \"reverse-wallet-balance\",\n  \"data\": {\n    \"user_id\": \"2ef350a0-f8cd-4730-8e29-9b5fc5db0ada\",\n    \"transaction_reference\": \"PARTNER-LOAD-123\"\n  }\n}")
  .asString();
```

```php Digital Wallet_reverseWalletBalance_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tbd/api/v2/users/reverse-wallet-balance', [
  'body' => '{
  "api": "reverse-wallet-balance",
  "data": {
    "user_id": "2ef350a0-f8cd-4730-8e29-9b5fc5db0ada",
    "transaction_reference": "PARTNER-LOAD-123"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Digital Wallet_reverseWalletBalance_example
using RestSharp;

var client = new RestClient("https://tbd/api/v2/users/reverse-wallet-balance");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"api\": \"reverse-wallet-balance\",\n  \"data\": {\n    \"user_id\": \"2ef350a0-f8cd-4730-8e29-9b5fc5db0ada\",\n    \"transaction_reference\": \"PARTNER-LOAD-123\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Digital Wallet_reverseWalletBalance_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "api": "reverse-wallet-balance",
  "data": [
    "user_id": "2ef350a0-f8cd-4730-8e29-9b5fc5db0ada",
    "transaction_reference": "PARTNER-LOAD-123"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tbd/api/v2/users/reverse-wallet-balance")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```