Cancelar un Payin
curl --request PATCH \
--url https://api.stage.localpayment.com/api/transactions/{externalId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "CANCELLED"
}
'import requests
url = "https://api.stage.localpayment.com/api/transactions/{externalId}/status"
payload = { "status": "CANCELLED" }
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({status: 'CANCELLED'})
};
fetch('https://api.stage.localpayment.com/api/transactions/{externalId}/status', 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.stage.localpayment.com/api/transactions/{externalId}/status",
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([
'status' => 'CANCELLED'
]),
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.stage.localpayment.com/api/transactions/{externalId}/status"
payload := strings.NewReader("{\n \"status\": \"CANCELLED\"\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.stage.localpayment.com/api/transactions/{externalId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"CANCELLED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/transactions/{externalId}/status")
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 \"status\": \"CANCELLED\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "e36ef929-c2d4-fcf0-b30c-99dc51798f4b",
"internalId": "c09095fb-6a0e-47af-9f43-3d9452b0f290",
"status": {
"code": "900",
"description": "CANCELLED",
"detail": "The payin was cancelled"
}
}
PAYINS
Cancelar un Payin
PATCH
/
api
/
transactions
/
{externalId}
/
status
Cancelar un Payin
curl --request PATCH \
--url https://api.stage.localpayment.com/api/transactions/{externalId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "CANCELLED"
}
'import requests
url = "https://api.stage.localpayment.com/api/transactions/{externalId}/status"
payload = { "status": "CANCELLED" }
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({status: 'CANCELLED'})
};
fetch('https://api.stage.localpayment.com/api/transactions/{externalId}/status', 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.stage.localpayment.com/api/transactions/{externalId}/status",
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([
'status' => 'CANCELLED'
]),
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.stage.localpayment.com/api/transactions/{externalId}/status"
payload := strings.NewReader("{\n \"status\": \"CANCELLED\"\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.stage.localpayment.com/api/transactions/{externalId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"CANCELLED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/transactions/{externalId}/status")
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 \"status\": \"CANCELLED\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "e36ef929-c2d4-fcf0-b30c-99dc51798f4b",
"internalId": "c09095fb-6a0e-47af-9f43-3d9452b0f290",
"status": {
"code": "900",
"description": "CANCELLED",
"detail": "The payin was cancelled"
}
}
Este endpoint te permite cancelar una transacción de Payin que se encuentre en estado autorizado. La transacción se marcará como cancelada y se liberarán los fondos pendientes.
Autorizaciones
Encabezados
Token de acceso Bearer para la autenticación. Este token se obtiene de los endpoints Get Access Token o Refresh Access Token.
Parámetros de ruta
ID generado de tu lado para la trazabilidad de las transacciones. Debe ser único y solo acepta caracteres alfanuméricos y guiones (por ejemplo, UUID4). También puedes consultar el estado de una transacción mediante su ID interno.
Pattern:
[a-zA-Z0-9\- ]+Ejemplo:
"53025bf4-4c87-4b4f-8fea-b47004440f37"
Respuesta
OK
Última modificación el 10 de noviembre de 2026

