curl --request POST \
--url https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund \
--header 'Content-Type: application/json' \
--data '
{
"recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91"
}
'import requests
url = "https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund"
payload = { "recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({recipient: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'})
};
fetch('https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund', 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://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipient' => '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
]),
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://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund"
payload := strings.NewReader("{\n \"recipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\"\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(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund")
.header("Content-Type", "application/json")
.body("{\n \"recipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund")
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 \"recipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"transactionHash": "<string>",
"amount": "<string>"
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Refund a refundable deposit by id
Transfer the funds from a failed, rejected, or ignored deposit back to a caller-provided address on the same chain, addressing the deposit by the stable id returned by GET /deposits. Authenticate with an x-api-key (write scope) or a Bearer platform token. Scoped to the caller’s tenant: an unknown id and another tenant’s id are both a 404. The deposit must be failed, rejected, or ignored; delayed remains refundable through the admin endpoint only.
curl --request POST \
--url https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund \
--header 'Content-Type: application/json' \
--data '
{
"recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91"
}
'import requests
url = "https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund"
payload = { "recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({recipient: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'})
};
fetch('https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund', 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://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipient' => '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
]),
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://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund"
payload := strings.NewReader("{\n \"recipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\"\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(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund")
.header("Content-Type", "application/json")
.body("{\n \"recipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.orchestrator.rhinestone.dev/deposit-processor/deposits/{id}/refund")
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 \"recipient\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"transactionHash": "<string>",
"amount": "<string>"
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Headers
API key for authentication (omit when sending Authorization)
"your-api-key"
Bearer platform token (e.g. forwarded by user-service). Takes precedence over x-api-key when both are present.
"Bearer eyJhbGciOi..."
Path Parameters
Deposit id. Returned by GET /deposits.
^\d+$"12345"
Body
Address to receive the refunded tokens (EVM address or Solana public key).
1"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91"
Was this page helpful?