Update Authorization
curl --request PATCH \
--url https://api.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 123
}'import requests
url = "https://api.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}"
payload = { "amount": 123 }
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: 123})
};
fetch('https://api.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}', 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.wepayout.com.br/v2/automatic-pix/authorizations/{id}",
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' => 123
]),
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.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}"
payload := strings.NewReader("{\n \"amount\": 123\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.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}")
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\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"merchant_id": 1,
"contract_id": "123",
"identifier": "identifier",
"frequency": "MONTHLY",
"contract_name": "Contract Name",
"type": "RECURRING",
"authorization_amount": 100.00,
"amount": 150.00,
"maximum_authorization_amount": 200.00,
"start_date": "2023-01-01",
"end_date": "2023-12-31",
"created_at": "2023-01-01T00:00:00Z",
"status": {
"id": 1,
"name": "ACTIVE"
},
"history": [
{
"id": 1,
"authorization_id": 1,
"status_id": 1,
"status_name": "ACTIVE",
"created_at": "2023-01-01T00:00:00Z"
}
],
"buyer": {
"id": 1,
"name": "Buyer Name",
"document": "12345678900"
}
}
Authorizations
Update Authorization
Update an authorization amount
PATCH
/
v2
/
automatic-pix
/
authorizations
/
{id}
Update Authorization
curl --request PATCH \
--url https://api.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 123
}'import requests
url = "https://api.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}"
payload = { "amount": 123 }
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: 123})
};
fetch('https://api.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}', 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.wepayout.com.br/v2/automatic-pix/authorizations/{id}",
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' => 123
]),
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.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}"
payload := strings.NewReader("{\n \"amount\": 123\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.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/automatic-pix/authorizations/{id}")
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\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"merchant_id": 1,
"contract_id": "123",
"identifier": "identifier",
"frequency": "MONTHLY",
"contract_name": "Contract Name",
"type": "RECURRING",
"authorization_amount": 100.00,
"amount": 150.00,
"maximum_authorization_amount": 200.00,
"start_date": "2023-01-01",
"end_date": "2023-12-31",
"created_at": "2023-01-01T00:00:00Z",
"status": {
"id": 1,
"name": "ACTIVE"
},
"history": [
{
"id": 1,
"authorization_id": 1,
"status_id": 1,
"status_name": "ACTIVE",
"created_at": "2023-01-01T00:00:00Z"
}
],
"buyer": {
"id": 1,
"name": "Buyer Name",
"document": "12345678900"
}
}
Updating an authorization only changes the amount — the maximum charge limit for future scheduled payments. All other fields (frequency, start date, end date, payer) are immutable once the authorization is created. If you need to change any of those, you must cancel the authorization and create a new one.Existing pending schedules are not affected by an authorization amount update. To apply the new amount to an upcoming payment, cancel the schedule and let the system generate a new one on the next cycle.
Path Parameters
integer
required
The ID of the authorization to update.
Request Body
number
required
The new amount for the authorization. Must be greater than 0.
Response
integer
Authorization ID
integer
Merchant ID
string
Contract ID
string
Identifier
string
Frequency
string
Contract Name
string
Type
number or null
Authorization Amount
number or null
Amount
number or null
Maximum Authorization Amount
string
Start Date
string or null
End Date
string
Creation Date
array or null
{
"id": 1,
"merchant_id": 1,
"contract_id": "123",
"identifier": "identifier",
"frequency": "MONTHLY",
"contract_name": "Contract Name",
"type": "RECURRING",
"authorization_amount": 100.00,
"amount": 150.00,
"maximum_authorization_amount": 200.00,
"start_date": "2023-01-01",
"end_date": "2023-12-31",
"created_at": "2023-01-01T00:00:00Z",
"status": {
"id": 1,
"name": "ACTIVE"
},
"history": [
{
"id": 1,
"authorization_id": 1,
"status_id": 1,
"status_name": "ACTIVE",
"created_at": "2023-01-01T00:00:00Z"
}
],
"buyer": {
"id": 1,
"name": "Buyer Name",
"document": "12345678900"
}
}
Was this page helpful?
⌘I

