Update a Dynamic Charge with Due Date
curl --request PATCH \
--url https://plugin-pix-indirect.api.lerian.net/v1/collections/duedate/{collection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--data '
{
"additionalInfo": {
"customerId": "67890",
"orderId": "12345"
},
"description": "Payment for order #12345",
"dueDate": "2024-12-31",
"metadata": {},
"receiverKey": "+5511999999999",
"tags": [
"ecommerce",
"subscription"
],
"validAfterDue": 5
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://plugin-pix-indirect.api.lerian.net/v1/collections/duedate/{collection_id}"
payload := strings.NewReader("{\n \"additionalInfo\": {\n \"customerId\": \"67890\",\n \"orderId\": \"12345\"\n },\n \"description\": \"Payment for order #12345\",\n \"dueDate\": \"2024-12-31\",\n \"metadata\": {},\n \"receiverKey\": \"+5511999999999\",\n \"tags\": [\n \"ecommerce\",\n \"subscription\"\n ],\n \"validAfterDue\": 5\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Account-Id", "<x-account-id>")
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))
}const options = {
method: 'PATCH',
headers: {
'X-Account-Id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
additionalInfo: {customerId: '67890', orderId: '12345'},
description: 'Payment for order #12345',
dueDate: '2024-12-31',
metadata: {},
receiverKey: '+5511999999999',
tags: ['ecommerce', 'subscription'],
validAfterDue: 5
})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/collections/duedate/{collection_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/collections/duedate/{collection_id}"
payload = {
"additionalInfo": {
"customerId": "67890",
"orderId": "12345"
},
"description": "Payment for order #12345",
"dueDate": "2024-12-31",
"metadata": {},
"receiverKey": "+5511999999999",
"tags": ["ecommerce", "subscription"],
"validAfterDue": 5
}
headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"amount": {
"original": "100.00",
"abatement": {
"modality": "PERCENT",
"value": "3.00"
},
"discount": {
"modality": "AMOUNT_ADVANCE_BUSINESS_DAY",
"discountDateFixed": [
{
"date": "2024-12-25",
"value": "10.00"
}
],
"value": "5.00"
},
"fine": {
"modality": "PERCENT",
"value": "2.00"
},
"interest": {
"modality": "PERCENTAGE_PER_MONTH_CALENDAR_DAYS",
"value": "1.00"
}
},
"createdAt": "2024-01-15T10:30:00Z",
"debtor": {
"document": "52998224725",
"name": "João da Silva",
"address": "Rua das Flores, 123",
"city": "São Paulo",
"email": "joao@example.com",
"state": "SP",
"zipCode": "01310-100"
},
"dueDate": "2024-12-31",
"emv": "00020126580014br.gov.bcb.pix...",
"id": "550e8400-e29b-41d4-a716-446655440010",
"locationUrl": "https://api.example.com/qr/550e8400",
"receiver": {
"address": "Rua das Flores, 123",
"city": "São Paulo",
"document": "52998224725",
"name": "João da Silva",
"state": "SP",
"zipCode": "01310-100",
"tradeName": "Company Name"
},
"receiverKey": "+5511999999999",
"review": 0,
"status": "ACTIVE",
"txId": "TXabcdefghijklmno123456789",
"updatedAt": "2024-01-20T14:45:00Z",
"validAfterDue": 5,
"additionalInfo": {
"customerId": "67890",
"orderId": "12345"
},
"deletedAt": "2024-01-25T10:30:00Z",
"description": "Payment for order #12345",
"metadata": {},
"tags": [
"ecommerce",
"subscription"
]
}{
"message": "<string>",
"code": "<string>",
"title": "<string>",
"fields": {},
"headers": {},
"paths": {},
"queryParams": {},
"raw": "<string>"
}{
"message": "<string>",
"code": "<string>",
"title": "<string>",
"fields": {},
"headers": {},
"paths": {},
"queryParams": {},
"raw": "<string>"
}{
"message": "<string>",
"code": "<string>",
"title": "<string>",
"fields": {},
"headers": {},
"paths": {},
"queryParams": {},
"raw": "<string>"
}Update a Dynamic Charge with Due Date
Use this endpoint to update a due date collection. Only collections in ACTIVE status can be updated.
PATCH
/
v1
/
collections
/
duedate
/
{collection_id}
Update a Dynamic Charge with Due Date
curl --request PATCH \
--url https://plugin-pix-indirect.api.lerian.net/v1/collections/duedate/{collection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Account-Id: <x-account-id>' \
--data '
{
"additionalInfo": {
"customerId": "67890",
"orderId": "12345"
},
"description": "Payment for order #12345",
"dueDate": "2024-12-31",
"metadata": {},
"receiverKey": "+5511999999999",
"tags": [
"ecommerce",
"subscription"
],
"validAfterDue": 5
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://plugin-pix-indirect.api.lerian.net/v1/collections/duedate/{collection_id}"
payload := strings.NewReader("{\n \"additionalInfo\": {\n \"customerId\": \"67890\",\n \"orderId\": \"12345\"\n },\n \"description\": \"Payment for order #12345\",\n \"dueDate\": \"2024-12-31\",\n \"metadata\": {},\n \"receiverKey\": \"+5511999999999\",\n \"tags\": [\n \"ecommerce\",\n \"subscription\"\n ],\n \"validAfterDue\": 5\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Account-Id", "<x-account-id>")
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))
}const options = {
method: 'PATCH',
headers: {
'X-Account-Id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
additionalInfo: {customerId: '67890', orderId: '12345'},
description: 'Payment for order #12345',
dueDate: '2024-12-31',
metadata: {},
receiverKey: '+5511999999999',
tags: ['ecommerce', 'subscription'],
validAfterDue: 5
})
};
fetch('https://plugin-pix-indirect.api.lerian.net/v1/collections/duedate/{collection_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://plugin-pix-indirect.api.lerian.net/v1/collections/duedate/{collection_id}"
payload = {
"additionalInfo": {
"customerId": "67890",
"orderId": "12345"
},
"description": "Payment for order #12345",
"dueDate": "2024-12-31",
"metadata": {},
"receiverKey": "+5511999999999",
"tags": ["ecommerce", "subscription"],
"validAfterDue": 5
}
headers = {
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"amount": {
"original": "100.00",
"abatement": {
"modality": "PERCENT",
"value": "3.00"
},
"discount": {
"modality": "AMOUNT_ADVANCE_BUSINESS_DAY",
"discountDateFixed": [
{
"date": "2024-12-25",
"value": "10.00"
}
],
"value": "5.00"
},
"fine": {
"modality": "PERCENT",
"value": "2.00"
},
"interest": {
"modality": "PERCENTAGE_PER_MONTH_CALENDAR_DAYS",
"value": "1.00"
}
},
"createdAt": "2024-01-15T10:30:00Z",
"debtor": {
"document": "52998224725",
"name": "João da Silva",
"address": "Rua das Flores, 123",
"city": "São Paulo",
"email": "joao@example.com",
"state": "SP",
"zipCode": "01310-100"
},
"dueDate": "2024-12-31",
"emv": "00020126580014br.gov.bcb.pix...",
"id": "550e8400-e29b-41d4-a716-446655440010",
"locationUrl": "https://api.example.com/qr/550e8400",
"receiver": {
"address": "Rua das Flores, 123",
"city": "São Paulo",
"document": "52998224725",
"name": "João da Silva",
"state": "SP",
"zipCode": "01310-100",
"tradeName": "Company Name"
},
"receiverKey": "+5511999999999",
"review": 0,
"status": "ACTIVE",
"txId": "TXabcdefghijklmno123456789",
"updatedAt": "2024-01-20T14:45:00Z",
"validAfterDue": 5,
"additionalInfo": {
"customerId": "67890",
"orderId": "12345"
},
"deletedAt": "2024-01-25T10:30:00Z",
"description": "Payment for order #12345",
"metadata": {},
"tags": [
"ecommerce",
"subscription"
]
}{
"message": "<string>",
"code": "<string>",
"title": "<string>",
"fields": {},
"headers": {},
"paths": {},
"queryParams": {},
"raw": "<string>"
}{
"message": "<string>",
"code": "<string>",
"title": "<string>",
"fields": {},
"headers": {},
"paths": {},
"queryParams": {},
"raw": "<string>"
}{
"message": "<string>",
"code": "<string>",
"title": "<string>",
"fields": {},
"headers": {},
"paths": {},
"queryParams": {},
"raw": "<string>"
}Authorizations
JWT bearer token issued by the identity provider.
Headers
Account ID (UUID format)
Path Parameters
Identifier of the due date collection
Body
application/json
Show child attributes
Show child attributes
Example:
{ "customerId": "67890", "orderId": "12345" }
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"Payment for order #12345"
Example:
"2024-12-31"
Show child attributes
Show child attributes
Example:
"+5511999999999"
Example:
["ecommerce", "subscription"]
Example:
5
Response
OK
Show child attributes
Show child attributes
Example:
"2024-01-15T10:30:00Z"
Show child attributes
Show child attributes
Example:
"2024-12-31"
Example:
"00020126580014br.gov.bcb.pix..."
Example:
"550e8400-e29b-41d4-a716-446655440010"
Example:
"https://api.example.com/qr/550e8400"
Show child attributes
Show child attributes
Example:
"+5511999999999"
Example:
0
Example:
"ACTIVE"
Example:
"TXabcdefghijklmno123456789"
Example:
"2024-01-20T14:45:00Z"
Example:
5
Show child attributes
Show child attributes
Example:
{ "customerId": "67890", "orderId": "12345" }
Example:
"2024-01-25T10:30:00Z"
Example:
"Payment for order #12345"
Show child attributes
Show child attributes
Example:
["ecommerce", "subscription"]
Was this page helpful?

