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

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

payload = {
"dtContabil": "<string>",
"dtHrEfetivacao": "<string>",
"dtHrLiquidacao": "<string>",
"endToEndId": "<string>",
"ispb": "<string>"
}
headers = {
"Chave-Idempotencia": "<chave-idempotencia>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {
'Chave-Idempotencia': '<chave-idempotencia>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
dtContabil: '<string>',
dtHrEfetivacao: '<string>',
dtHrLiquidacao: '<string>',
endToEndId: '<string>',
ispb: '<string>'
})
};

fetch('https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/settlements/inbound/debit', 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",
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([
'dtContabil' => '<string>',
'dtHrEfetivacao' => '<string>',
'dtHrLiquidacao' => '<string>',
'endToEndId' => '<string>',
'ispb' => '<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"

payload := strings.NewReader("{\n \"dtContabil\": \"<string>\",\n \"dtHrEfetivacao\": \"<string>\",\n \"dtHrLiquidacao\": \"<string>\",\n \"endToEndId\": \"<string>\",\n \"ispb\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", 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.post("https://plugin-pix-direct.api.lerian.net/v1/pix-automatico/settlements/inbound/debit")
.header("Chave-Idempotencia", "<chave-idempotencia>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dtContabil\": \"<string>\",\n \"dtHrEfetivacao\": \"<string>\",\n \"dtHrLiquidacao\": \"<string>\",\n \"endToEndId\": \"<string>\",\n \"ispb\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Chave-Idempotencia"] = '<chave-idempotencia>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dtContabil\": \"<string>\",\n \"dtHrEfetivacao\": \"<string>\",\n \"dtHrLiquidacao\": \"<string>\",\n \"endToEndId\": \"<string>\",\n \"ispb\": \"<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

Body

application/json
dtContabil
string
required

Accounting date (aaaa-mm-dd).

dtHrEfetivacao
string
required

Upstream effectuation timestamp (UTC).

dtHrLiquidacao
string
required

SPI settlement timestamp (UTC).

endToEndId
string
required

Unique payment-instruction id (32-char).

ispb
string
required

Payer participant ISPB (8 digits, a v5.5.0 string).

Response

OK

dtHrOperacaoSgct
string
required

settlement-gateway operation timestamp (UTC).

endToEndId
string
required

Unique payment-instruction id (32-char).

idOperacaoSgct
string
required

settlement-gateway debit-operation id (the Midaz transaction id, a GUID).