Consultar devolucion unitaria
curl --request GET \
--url https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number} \
--header 'ALG-API-VERSION: <alg-api-version>' \
--header 'Authorization: <authorization>'import requests
url = "https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}"
headers = {
"Authorization": "<authorization>",
"ALG-API-VERSION": "<alg-api-version>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'ALG-API-VERSION': '<alg-api-version>'}
};
fetch('https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}', 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.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ALG-API-VERSION: <alg-api-version>",
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("ALG-API-VERSION", "<alg-api-version>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}")
.header("Authorization", "<authorization>")
.header("ALG-API-VERSION", "<alg-api-version>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["ALG-API-VERSION"] = '<alg-api-version>'
response = http.request(request)
puts response.read_body{
"success": "true",
"merchant_code": "41bb301e-3c37-4332-accb-ed5ec19081e4",
"operations_count": "1",
"operations": [
{
"refund_id": "922178aa-ce4c-4c5f-8190-82fa7e009425",
"state": "REGISTERED",
"refund_reason": "Solicitud recibida y validada",
"type": "TOTAL",
"merchant_operation_number": "239766",
"transaction_id": "bko66gpi8czns4tcde93q96vd",
"refund_amount": "1050",
"transaction_amount": "1050",
"currency": "604",
"payment_method": {
"name": "CARD",
"brand": "VISA",
"masked_pan": "447411******2240"
},
"additional_fields": {
"canal": "WEB",
"reason": "cliente no reconocio el consumo",
"description": "solicitud por desconocimiento"
},
"lifecycle": [
{
"state": "REGISTERED",
"date": {
"utc_time": "2025-05-26T06:06:45",
"unix_time": 1748239605
}
}
]
}
],
"meta": {
"status": {
"code": "00",
"message_ilgn": [
{
"locale": "es_PE",
"value": "Se proceso correctamente la peticion"
}
]
}
}
}Refunds
Consultar devolucion unitaria
El API de Consulta Unitaria de Devolucion permite consultar una devolucion generada anteriormente por el API de Devoluciones.
GET
/
refund
/
{merchant_code}
/
{merchant_operation_number}
Consultar devolucion unitaria
curl --request GET \
--url https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number} \
--header 'ALG-API-VERSION: <alg-api-version>' \
--header 'Authorization: <authorization>'import requests
url = "https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}"
headers = {
"Authorization": "<authorization>",
"ALG-API-VERSION": "<alg-api-version>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'ALG-API-VERSION': '<alg-api-version>'}
};
fetch('https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}', 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.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ALG-API-VERSION: <alg-api-version>",
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("ALG-API-VERSION", "<alg-api-version>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}")
.header("Authorization", "<authorization>")
.header("ALG-API-VERSION", "<alg-api-version>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.alignet.io/refund/{merchant_code}/{merchant_operation_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["ALG-API-VERSION"] = '<alg-api-version>'
response = http.request(request)
puts response.read_body{
"success": "true",
"merchant_code": "41bb301e-3c37-4332-accb-ed5ec19081e4",
"operations_count": "1",
"operations": [
{
"refund_id": "922178aa-ce4c-4c5f-8190-82fa7e009425",
"state": "REGISTERED",
"refund_reason": "Solicitud recibida y validada",
"type": "TOTAL",
"merchant_operation_number": "239766",
"transaction_id": "bko66gpi8czns4tcde93q96vd",
"refund_amount": "1050",
"transaction_amount": "1050",
"currency": "604",
"payment_method": {
"name": "CARD",
"brand": "VISA",
"masked_pan": "447411******2240"
},
"additional_fields": {
"canal": "WEB",
"reason": "cliente no reconocio el consumo",
"description": "solicitud por desconocimiento"
},
"lifecycle": [
{
"state": "REGISTERED",
"date": {
"utc_time": "2025-05-26T06:06:45",
"unix_time": 1748239605
}
}
]
}
],
"meta": {
"status": {
"code": "00",
"message_ilgn": [
{
"locale": "es_PE",
"value": "Se proceso correctamente la peticion"
}
]
}
}
}Headers
Token Bearer obtenido desde autenticacion.
Version del API a usar.
Identificador del Facilitador de Pago.
Path Parameters
Identificador del comercio.
Numero de operacion registrado por el comercio.
Response
Consulta unitaria de devolucion obtenida correctamente.
⌘I

