Skip to main content
PATCH
/
payment-requests
/
{paymentRequestId}
Update the authorized amount of a payment request
curl --request PATCH \
  --url https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 20,
  "currency": "USD",
  "idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
'
import requests

url = "https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}"

payload = {
"amount": 20,
"currency": "USD",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 20,
currency: 'USD',
idempotencyKey: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
})
};

fetch('https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 20,
'currency' => 'USD',
'idempotencyKey' => '3fa85f64-5717-4562-b3fc-2c963f66afa6'
]),
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}"

payload := strings.NewReader("{\n \"amount\": 20,\n \"currency\": \"USD\",\n \"idempotencyKey\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 20,\n \"currency\": \"USD\",\n \"idempotencyKey\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.venlyfinance.com/v1/payment-requests/{paymentRequestId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 20,\n \"currency\": \"USD\",\n \"idempotencyKey\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\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": 20,
      "crypto": "20.000000"
    },
    "originalAmount": {
      "fiat": 25,
      "crypto": "25.000000"
    },
    "currency": "USD",
    "status": "RESERVED",
    "executions": [
      {
        "id": "c9d0e1f2-a3b4-4567-d89a-bcdef0123456",
        "walletPairId": "f6a7b8c9-d0e1-4234-a567-89abcdef0123",
        "type": "AUTHORIZATION_ADJUSTMENT",
        "chain": "BASE",
        "asset": "USDC",
        "amount": 5,
        "exchangeRate": 1,
        "status": "PENDING",
        "createdAt": "2026-01-15T09:45:00Z",
        "updatedAt": "2026-01-15T09:45:00Z"
      }
    ],
    "createdAt": "2026-01-15T09:30:00Z",
    "updatedAt": "2026-01-15T09:45: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": "insufficient-funds",
"message": "The account wallet balance is insufficient to complete this operation."
}
]
}
{
"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."
}
]
}
Sets a new absolute authorized amount on a reserved payment request. The execution that runs depends on how the new amount compares to the current one:
New amountExecution
Lower than currentAUTHORIZATION_ADJUSTMENT — releases the difference from escrow back to the account wallet
Higher than currentINCREMENTAL_AUTHORIZATION — pulls the additional funds from the account wallet into escrow
The call returns 200 OK. The request keeps status: RESERVED, amount reflects the new value, and originalAmount keeps the amount set at creation. Send a unique idempotencyKey. Concept guide: Payment requests

Authorizations

Path Parameters

paymentRequestId
string<uuid>
required

Unique payment request identifier

Body

application/json

Sets a new absolute authorized amount on a payment request. A lower amount releases the difference from escrow back to the account wallet; a higher amount pulls the additional funds from the account wallet into escrow.

amount
number
required

New absolute authorized amount, in the authorized fiat currency

Required range: x >= 0
currency
string
required

Must match the authorized currency

Minimum string length: 1
idempotencyKey
string
required

Unique key to prevent duplicate operations on retry

Maximum string length: 255

Response

Amount adjustment accepted

success
boolean

Indicates whether the request was successful

result
object