Skip to main content
POST
/
v1
/
operations
Create a settlement operation
curl --request POST \
  --url https://slc.sandbox.lerian.net/v1/operations \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "creditorIspb": "<string>",
  "domicileIfIspb": "<string>",
  "dueDate": "<string>",
  "externalId": "<string>",
  "installments": 123,
  "operationType": "<string>",
  "participantId": "<string>",
  "participantRole": "<string>",
  "value": 123,
  "arrangementCode": "<string>",
  "authorizationCode": "<string>",
  "brandCode": "<string>",
  "currency": "<string>",
  "establishmentCode": "<string>",
  "installmentNumber": 123,
  "intakeMode": "<string>",
  "metadata": {},
  "originalOperationId": "<string>",
  "pvCode": "<string>",
  "pvDocument": "<string>",
  "pvName": "<string>",
  "pvPersonType": "<string>",
  "reasonCategory": "<string>",
  "settlementIfIspb": "<string>",
  "transactionDate": "<string>"
}
'
import requests

url = "https://slc.sandbox.lerian.net/v1/operations"

payload = {
"creditorIspb": "<string>",
"domicileIfIspb": "<string>",
"dueDate": "<string>",
"externalId": "<string>",
"installments": 123,
"operationType": "<string>",
"participantId": "<string>",
"participantRole": "<string>",
"value": 123,
"arrangementCode": "<string>",
"authorizationCode": "<string>",
"brandCode": "<string>",
"currency": "<string>",
"establishmentCode": "<string>",
"installmentNumber": 123,
"intakeMode": "<string>",
"metadata": {},
"originalOperationId": "<string>",
"pvCode": "<string>",
"pvDocument": "<string>",
"pvName": "<string>",
"pvPersonType": "<string>",
"reasonCategory": "<string>",
"settlementIfIspb": "<string>",
"transactionDate": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
creditorIspb: '<string>',
domicileIfIspb: '<string>',
dueDate: '<string>',
externalId: '<string>',
installments: 123,
operationType: '<string>',
participantId: '<string>',
participantRole: '<string>',
value: 123,
arrangementCode: '<string>',
authorizationCode: '<string>',
brandCode: '<string>',
currency: '<string>',
establishmentCode: '<string>',
installmentNumber: 123,
intakeMode: '<string>',
metadata: {},
originalOperationId: '<string>',
pvCode: '<string>',
pvDocument: '<string>',
pvName: '<string>',
pvPersonType: '<string>',
reasonCategory: '<string>',
settlementIfIspb: '<string>',
transactionDate: '<string>'
})
};

fetch('https://slc.sandbox.lerian.net/v1/operations', 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://slc.sandbox.lerian.net/v1/operations",
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([
'creditorIspb' => '<string>',
'domicileIfIspb' => '<string>',
'dueDate' => '<string>',
'externalId' => '<string>',
'installments' => 123,
'operationType' => '<string>',
'participantId' => '<string>',
'participantRole' => '<string>',
'value' => 123,
'arrangementCode' => '<string>',
'authorizationCode' => '<string>',
'brandCode' => '<string>',
'currency' => '<string>',
'establishmentCode' => '<string>',
'installmentNumber' => 123,
'intakeMode' => '<string>',
'metadata' => [

],
'originalOperationId' => '<string>',
'pvCode' => '<string>',
'pvDocument' => '<string>',
'pvName' => '<string>',
'pvPersonType' => '<string>',
'reasonCategory' => '<string>',
'settlementIfIspb' => '<string>',
'transactionDate' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://slc.sandbox.lerian.net/v1/operations"

payload := strings.NewReader("{\n \"creditorIspb\": \"<string>\",\n \"domicileIfIspb\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"externalId\": \"<string>\",\n \"installments\": 123,\n \"operationType\": \"<string>\",\n \"participantId\": \"<string>\",\n \"participantRole\": \"<string>\",\n \"value\": 123,\n \"arrangementCode\": \"<string>\",\n \"authorizationCode\": \"<string>\",\n \"brandCode\": \"<string>\",\n \"currency\": \"<string>\",\n \"establishmentCode\": \"<string>\",\n \"installmentNumber\": 123,\n \"intakeMode\": \"<string>\",\n \"metadata\": {},\n \"originalOperationId\": \"<string>\",\n \"pvCode\": \"<string>\",\n \"pvDocument\": \"<string>\",\n \"pvName\": \"<string>\",\n \"pvPersonType\": \"<string>\",\n \"reasonCategory\": \"<string>\",\n \"settlementIfIspb\": \"<string>\",\n \"transactionDate\": \"<string>\"\n}")

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

req.Header.Add("Authorization", "<api-key>")
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://slc.sandbox.lerian.net/v1/operations")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"creditorIspb\": \"<string>\",\n \"domicileIfIspb\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"externalId\": \"<string>\",\n \"installments\": 123,\n \"operationType\": \"<string>\",\n \"participantId\": \"<string>\",\n \"participantRole\": \"<string>\",\n \"value\": 123,\n \"arrangementCode\": \"<string>\",\n \"authorizationCode\": \"<string>\",\n \"brandCode\": \"<string>\",\n \"currency\": \"<string>\",\n \"establishmentCode\": \"<string>\",\n \"installmentNumber\": 123,\n \"intakeMode\": \"<string>\",\n \"metadata\": {},\n \"originalOperationId\": \"<string>\",\n \"pvCode\": \"<string>\",\n \"pvDocument\": \"<string>\",\n \"pvName\": \"<string>\",\n \"pvPersonType\": \"<string>\",\n \"reasonCategory\": \"<string>\",\n \"settlementIfIspb\": \"<string>\",\n \"transactionDate\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://slc.sandbox.lerian.net/v1/operations")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"creditorIspb\": \"<string>\",\n \"domicileIfIspb\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"externalId\": \"<string>\",\n \"installments\": 123,\n \"operationType\": \"<string>\",\n \"participantId\": \"<string>\",\n \"participantRole\": \"<string>\",\n \"value\": 123,\n \"arrangementCode\": \"<string>\",\n \"authorizationCode\": \"<string>\",\n \"brandCode\": \"<string>\",\n \"currency\": \"<string>\",\n \"establishmentCode\": \"<string>\",\n \"installmentNumber\": 123,\n \"intakeMode\": \"<string>\",\n \"metadata\": {},\n \"originalOperationId\": \"<string>\",\n \"pvCode\": \"<string>\",\n \"pvDocument\": \"<string>\",\n \"pvName\": \"<string>\",\n \"pvPersonType\": \"<string>\",\n \"reasonCategory\": \"<string>\",\n \"settlementIfIspb\": \"<string>\",\n \"transactionDate\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "externalId": "<string>",
  "id": "<string>",
  "meta": {
    "requestId": "<string>",
    "timestamp": "<string>"
  },
  "state": "<string>"
}
{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}
{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}
{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}
{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}
{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}
{
"code": "<string>",
"details": {},
"message": "<string>",
"title": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token authentication (format: "Bearer {token}")

Headers

Idempotency-Key
string

Idempotency key for safe retries

Body

application/json

Operation to create

creditorIspb
string
required
domicileIfIspb
string
required
dueDate
string
required
externalId
string
required
installments
integer
required
operationType
string
required
participantId
string
required
participantRole
string
required
value
integer
required
arrangementCode
string
authorizationCode
string
brandCode
string
currency
string
establishmentCode
string
installmentNumber
integer
intakeMode
string
metadata
object
originalOperationId
string

OriginalOperationID identifies the operation a CANCELLATION targets (UUID). Mandatory for operationType=CANCELLATION, ignored otherwise.

pvCode
string

PontoVenda (merchant/EC) identity for the ASLC027 Grupo_ASLC027_PontoVenda. Required for CREDIT, enforced in the command use case (not via struct tags), because only CREDIT mandates the [1..1] PontoVenda identity. pvDocument is the merchant CPF/CNPJ — regulated PII; it is never logged in the clear.

pvDocument
string
pvName
string
pvPersonType
string
reasonCategory
string

ReasonCategory is the numeric cancellation reason (OP107 §11.3.16), one of "1".."4". Mandatory for operationType=CANCELLATION, optional otherwise. Carried as a string on the wire so the nullable-text column and the value object stay symmetric; the 1..4 domain is enforced by the domain, not the XSD.

settlementIfIspb
string
transactionDate
string

Response

Accepted

externalId
string
id
string
meta
object
state
string