Iniciar un pago DARF
curl --request POST \
--url https://payments.sandbox.lerian.net/v1/payments/darf \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"description": "<string>",
"dueDate": "<string>",
"fineAmount": "<string>",
"history": "<string>",
"interestAmount": "<string>",
"mainAmount": "<string>",
"midazAccountId": "<string>",
"name": "<string>",
"personType": "<string>",
"referenceDate": "<string>",
"referenceNumber": 123,
"taxId": "<string>",
"totalIncomeAmount": "<string>",
"totalIncomePercent": "<string>",
"treasuryRevenueCode": "<string>",
"type": "<string>"
}
'import requests
url = "https://payments.sandbox.lerian.net/v1/payments/darf"
payload = {
"description": "<string>",
"dueDate": "<string>",
"fineAmount": "<string>",
"history": "<string>",
"interestAmount": "<string>",
"mainAmount": "<string>",
"midazAccountId": "<string>",
"name": "<string>",
"personType": "<string>",
"referenceDate": "<string>",
"referenceNumber": 123,
"taxId": "<string>",
"totalIncomeAmount": "<string>",
"totalIncomePercent": "<string>",
"treasuryRevenueCode": "<string>",
"type": "<string>"
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Organization-Id': '<x-organization-id>',
'Idempotency-Key': '<idempotency-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: '<string>',
dueDate: '<string>',
fineAmount: '<string>',
history: '<string>',
interestAmount: '<string>',
mainAmount: '<string>',
midazAccountId: '<string>',
name: '<string>',
personType: '<string>',
referenceDate: '<string>',
referenceNumber: 123,
taxId: '<string>',
totalIncomeAmount: '<string>',
totalIncomePercent: '<string>',
treasuryRevenueCode: '<string>',
type: '<string>'
})
};
fetch('https://payments.sandbox.lerian.net/v1/payments/darf', 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://payments.sandbox.lerian.net/v1/payments/darf",
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([
'description' => '<string>',
'dueDate' => '<string>',
'fineAmount' => '<string>',
'history' => '<string>',
'interestAmount' => '<string>',
'mainAmount' => '<string>',
'midazAccountId' => '<string>',
'name' => '<string>',
'personType' => '<string>',
'referenceDate' => '<string>',
'referenceNumber' => 123,
'taxId' => '<string>',
'totalIncomeAmount' => '<string>',
'totalIncomePercent' => '<string>',
'treasuryRevenueCode' => '<string>',
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Organization-Id: <x-organization-id>"
],
]);
$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://payments.sandbox.lerian.net/v1/payments/darf"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"fineAmount\": \"<string>\",\n \"history\": \"<string>\",\n \"interestAmount\": \"<string>\",\n \"mainAmount\": \"<string>\",\n \"midazAccountId\": \"<string>\",\n \"name\": \"<string>\",\n \"personType\": \"<string>\",\n \"referenceDate\": \"<string>\",\n \"referenceNumber\": 123,\n \"taxId\": \"<string>\",\n \"totalIncomeAmount\": \"<string>\",\n \"totalIncomePercent\": \"<string>\",\n \"treasuryRevenueCode\": \"<string>\",\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://payments.sandbox.lerian.net/v1/payments/darf")
.header("X-Organization-Id", "<x-organization-id>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"fineAmount\": \"<string>\",\n \"history\": \"<string>\",\n \"interestAmount\": \"<string>\",\n \"mainAmount\": \"<string>\",\n \"midazAccountId\": \"<string>\",\n \"name\": \"<string>\",\n \"personType\": \"<string>\",\n \"referenceDate\": \"<string>\",\n \"referenceNumber\": 123,\n \"taxId\": \"<string>\",\n \"totalIncomeAmount\": \"<string>\",\n \"totalIncomePercent\": \"<string>\",\n \"treasuryRevenueCode\": \"<string>\",\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payments.sandbox.lerian.net/v1/payments/darf")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"fineAmount\": \"<string>\",\n \"history\": \"<string>\",\n \"interestAmount\": \"<string>\",\n \"mainAmount\": \"<string>\",\n \"midazAccountId\": \"<string>\",\n \"name\": \"<string>\",\n \"personType\": \"<string>\",\n \"referenceDate\": \"<string>\",\n \"referenceNumber\": 123,\n \"taxId\": \"<string>\",\n \"totalIncomeAmount\": \"<string>\",\n \"totalIncomePercent\": \"<string>\",\n \"treasuryRevenueCode\": \"<string>\",\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "<string>",
"id": "<string>",
"providerId": "<string>",
"scheduledDate": "<string>",
"status": "<string>",
"totalAmount": "<string>",
"type": "<string>"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}Iniciar un pago DARF
Inicia un pago DARF (impuesto federal) con campos tributarios específicos.
POST
/
v1
/
payments
/
darf
Iniciar un pago DARF
curl --request POST \
--url https://payments.sandbox.lerian.net/v1/payments/darf \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"description": "<string>",
"dueDate": "<string>",
"fineAmount": "<string>",
"history": "<string>",
"interestAmount": "<string>",
"mainAmount": "<string>",
"midazAccountId": "<string>",
"name": "<string>",
"personType": "<string>",
"referenceDate": "<string>",
"referenceNumber": 123,
"taxId": "<string>",
"totalIncomeAmount": "<string>",
"totalIncomePercent": "<string>",
"treasuryRevenueCode": "<string>",
"type": "<string>"
}
'import requests
url = "https://payments.sandbox.lerian.net/v1/payments/darf"
payload = {
"description": "<string>",
"dueDate": "<string>",
"fineAmount": "<string>",
"history": "<string>",
"interestAmount": "<string>",
"mainAmount": "<string>",
"midazAccountId": "<string>",
"name": "<string>",
"personType": "<string>",
"referenceDate": "<string>",
"referenceNumber": 123,
"taxId": "<string>",
"totalIncomeAmount": "<string>",
"totalIncomePercent": "<string>",
"treasuryRevenueCode": "<string>",
"type": "<string>"
}
headers = {
"X-Organization-Id": "<x-organization-id>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Organization-Id': '<x-organization-id>',
'Idempotency-Key': '<idempotency-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: '<string>',
dueDate: '<string>',
fineAmount: '<string>',
history: '<string>',
interestAmount: '<string>',
mainAmount: '<string>',
midazAccountId: '<string>',
name: '<string>',
personType: '<string>',
referenceDate: '<string>',
referenceNumber: 123,
taxId: '<string>',
totalIncomeAmount: '<string>',
totalIncomePercent: '<string>',
treasuryRevenueCode: '<string>',
type: '<string>'
})
};
fetch('https://payments.sandbox.lerian.net/v1/payments/darf', 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://payments.sandbox.lerian.net/v1/payments/darf",
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([
'description' => '<string>',
'dueDate' => '<string>',
'fineAmount' => '<string>',
'history' => '<string>',
'interestAmount' => '<string>',
'mainAmount' => '<string>',
'midazAccountId' => '<string>',
'name' => '<string>',
'personType' => '<string>',
'referenceDate' => '<string>',
'referenceNumber' => 123,
'taxId' => '<string>',
'totalIncomeAmount' => '<string>',
'totalIncomePercent' => '<string>',
'treasuryRevenueCode' => '<string>',
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Organization-Id: <x-organization-id>"
],
]);
$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://payments.sandbox.lerian.net/v1/payments/darf"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"fineAmount\": \"<string>\",\n \"history\": \"<string>\",\n \"interestAmount\": \"<string>\",\n \"mainAmount\": \"<string>\",\n \"midazAccountId\": \"<string>\",\n \"name\": \"<string>\",\n \"personType\": \"<string>\",\n \"referenceDate\": \"<string>\",\n \"referenceNumber\": 123,\n \"taxId\": \"<string>\",\n \"totalIncomeAmount\": \"<string>\",\n \"totalIncomePercent\": \"<string>\",\n \"treasuryRevenueCode\": \"<string>\",\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://payments.sandbox.lerian.net/v1/payments/darf")
.header("X-Organization-Id", "<x-organization-id>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"fineAmount\": \"<string>\",\n \"history\": \"<string>\",\n \"interestAmount\": \"<string>\",\n \"mainAmount\": \"<string>\",\n \"midazAccountId\": \"<string>\",\n \"name\": \"<string>\",\n \"personType\": \"<string>\",\n \"referenceDate\": \"<string>\",\n \"referenceNumber\": 123,\n \"taxId\": \"<string>\",\n \"totalIncomeAmount\": \"<string>\",\n \"totalIncomePercent\": \"<string>\",\n \"treasuryRevenueCode\": \"<string>\",\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payments.sandbox.lerian.net/v1/payments/darf")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"fineAmount\": \"<string>\",\n \"history\": \"<string>\",\n \"interestAmount\": \"<string>\",\n \"mainAmount\": \"<string>\",\n \"midazAccountId\": \"<string>\",\n \"name\": \"<string>\",\n \"personType\": \"<string>\",\n \"referenceDate\": \"<string>\",\n \"referenceNumber\": 123,\n \"taxId\": \"<string>\",\n \"totalIncomeAmount\": \"<string>\",\n \"totalIncomePercent\": \"<string>\",\n \"treasuryRevenueCode\": \"<string>\",\n \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "<string>",
"id": "<string>",
"providerId": "<string>",
"scheduledDate": "<string>",
"status": "<string>",
"totalAmount": "<string>",
"type": "<string>"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}{
"code": "PBP-0001",
"details": {},
"message": "dueDate must be in YYYY-MM-DD format",
"title": "Bad Request"
}Autorizaciones
Bearer token authentication (format: "Bearer {token}")
Encabezados
Tenant organization ID
Idempotency key (UUID v4 or v7)
Cuerpo
application/json
DARF payment payload
¿Esta página le ayudó?
⌘I

