Skip to main content
DELETE
/
v1
/
pix-automatico
/
settlements
/
inbound
/
debit
/
{endToEndId}
Reverse an inbound Pix Automático settlement debit
curl --request DELETE \
  --url https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/settlements/inbound/debit/{endToEndId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Chave-Idempotencia: <chave-idempotencia>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "codigoErro": "<string>",
  "endToEndId": "<string>",
  "stJdPiProc": 123,
  "descCodigoErro": "<string>"
}
'
import requests

url = "https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/settlements/inbound/debit/{endToEndId}"

payload = {
"codigoErro": "<string>",
"endToEndId": "<string>",
"stJdPiProc": 123,
"descCodigoErro": "<string>"
}
headers = {
"Chave-Idempotencia": "<chave-idempotencia>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'DELETE',
headers: {
'Chave-Idempotencia': '<chave-idempotencia>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
codigoErro: '<string>',
endToEndId: '<string>',
stJdPiProc: 123,
descCodigoErro: '<string>'
})
};

fetch('https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/settlements/inbound/debit/{endToEndId}', 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://plugin-pix-direct.api.lerian.net/v1/pix-automatico/settlements/inbound/debit/{endToEndId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'codigoErro' => '<string>',
'endToEndId' => '<string>',
'stJdPiProc' => 123,
'descCodigoErro' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Chave-Idempotencia: <chave-idempotencia>",
"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://plugin-pix-direct.api.lerian.net/v1/pix-automatico/settlements/inbound/debit/{endToEndId}"

payload := strings.NewReader("{\n \"codigoErro\": \"<string>\",\n \"endToEndId\": \"<string>\",\n \"stJdPiProc\": 123,\n \"descCodigoErro\": \"<string>\"\n}")

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

req.Header.Add("Chave-Idempotencia", "<chave-idempotencia>")
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.delete("https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/settlements/inbound/debit/{endToEndId}")
.header("Chave-Idempotencia", "<chave-idempotencia>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"codigoErro\": \"<string>\",\n \"endToEndId\": \"<string>\",\n \"stJdPiProc\": 123,\n \"descCodigoErro\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/settlements/inbound/debit/{endToEndId}")

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

request = Net::HTTP::Delete.new(url)
request["Chave-Idempotencia"] = '<chave-idempotencia>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"codigoErro\": \"<string>\",\n \"endToEndId\": \"<string>\",\n \"stJdPiProc\": 123,\n \"descCodigoErro\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "dtHrOperacaoSgct": "<string>",
  "endToEndId": "<string>",
  "idOperacaoSgct": "<string>"
}
{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Obtain token from /v1/login/oauth/access_token endpoint using client credentials (clientId and clientSecret).

Include token in Authorization header: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Token expires after 3600 seconds (1 hour).

Headers

Authorization
string

Bearer access token (the financial-ingress gate; the handler fails closed with Pix-0082 when absent).

Chave-Idempotencia
string
required

Idempotency key (= the endToEndId of the transaction). Mandatory per

Path Parameters

endToEndId
string
required

Unique payment-instruction id (32-char), the natural key.

Body

application/json
codigoErro
string
required

Error code.

endToEndId
string
required

Unique payment-instruction id (32-char; matches the path param).

stJdPiProc
integer<int64>
required

Negative-return classification.

descCodigoErro
string

Error description (1000-char).

Response

OK

dtHrOperacaoSgct
string
required

settlement-gateway operation timestamp (UTC).

endToEndId
string
required

Unique payment-instruction id (32-char).

idOperacaoSgct
string
required

settlement-gateway reversal-operation id (a GUID).