curl --request POST \
--url https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"raindropAmount": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption"
payload = {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"raindropAmount": "<string>",
"reason": "<string>"
}
headers = {
"idempotency-key": "<idempotency-key>",
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
'Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
raindropAmount: '<string>',
reason: '<string>'
})
};
fetch('https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption', 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-dev.rain.xyz/v1/issuing/raindrops/custom-redemption",
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([
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'raindropAmount' => '<string>',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json",
"idempotency-key: <idempotency-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://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption"
payload := strings.NewReader("{\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"raindropAmount\": \"<string>\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Api-Key", "<api-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.post("https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption")
.header("idempotency-key", "<idempotency-key>")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"raindropAmount\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"raindropAmount\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"redemptionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redemptionType": "CUSTOM",
"raindropAmount": "<string>",
"status": "PENDING"
}Create a custom redemption
Creates a partner-initiated custom redemption with the partner-supplied reason. Behavior depends on the tenant points mode. PARTNER_OFFCHAIN checks and debits the off-chain rewards balance and records a completed CUSTOM redemption with no on-chain burn and no webhook, returning COMPLETED. RAIN_MANAGED checks the available balance, reserves a PENDING CUSTOM redemption, and sends the raindrop_redemption.created webhook so the user can authorize an on-chain burn; the redemption then settles PENDING → PROCESSING → COMPLETED via the burn-event flow, and the endpoint returns PENDING. PARTNER_ONCHAIN tenants receive 405. Requires an idempotency-key header so retries replay the same 201 response.
curl --request POST \
--url https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"raindropAmount": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption"
payload = {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"raindropAmount": "<string>",
"reason": "<string>"
}
headers = {
"idempotency-key": "<idempotency-key>",
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
'Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
raindropAmount: '<string>',
reason: '<string>'
})
};
fetch('https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption', 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-dev.rain.xyz/v1/issuing/raindrops/custom-redemption",
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([
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'raindropAmount' => '<string>',
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json",
"idempotency-key: <idempotency-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://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption"
payload := strings.NewReader("{\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"raindropAmount\": \"<string>\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Api-Key", "<api-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.post("https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption")
.header("idempotency-key", "<idempotency-key>")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"raindropAmount\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/issuing/raindrops/custom-redemption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"raindropAmount\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"redemptionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"redemptionType": "CUSTOM",
"raindropAmount": "<string>",
"status": "PENDING"
}Authorizations
Headers
Required retry key for this redemption. Reusing the same key and body replays the cached 201 response. Maximum 64 characters.
1 - 64Body
Custom redemption request
Response
Custom redemption created successfully
The ID of the created redemption
The type of redemption
CUSTOM The number of points redeemed, as a string
The current status of the redemption. PARTNER_OFFCHAIN redemptions are recorded as COMPLETED; RAIN_MANAGED redemptions return PENDING and settle on-chain.
PENDING, COMPLETED