Execute an off-ramp transaction
curl --request POST \
--url https://api.sandbox.capa.fi/api/partner/v2/off-ramp/execute \
--header 'Content-Type: application/json' \
--header 'partner-api-key: <api-key>' \
--data '
{
"transactionId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"transactionHash": "0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0"
}
'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/off-ramp/execute"
payload = {
"transactionId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"transactionHash": "0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0"
}
headers = {
"partner-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'partner-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transactionId: '8374f327-38bd-4b0b-b8a7-2524599eb903',
transactionHash: '0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0'
})
};
fetch('https://api.sandbox.capa.fi/api/partner/v2/off-ramp/execute', 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.sandbox.capa.fi/api/partner/v2/off-ramp/execute",
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([
'transactionId' => '8374f327-38bd-4b0b-b8a7-2524599eb903',
'transactionHash' => '0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"partner-api-key: <api-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.sandbox.capa.fi/api/partner/v2/off-ramp/execute"
payload := strings.NewReader("{\n \"transactionId\": \"8374f327-38bd-4b0b-b8a7-2524599eb903\",\n \"transactionHash\": \"0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("partner-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.sandbox.capa.fi/api/partner/v2/off-ramp/execute")
.header("partner-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transactionId\": \"8374f327-38bd-4b0b-b8a7-2524599eb903\",\n \"transactionHash\": \"0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/off-ramp/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["partner-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transactionId\": \"8374f327-38bd-4b0b-b8a7-2524599eb903\",\n \"transactionHash\": \"0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"status": "PENDING_PAYMENT"
}
}
Off-Ramp
Execute Off-Ramp
Executes a previously created off-ramp transaction. This endpoint triggers the actual processing of the off-ramp transaction after crypto funds have been received.
POST
/
api
/
partner
/
v2
/
off-ramp
/
execute
Execute an off-ramp transaction
curl --request POST \
--url https://api.sandbox.capa.fi/api/partner/v2/off-ramp/execute \
--header 'Content-Type: application/json' \
--header 'partner-api-key: <api-key>' \
--data '
{
"transactionId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"transactionHash": "0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0"
}
'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/off-ramp/execute"
payload = {
"transactionId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"transactionHash": "0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0"
}
headers = {
"partner-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'partner-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transactionId: '8374f327-38bd-4b0b-b8a7-2524599eb903',
transactionHash: '0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0'
})
};
fetch('https://api.sandbox.capa.fi/api/partner/v2/off-ramp/execute', 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.sandbox.capa.fi/api/partner/v2/off-ramp/execute",
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([
'transactionId' => '8374f327-38bd-4b0b-b8a7-2524599eb903',
'transactionHash' => '0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"partner-api-key: <api-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.sandbox.capa.fi/api/partner/v2/off-ramp/execute"
payload := strings.NewReader("{\n \"transactionId\": \"8374f327-38bd-4b0b-b8a7-2524599eb903\",\n \"transactionHash\": \"0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("partner-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.sandbox.capa.fi/api/partner/v2/off-ramp/execute")
.header("partner-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transactionId\": \"8374f327-38bd-4b0b-b8a7-2524599eb903\",\n \"transactionHash\": \"0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/off-ramp/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["partner-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transactionId\": \"8374f327-38bd-4b0b-b8a7-2524599eb903\",\n \"transactionHash\": \"0x48c78b33abc0256b217bebbb3f0a30642c17c5527761f09d35c24aa85361b7f0\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"status": "PENDING_PAYMENT"
}
}
Executes a previously created off-ramp transaction, triggering the fiat payout to the user’s bank account. Call this after the user has sent crypto to the
destinationWalletAddress returned by the Create Off-Ramp endpoint.
Transaction Status Values
| Status | Description |
|---|---|
PENDING_PAYMENT | Awaiting the user’s crypto deposit. |
IN_PROGRESS | Transaction is being processed. |
COMPLETED | Transaction has completed successfully. |
FAILED | Transaction has failed. |
CANCELLED | Transaction was cancelled. |
CRYPTO_RECEIVED | Crypto payment has been received. |
CRYPTO_NOT_RECEIVED | Crypto payment was not received. |
COMPLETED_CRYPTO_RECEIVAL | Crypto receival process has completed. |
WAITING_FOR_FUNDS | Awaiting fiat liquidity for the payout. |
BANK_TRANSFER_PENDING | Bank transfer is pending. |
READY_BANK_TRANSFER | Ready to initiate bank transfer. |
Important Notes
- The
transactionIdmust reference a valid off-ramp transaction created via Create Off-Ramp. - The transaction must belong to the partner associated with the API key.
- Optionally include
transactionHash, the blockchain hash of the user’s crypto transfer, to help Capa locate and confirm the incoming funds. It must be a valid blockchain hash.
Use Cases
- Manual Execution: Trigger execution after verifying crypto receipt.
- Workflow Integration: Separate transaction creation from execution in automated workflows.
Error Codes
These are the errors this endpoint returns most often. Branch oncode, not message, and handle codes you don’t recognize by their HTTP status. See Error Codes for the complete list.
Common Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”API Key is missing” |
| 401 | UNAUTHORIZED | ”Invalid API Key format” |
| 401 | UNAUTHORIZED | ”Invalid API Key” |
| 429 | TOO_MANY_REQUESTS | ”ThrottlerException: Too Many Requests” (wait the number of seconds in the Retry-After header) |
Endpoint-Specific Errors
| HTTP Status | Code | Message |
|---|---|---|
| 400 | INVALID_USER_INPUT_ERROR | ”Invalid User Input” |
| 400 | BAD_REQUEST | The transaction is not an off-ramp, is not in PENDING or PENDING_PAYMENT status, or your account doesn’t use manual off-ramp execution |
| 404 | NOT_FOUND_ERROR | ”Requested Transaction was not found” |
| 403 | PARTNER_NOT_OWNER_OF_TRANSACTION_ERROR | ”Partner is not the owner of the transaction.” |
Authorizations
API key for the affiliated partner performing the request.
Body
application/json