Settle a payment request
curl --request POST \
--url https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 25,
"currency": "USD",
"idempotencyKey": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
'import requests
url = "https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements"
payload = {
"amount": 25,
"currency": "USD",
"idempotencyKey": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 25,
currency: 'USD',
idempotencyKey: '7c9e6679-7425-40de-944b-e07fc1f90ae7'
})
};
fetch('https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements', 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.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements",
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([
'amount' => 25,
'currency' => 'USD',
'idempotencyKey' => '7c9e6679-7425-40de-944b-e07fc1f90ae7'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements"
payload := strings.NewReader("{\n \"amount\": 25,\n \"currency\": \"USD\",\n \"idempotencyKey\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 25,\n \"currency\": \"USD\",\n \"idempotencyKey\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 25,\n \"currency\": \"USD\",\n \"idempotencyKey\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"id": "d4e5f6a7-b8c9-4012-8345-6789abcdef01",
"accountId": "b2a1f0e9-8c7d-4e3a-9f21-0a1b2c3d4e5f",
"amount": {
"fiat": 25,
"crypto": "25.000000"
},
"settlementAmount": {
"fiat": 25,
"crypto": "25.000000"
},
"currency": "USD",
"externalId": "order-67890",
"status": "SETTLING",
"executions": [
{
"id": "a7b8c9d0-e1f2-4345-b678-9abcdef01234",
"walletPairId": "f6a7b8c9-d0e1-4234-a567-89abcdef0123",
"type": "SETTLEMENT",
"chain": "BASE",
"asset": "USDC",
"amount": 25,
"exchangeRate": 1,
"status": "PENDING",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-01-15T10:00:00Z"
}
],
"createdAt": "2026-01-15T09:30:00Z",
"updatedAt": "2026-01-15T10:00:00Z"
}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
]
}{
"success": false,
"errors": [
{
"code": "unauthenticated",
"message": "Please authenticate to perform this action."
}
]
}{
"success": false,
"errors": [
{
"code": "forbidden",
"message": "You do not have permission to access this resource."
}
]
}{
"success": false,
"errors": [
{
"code": "account-not-found",
"message": "The requested resource was not found."
}
]
}{
"success": false,
"errors": [
{
"code": "concurrent-modification",
"message": "This request has been modified by another user. Please refresh and try again."
}
]
}{
"success": false,
"errors": [
{
"code": "idempotency-conflict",
"message": "This idempotency key was already used with a different request."
}
]
}{
"success": false,
"errors": [
{
"code": "internal-error",
"message": "An unexpected error occurred. Please try again later."
}
]
}Payment Requests
Settle a payment request
Finalize a reserved payment request — move funds from escrow to the company’s settlement wallet.
POST
/
payment-requests
/
{paymentRequestId}
/
settlements
Settle a payment request
curl --request POST \
--url https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 25,
"currency": "USD",
"idempotencyKey": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
'import requests
url = "https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements"
payload = {
"amount": 25,
"currency": "USD",
"idempotencyKey": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 25,
currency: 'USD',
idempotencyKey: '7c9e6679-7425-40de-944b-e07fc1f90ae7'
})
};
fetch('https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements', 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.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements",
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([
'amount' => 25,
'currency' => 'USD',
'idempotencyKey' => '7c9e6679-7425-40de-944b-e07fc1f90ae7'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements"
payload := strings.NewReader("{\n \"amount\": 25,\n \"currency\": \"USD\",\n \"idempotencyKey\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 25,\n \"currency\": \"USD\",\n \"idempotencyKey\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}/settlements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 25,\n \"currency\": \"USD\",\n \"idempotencyKey\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"id": "d4e5f6a7-b8c9-4012-8345-6789abcdef01",
"accountId": "b2a1f0e9-8c7d-4e3a-9f21-0a1b2c3d4e5f",
"amount": {
"fiat": 25,
"crypto": "25.000000"
},
"settlementAmount": {
"fiat": 25,
"crypto": "25.000000"
},
"currency": "USD",
"externalId": "order-67890",
"status": "SETTLING",
"executions": [
{
"id": "a7b8c9d0-e1f2-4345-b678-9abcdef01234",
"walletPairId": "f6a7b8c9-d0e1-4234-a567-89abcdef0123",
"type": "SETTLEMENT",
"chain": "BASE",
"asset": "USDC",
"amount": 25,
"exchangeRate": 1,
"status": "PENDING",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-01-15T10:00:00Z"
}
],
"createdAt": "2026-01-15T09:30:00Z",
"updatedAt": "2026-01-15T10:00:00Z"
}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
]
}{
"success": false,
"errors": [
{
"code": "unauthenticated",
"message": "Please authenticate to perform this action."
}
]
}{
"success": false,
"errors": [
{
"code": "forbidden",
"message": "You do not have permission to access this resource."
}
]
}{
"success": false,
"errors": [
{
"code": "account-not-found",
"message": "The requested resource was not found."
}
]
}{
"success": false,
"errors": [
{
"code": "concurrent-modification",
"message": "This request has been modified by another user. Please refresh and try again."
}
]
}{
"success": false,
"errors": [
{
"code": "idempotency-conflict",
"message": "This idempotency key was already used with a different request."
}
]
}{
"success": false,
"errors": [
{
"code": "internal-error",
"message": "An unexpected error occurred. Please try again later."
}
]
}Settles a reserved payment request. The call returns
Send a unique
202 Accepted with status: SETTLING and its executions PENDING; the request becomes SETTLED once those transfers confirm on-chain. amount is the final figure in the authorized currency, and the executions that run follow from how it compares to the authorized amount:
Settlement amount | Executions |
|---|---|
| Equal to the authorized amount | one SETTLEMENT |
| Below the authorized amount | SETTLEMENT + REFUND returning the difference to the account wallet |
| Above the authorized amount | SETTLEMENT (the full authorized amount) + SETTLEMENT_OVERAGE collecting the extra from the account wallet |
idempotencyKey; repeating the same key and body returns the original result.
Concept guide: Payment requests
amount, settlementAmount, and settledAmount come back as objects — { "fiat": <number>, "crypto": "<string>" }. To settle a request by its card-provider reference instead of its ID, use settle by reference.Authorizations
OAuth2 client credentials flow. Token endpoints:
Path Parameters
Unique payment request identifier
Body
application/json
Was this page helpful?
⌘I

