Saltar al contenido principal
POST
/
api
/
v1
/
spi
/
messages
/
callbacks
/
pacs004
Procesar callback pacs.004
curl --request POST \
  --url https://spi.sandbox.lerian.net/api/v1/spi/messages/callbacks/pacs004 \
  --header 'Content-Type: application/xml' \
  --data '<string>'
import requests

url = "https://spi.sandbox.lerian.net/api/v1/spi/messages/callbacks/pacs004"

payload = "<string>"
headers = {"Content-Type": "application/xml"}

response = requests.post(url, data=payload, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {'Content-Type': 'application/xml'}, body: '<string>'};

fetch('https://spi.sandbox.lerian.net/api/v1/spi/messages/callbacks/pacs004', 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://spi.sandbox.lerian.net/api/v1/spi/messages/callbacks/pacs004",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Content-Type: application/xml"
],
]);

$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://spi.sandbox.lerian.net/api/v1/spi/messages/callbacks/pacs004"

payload := strings.NewReader("<string>")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/xml")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://spi.sandbox.lerian.net/api/v1/spi/messages/callbacks/pacs004")
.header("Content-Type", "application/xml")
.body("<string>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://spi.sandbox.lerian.net/api/v1/spi/messages/callbacks/pacs004")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/xml'
request.body = "<string>"

response = http.request(request)
puts response.read_body
{
  "decision": "<string>",
  "messageType": "<string>",
  "replayed": true,
  "responseCode": "<string>",
  "settled": true,
  "events": [
    "<string>"
  ],
  "paymentId": "<string>",
  "reason": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Encabezados

Content-Type
string

application/xml, text/xml, or application/json

Cuerpo

application/xml

The body is of type file.

Respuesta

OK

decision
string
requerido

Inbound processing outcome (e.g. ACCEPT, REJECT).

Ejemplo:

"ACCEPT"

messageType
string
requerido

ISO 20022 message type of the processed inbound message.

Ejemplo:

"pacs.008"

replayed
boolean
requerido

True when the inbound message was a duplicate already processed (idempotent replay).

Ejemplo:

false

responseCode
string
requerido

ISO 20022 status code returned to the sender (e.g. ACSC, RJCT).

Ejemplo:

"ACSC"

settled
boolean
requerido

True when the inbound payment was settled as part of processing.

Ejemplo:

true

events
string[] | null

Lifecycle event types emitted while processing the inbound message.

paymentId
string

Local payment identifier (UUID) created or matched for the inbound message, when known.

Ejemplo:

"550e8400-e29b-41d4-a716-446655440000"

reason
string

Reason code explaining the decision, present only on rejection or deferral.

Ejemplo:

""