Recover Transaction (deprecated)
curl --request POST \
--url https://api.example.com/v1/transactions/{operationId}/recoverimport requests
url = "https://api.example.com/v1/transactions/{operationId}/recover"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/transactions/{operationId}/recover', 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/v1/transactions/{operationId}/recover",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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 := "https://api.example.com/v1/transactions/{operationId}/recover"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/transactions/{operationId}/recover")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/transactions/{operationId}/recover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyTransactions
Recover Transaction (deprecated)
POST /v1/transactions/:operationId/recover — Deprecated alias of Submit Hash
POST
/
v1
/
transactions
/
{operationId}
/
recover
Recover Transaction (deprecated)
curl --request POST \
--url https://api.example.com/v1/transactions/{operationId}/recoverimport requests
url = "https://api.example.com/v1/transactions/{operationId}/recover"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/transactions/{operationId}/recover', 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/v1/transactions/{operationId}/recover",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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 := "https://api.example.com/v1/transactions/{operationId}/recover"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/transactions/{operationId}/recover")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/transactions/{operationId}/recover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyEndpoint:
POST https://api.rebelfi.io/v1/transactions/:operationId/recoverDeprecated. Use Submit Hash instead. Recover is now an alias of Submit
Hash: the same checks and the same record; only the reply’s shape differs. The SDK method
transactions.recover() is
deprecated and will be removed, with this endpoint, in SDK 2.0.0.submit-hash (for example, your application stopped after
broadcasting). RebelFi records it only if it is the transaction planned for the operation, exactly as Submit Hash does,
including on an EXPIRED or CANCELLED operation whose transaction landed late.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
operationId | number | Yes | Operation ID the transaction belongs to |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
txHash | string | Yes | On-chain transaction hash that was broadcast |
transactionId | number | No | The transaction (from the operation’s transactions) this hash is for. If omitted, RebelFi matches the hash against the operation’s transactions still waiting, in order. |
Example Request
curl -X POST "https://api.rebelfi.io/v1/transactions/123/recover" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"txHash": "5UfD...xyz"
}'
// Deprecated: prefer client.transactions.submitHash({ operationId: 123, txHash: '5UfD...xyz' })
const result = await client.transactions.recover(123, {
txHash: '5UfD...xyz'
});
Example Response
{
"success": true,
"transactionId": 456,
"txHash": "5UfD...xyz",
"verified": true
}
verified has the same meaning as in Submit Hash: false
means the transaction is not visible on chain yet and RebelFi records it once it appears.
Errors
The same as Submit Hash:| Code | HTTP | Description |
|---|---|---|
OPERATION_NOT_FOUND | 404 | Operation ID doesn’t exist |
TRANSACTION_MISMATCH | 400 | Not the transaction planned for this operation. Nothing is recorded |
VALIDATION_FAILED | 400 | Malformed hash, unknown transactionId, hash already recorded for another transaction, or an operation that takes no hash (including CONFIRMED and FAILED, which earlier returned INVALID_OPERATION_STATUS) |