Calcular retención de Ganancias sin registrar un pago
curl --request POST \
--url https://api.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"calculation_base": 1,
"supplier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_date": "2023-12-25",
"is_inscripto": true,
"exclude_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias"
payload = {
"calculation_base": 1,
"supplier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_date": "2023-12-25",
"is_inscripto": True,
"exclude_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
calculation_base: 1,
supplier_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
payment_date: '2023-12-25',
is_inscripto: true,
exclude_payment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias', 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.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias",
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([
'calculation_base' => 1,
'supplier_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'payment_date' => '2023-12-25',
'is_inscripto' => true,
'exclude_payment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias"
payload := strings.NewReader("{\n \"calculation_base\": 1,\n \"supplier_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_date\": \"2023-12-25\",\n \"is_inscripto\": true,\n \"exclude_payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"calculation_base\": 1,\n \"supplier_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_date\": \"2023-12-25\",\n \"is_inscripto\": true,\n \"exclude_payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias")
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 \"calculation_base\": 1,\n \"supplier_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_date\": \"2023-12-25\",\n \"is_inscripto\": true,\n \"exclude_payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"object": "supplier_payment_ganancias_preview",
"should_withhold": true,
"calculation_base": 123,
"accumulated_base_total": 123,
"minimum_non_taxable": 123,
"taxable_amount": 123,
"rate": 123,
"gross_withholding": 123,
"previous_withholdings": 123,
"net_withholding": 123,
"minimum_threshold": 123,
"final_withholding": 123,
"supplier_name": "<string>",
"is_inscripto_en_ganancias": true,
"person_type": "FISICA",
"breakdown": [
{
"label": "<string>",
"value": 123,
"formatted_value": "<string>"
}
],
"exempt_reason": "<string>",
"progressive_scale_details": {
"bracket": "<string>",
"fixed_amount": 123,
"rate": 123,
"excess_over": 123
}
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "Datos inválidos",
"retryable": false,
"details": []
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "API key faltante o inválida",
"retryable": false,
"details": []
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "Scopes insuficientes",
"retryable": false,
"details": []
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "Condición ARCA sin resolver",
"retryable": false,
"details": []
}
}{
"request_id": "req_rate_limit_1",
"error": {
"type": "rate_limit_error",
"code": "RATE_LIMITED",
"message": "The organization request limit was reached. Try again later.",
"retryable": true,
"details": []
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "Error interno",
"retryable": false,
"details": []
}
}{
"request_id": "req_auth_capacity_1",
"error": {
"type": "api_error",
"code": "INTERNAL_ERROR",
"message": "La verificación de credenciales está ocupada. Reintentá más tarde.",
"retryable": true,
"details": []
}
}Calcular retención de Ganancias sin registrar un pago
Operación de solo lectura. No requiere Idempotency-Key ni emite certificados. Usa los pagos elegibles del mes. Crear el pago recalcula con un bloqueo mensual; un cambio que desbalancea los medios de pago devuelve 409 STATE_CONFLICT con detalle GANANCIAS_CALCULATION_MISMATCH. Un fallo ARCA devuelve 422 BUSINESS_REQUIREMENT_UNMET con detalle GANANCIAS_STATUS_UNRESOLVED, salvo override explícito is_inscripto.
POST
/
api
/
v1
/
supplier-payments
/
preview-ganancias
Calcular retención de Ganancias sin registrar un pago
curl --request POST \
--url https://api.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"calculation_base": 1,
"supplier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_date": "2023-12-25",
"is_inscripto": true,
"exclude_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias"
payload = {
"calculation_base": 1,
"supplier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_date": "2023-12-25",
"is_inscripto": True,
"exclude_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
calculation_base: 1,
supplier_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
payment_date: '2023-12-25',
is_inscripto: true,
exclude_payment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias', 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.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias",
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([
'calculation_base' => 1,
'supplier_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'payment_date' => '2023-12-25',
'is_inscripto' => true,
'exclude_payment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias"
payload := strings.NewReader("{\n \"calculation_base\": 1,\n \"supplier_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_date\": \"2023-12-25\",\n \"is_inscripto\": true,\n \"exclude_payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"calculation_base\": 1,\n \"supplier_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_date\": \"2023-12-25\",\n \"is_inscripto\": true,\n \"exclude_payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lapyme.com.ar/api/v1/supplier-payments/preview-ganancias")
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 \"calculation_base\": 1,\n \"supplier_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_date\": \"2023-12-25\",\n \"is_inscripto\": true,\n \"exclude_payment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"object": "supplier_payment_ganancias_preview",
"should_withhold": true,
"calculation_base": 123,
"accumulated_base_total": 123,
"minimum_non_taxable": 123,
"taxable_amount": 123,
"rate": 123,
"gross_withholding": 123,
"previous_withholdings": 123,
"net_withholding": 123,
"minimum_threshold": 123,
"final_withholding": 123,
"supplier_name": "<string>",
"is_inscripto_en_ganancias": true,
"person_type": "FISICA",
"breakdown": [
{
"label": "<string>",
"value": 123,
"formatted_value": "<string>"
}
],
"exempt_reason": "<string>",
"progressive_scale_details": {
"bracket": "<string>",
"fixed_amount": 123,
"rate": 123,
"excess_over": 123
}
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "Datos inválidos",
"retryable": false,
"details": []
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "API key faltante o inválida",
"retryable": false,
"details": []
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "Scopes insuficientes",
"retryable": false,
"details": []
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "Condición ARCA sin resolver",
"retryable": false,
"details": []
}
}{
"request_id": "req_rate_limit_1",
"error": {
"type": "rate_limit_error",
"code": "RATE_LIMITED",
"message": "The organization request limit was reached. Try again later.",
"retryable": true,
"details": []
}
}{
"request_id": "req_error_1",
"error": {
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"message": "Error interno",
"retryable": false,
"details": []
}
}{
"request_id": "req_auth_capacity_1",
"error": {
"type": "api_error",
"code": "INTERNAL_ERROR",
"message": "La verificación de credenciales está ocupada. Reintentá más tarde.",
"retryable": true,
"details": []
}
}Authorizations
Incluí tu API key en el header Authorization con el prefijo Bearer.
Body
application/json
Código de régimen de Ganancias configurado.
Available options:
19, 21, 25, 30, 31, 32, 35, 43, 51, 53, 55, 69, 70, 71, 78, 86, 94, 95, 110, 111, 116, 119, 124 Base elegible de este pago en centavos ARS, sin IVA.
Required range:
x >= 0Override explícito de inscripción en Ganancias. Omitir para consultar ARCA; un fallo no permite registrar el pago.
Was this page helpful?

