Boleto

Boleto is a method you can use to charge your customers or fund your Stark Bank account. Here, we will guide you how to create and manage boletosYou have the flexibility to create, review, delete, and generate PDF for your Boletos.Additionally, you can split a Boleto payment among different receivers. To do this, you need to create a Split Receiver and add the receiver to the Splits array.Boleto StatusEach boleto has a status that can change over time according to its life cycle:boleto-statusBoleto LogEvery time we make a change to a boleto, we create a log. Logs are pretty useful for understanding the life cycle of each boleto and the changes that happened to itHere you can see the flow of possible events:boleto-log

RESOURCE SUMMARY
Boleto creation
Generate a customized Boleto
Boleto
Canceling
Cancel a Boleto registration. After the Boleto registration is canceled, it won't be possible to pay it anymore
Boleto
Consulting
Track all generated Boleto
Boleto Holmes
Track all updated boleto status in less than an hour

Setup in Sandbox/Production

For each environment:1. Create an account at Stark Bank.2. Create asynchronous Webhook subscriptions to receive update Events. Register an URL using the POST Webhook route to receive Events about the following resources:  2.1 Boleto: Creation and updates of Boletos

Creating Boletos

Boleto is a resource that can be used to receive payments from your clients.To create a Boleto, you need to provide required parameters such as amount, name, taxId, streetLine1, streetLine2, district, city, stateCode, and zipCode.Additionally, you have the option to include some optional parameters, such as due, fine, interest, overdueLimit, receiverName, receiverTaxId, tags, descriptions, and discounts.Examples of these parameters are shown below:

Python


import starkbank

boletos = starkbank.boleto.create([
    starkbank.Boleto(
        amount=400000,
        name="Iron Bank S.A.",
        tax_id="20.018.183/0001-80",
        street_line_1="Av. Faria Lima, 1844",
        street_line_2="CJ 13",
        district="Itaim Bibi",
        city="São Paulo",
        state_code="SP",
        zip_code="01500-000",
    )
])

for boleto in boletos:
    print(boleto)
  

Javascript


const starkbank = require('starkbank');

(async() => {
    let boletos = await starkbank.boleto.create([
        {
            amount: 400000,
            name: 'Iron Bank S.A.',
            taxId: '20.018.183/0001-80', 
            streetLine1: 'Av. Faria Lima, 1844', 
            streetLine2: 'CJ 13',
            district: 'Itaim Bibi', 
            city: 'São Paulo',
            stateCode: 'SP',
            zipCode: '01500-000'
        },
    ]);

    for (let boleto of boletos) {
        console.log(boleto);
    }
})();
  

PHP


$boletos = StarkBank\Boleto::create([
    new StarkBank\Boleto([
        "amount" => 400000,
        "name" => "Iron Bank S.A.",
        "taxId" => "20.018.183/0001-80", 
        "streetLine1" => "Av. Faria Lima, 1844", 
        "streetLine2" => "CJ 13",
        "district" => "Itaim Bibi", 
        "city" => "São Paulo",
        "stateCode" => "SP",
        "zipCode" => "01500-000"
    ])
]);

foreach($boletos as $boleto){
    print_r($boleto);
}
  

Java


import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

List<Boleto> boletos = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("amount", 400000);
data.put("name", "Iron Bank S.A.");
data.put("taxId", "20.018.183/0001-80");
data.put("streetLine1", "Av. Faria Lima, 1844");
data.put("streetLine2", "CJ 13");
data.put("district", "Itaim Bibi");
data.put("city", "São Paulo");
data.put("stateCode", "SP");
data.put("zipCode", "01500-000");

boletos.add(new Boleto(data));

boletos = Boleto.create(boletos);

for (Boleto boleto : boletos){
    System.out.println(boleto);
}
  

Ruby


require('starkbank')

boletos = StarkBank::Boleto.create(
    [
        StarkBank::Boleto.new(
            amount: 400000,
            name: 'Iron Bank S.A.',
            street_line_1: 'Av. Faria Lima, 1844',
            street_line_2: 'CJ 13',
            city: 'São Paulo',
            state_code: 'SP',
            zip_code: '01500-000',
            tax_id: '20.018.183/0001-80'
        )
    ]
)

boletos.each do |boleto|
    puts boleto
end
  

Elixir


boletos = StarkBank.Boleto.create!([
    %StarkBank.Boleto{
        amount: 400000,
        name: "Iron Bank S.A.",
        street_line_1: "Av. Faria Lima, 1844",
        street_line_2: "CJ 13",
        district: "Itaim Bibi",
        city: "São Paulo",
        state_code: "SP",
        zip_code: "01500-000",
        tax_id: "20.018.183/0001-80",
    }
])

for payment <- payments do
    payment |> IO.inspect
end
  

C#


using System;
using System.Collections.Generic;

List<StarkBank.Boleto> boletos = StarkBank.Boleto.Create(
    new List<StarkBank.Boleto> {
        new StarkBank.Boleto(
            amount: 400000,
            name: "Iron Bank S.A.",
            streetLine1: "Av. Faria Lima, 1844",
            streetLine2: "CJ 13",
            district: "Itaim Bibi",
            city: "Sao Paulo",
            stateCode: "SP",
            zipCode: "01500-000",
            taxID: "20.018.183/0001-80"
        )
    }
);

foreach(StarkBank.Boleto boleto in boletos)
{
    Console.WriteLine(boleto);
}
  

Go


package main

import (
    "fmt"
    "github.com/starkbank/sdk-go/starkbank/boleto"
)

func main() {

    boletos, err := boleto.Create(
        []boleto.Boleto{
            {
                Amount:       400000,
                Name:         "Iron Bank S.A.",
                TaxId:        "20.018.183/0001-80",
                StreetLine1:  "Av. Faria Lima, 1844",
                StreetLine2:  "CJ 13",
                District:     "Itaim Bibi",
                City:         "São Paulo",
                StateCode:    "SP",
                ZipCode:      "01500-000"
            }, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message))
        }
    }

    for _, boleto := range boletos {
        fmt.Printf("%+v", boleto)
    }
}
  

Clojure


(def boletos (starkbank.boleto/create [{
    :amount 400000
    :name "Iron Bank S.A."
    :street-line-1 "Av. Faria Lima, 1844"
    :street-line-2 "CJ 13"
    :district "Itaim Bibi"
    :city "São Paulo"
    :state-code "SP"
    :zip-code "01500-000"
    :tax-id "20.018.183/0001-80"
}]))
(dorun (map println boletos))
  

Curl


curl --location --request POST '{{baseUrl}}/v2/boleto' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "boletos": [
        {
            "amount": 400000,
            "name": "Iron Bank S.A.",
            "taxId": "20.018.183/0001-80",
            "streetLine1": "Av. Faria Lima, 1844",
            "streetLine2": "CJ 13",
            "district": "Itaim Bibi",
            "city": "São Paulo",
            "stateCode": "SP",
            "zipCode": "01500-000"
        },
    ]
}'
  
Response

Python


Boleto(
    id=6655767935451136,
    amount=400000,
    bar_code=34191826100004000001091007175647307144464000,
    city=São Paulo,
    created=2020-04-23 23:36:08.129614,
    descriptions=[],
    discounts=[],
    district=Itaim Bibi,
    due=2020-05-21,
    fee=0,
    fine=2.0,
    interest=1.0,
    line=34191.09107 07175.647309 71444.640008 1 82610000400000,
    name=Iron Bank S.A.,
    our_number=10445145,
    transaction_ids=[],
    overdue_limit=59,
    receiver_name=Winterfell S. A.,
    receiver_tax_id=71.735.814/0001-12,
    state_code=SP,
    status=created,
    street_line_1=Av. Faria Lima, 1844,
    street_line_2=CJ 13,
    tags=[],
    tax_id=20.018.183/0001-80,
    zip_code=01500-000,
    workspace_id=5083989094170624
)
  

Javascript


Boleto {
    id: '6655767935451136',
    amount: 400000,
    name: 'Iron Bank S.A.',
    taxId: '20.018.183/0001-80',
    streetLine1: 'Av. Faria Lima, 1844',
    streetLine2: 'CJ 13',
    district: 'Itaim Bibi',
    city: 'São Paulo',
    stateCode: 'SP',
    zipCode: '01500-000',
    due: '2020-05-21T02:59:59.999999+00:00',
    fine: 2.0,
    interest: 1.0,
    ourNumber: '10445145',
    transactionIds: [],
    overdueLimit: 59,
    receiverName: 'Winterfell S.A.',
    receiverTaxId: '71.735.814/0001-12',
    tags: [],
    descriptions: [],
    discounts: [],
    fee: 0,
    line: '34191.09107 07176.307309 71444.640008 1 82610000400000',
    barCode: '34191826100004000001091007175647307144464000',
    status: 'created',
    created: '2020-04-23T23:36:10.789288+00:00',
    workspaceId: '5083989094170624'
}
  

PHP


StarkBank\Boleto Object
(
    [id] => 6655767935451136
    [amount] => 400000
    [name] => Iron Bank S.A.
    [taxId] => 20.018.183/0001-80
    [streetLine1] => Av. Faria Lima, 1844
    [streetLine2] => CJ 13
    [district] => Itaim Bibi
    [city] => São Paulo
    [stateCode] => SP
    [zipCode] => 01500-000
    [due] => DateTime Object
        (
            [date] => 2020-05-21 02:59:59.999999
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [fine] => 2.0
    [interest] => 1.0
    [ourNumber] => 10445145
    [transactionIds] => Array
        (
        )
    [overdueLimit] => 59
    [receiverName] => Winterfell S.A.
    [receiverTaxId] => 71.735.814/0001-12
    [tags] => Array
        (
        )

    [descriptions] => Array
        (
        )

    [discounts] => Array
        (
        )

    [fee] => 0
    [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000
    [barCode] => 34197826100004000001091007150227307144464000
    [status] => created
    [created] => DateTime Object
        (
            [date] => 2020-04-22 20:12:56.830070
            [timezone_type] => 1
            [timezone] => +00:00
        )
    [workspaceId] => 5083989094170624

)
  

Java


Boleto({
    "id": "6655767935451136",
    "amount": "400000",
    "name": "Iron Bank S.A.",
    "taxId": "20.018.183/0001-80",
    "streetLine1": "Av. Faria Lima, 1844",
    "streetLine2": "CJ 13",
    "district": "Itaim Bibi",
    "city": "São Paulo",
    "stateCode": "SP",
    "zipCode": "01500-000",
    "due": "2020-04-21T02:59:59.999999+00:00",
    "fine": 2.0,
    "interest": 1.0,
    "ourNumber": "10445145",
    "workspaceId": "5083989094170624",
    "transactionIds": [],
    "overdueLimit": 59,
    "receiverName": "Winterfell S.A.",
    "receiverTaxId": "71.735.814/0001-12",
    "tags": [],
    "descriptions": [],
    "discounts": [],
    "fee": 0,
    "line": "34191.09107 07027.987309 71444.640008 5 82310000400000",
    "barCode": "34191826100004000001091007175647307144464000",
    "status": "created",
    "created": "2020-04-23T23:28:13+00:00"
    "workspaceId": "5083989094170624"
})
  

Ruby


boleto(
    id: 6655767935451136,
    amount: 400000,
    name: Iron Bank S.A.,
    tax_id: 20.018.183/0001-80,
    street_line_1: Av. Faria Lima, 1844,
    street_line_2: CJ 13,
    district: Itaim Bibi,
    city: São Paulo,
    state_code: SP,
    zip_code: 01500-000,
    due: 2020-05-21T02:59:59.999999+00:00,
    fine: 2.0,
    interest: 1.0,
    our_number: 10445145,
    transaction_ids: [],
    overdue_limit: 59,
    receiver_name: Winterfell S.A.,
    receiver_tax_id: 71.735.814/0001-12,
    tags: [],
    descriptions: [],
    discounts: [],
    fee: 0,
    line: 34191.09107 07149.917309 71444.640008 1 82610000400000,
    bar_code: 34191826100004000001091007149917307144464000,
    status: created,
    created: 2020-04-23T19:59:25+00:00
    workspace_id: 5083989094170624
)
  

Elixir


%StarkBank.Boleto{
    amount: 400000,
    bar_code: "34191826100004000001091007175647307144464000",
    city: "São Paulo",
    created: ~U[2020-04-23 17:41:58.458035Z],
    descriptions: [],
    discounts: [],
    district: "Itaim Bibi",
    due: ~U[2020-05-21 02:59:59.999999Z],
    fee: 0,
    fine: 2.0,
    id: "6655767935451136",
    interest: 1.0,
    line: "34191.09107 07156.837309 71444.640008 8 82610000400000",
    name: "Iron Bank S.A.",
    our_number: "10445145",
    transaction_ids: [],
    overdue_limit: 59,
    receiver_name: "Winterfell S.A.",
    receiver_tax_id: "71.735.814/0001-12",
    state_code: "SP",
    status: "created",
    street_line_1: "Av. Faria Lima, 1844",
    street_line_2: "CJ 13",
    tags: [],
    tax_id: "20.018.183/0001-80",
    zip_code: "01500-000",
    workspace_id: "5083989094170624"
}
  

C#


Boleto(
    Amount: 400000,
    Name: Iron Bank S.A.,
    TaxID: 20.018.183/0001-80,
    StreetLine1: Av. Faria Lima, 1844,
    StreetLine2: CJ 13,
    District: Itaim Bibi,
    City: Sao Paulo,
    StateCode: SP,
    ZipCode: 01500-000,
    Due: 05/21/2020 23:59:59,
    Fine: 2.0,
    Interest: 1.0,
    OverdueLimit: 59,
    OurNumber: 10445145,
    TransactionIds: {  },
    ReceiverName: Wintefell S.A.,
    ReceiverTaxID: 71.735.814/0001-12,
    Tags: { },
    Descriptions: {  },
    Discounts: { },
    Fee: 0,
    Line: 34191.09107 07159.647309 71444.640008 1 82610000400000,
    BarCode: 34191826100004000001091007159647307144464000,
    Status: created,
    Created: 04/23/2020 15:53:22,
    WorkspaceId: 5083989094170624
    ID: 6655767935451136
)
  

Go


{
    Id:6655767935451136 
    Amount:400000 
    Name:Iron Bank S.A. 
    TaxId:20.018.183/0001-80 
    StreetLine1:Av. Faria Lima, 1844 
    StreetLine2:CJ 13 
    District:Itaim Bibi 
    City:São Paulo 
    StateCode:SP 
    ZipCode:01500-000 
    Due:2020-05-21 02:59:59.999999 +0000 +0000 
    Fine:2.0
    Interest:1.0
    OverdueLimit:59
    Descriptions:[] 
    Discounts:[]
    Tags:[] 
    ReceiverName:Winterfell S.A.
    ReceiverTaxId:71.735.814/0001-12
    Fee:0 
    Line:34191.09107 44555.427309 71444.640008 4 92570000400000 
    BarCode:34191826100004000001091007175647307144464000 
    Status:created 
    TransactionIds:[] 
    WorkspaceId:5083989094170624
    Created:2020-04-23 03:18:33.515597 +0000 +0000 
    OurNumber:10445554
}
  

Clojure


{:amount 400000,
 :fee 0,
 :tags [],
 :street-line-1 "Av. Faria Lima, 1844",
 :name "Iron Bank S.A.",
 :state-code "SP",
 :city "São Paulo",
 :tax-id "20.018.183/0001-80",
 :our-number "10445145",
 :transaction-ids [],
 :overdue-limit 59,
 :receiver-name "Winterfell S.A."
 :receiver-tax-id "71.735.814/0001-12"
 :created "2020-04-23T19:14:43.125462+00:00",
 :discounts [],
 :due "2020-05-21T02:59:59.999999+00:00",
 :street-line-2 "CJ 13",
 :line "34191.09107 07322.097309 71444.640008 1 82610000400000",
 :status "created",
 :interest 1.3,
 :id "6655767935451136",
 :fine 2.5,
 :zip-code "01500-000",
 :bar-code "34191826100004000001091007322097307144464000",
 :descriptions [],
 :district "Itaim Bibi"}
  

Curl


{
    "message": "Boleto(s) successfully created",
    "boletos": [
        {
            "id": "6655767935451136",
            "status": "created",
            "line": "34191.09107 07175.647309 71444.640008 1 82610000400000",
            "barCode": "34191826100004000001091007175647307144464000",
            "amount": 400000,
            "due": "2020-05-21T02:59:59.999999+00:00",
            "name": "Iron Bank S.A.",
            "taxId": "20.018.183/0001-80",
            "fine": 2.0,
            "interest": 1.0,
            "ourNumber": "10445145",
            "transactionIds": [],
            "overdueLimit": 59,
            "receiverName": "Winterfell S.A.",
            "receiverTaxId": "71.735.814/0001-12",
            "streetLine1": "Av. Faria Lima, 1844",
            "streetLine2": "CJ 13",
            "district": "Itaim Bibi",
            "city": "São Paulo",
            "stateCode": "SP",
            "zipCode": "01500-000",
            "tags": [],
            "workspaceId": "5083989094170624",
            "fee": 0,
            "descriptions": [],
            "discounts": [],
            "workspaceId": "5083989094170624"
        }
    ]
}
  

Creating Boleto with due, fine, interest, and overDueLimit parameters

Due: By adding this parameter, you can set the due date of the requested payment in ISO format.Example: "2020-11-25T17:59:26.000000+00:00." Default value: 2 days after creation.Fine: By adding this parameter, you can add a fine to the invoiced amount if the customer pays after the due date and time.Interest: By adding this parameter, you can add monthly interest, in percentage, charged if the customer pays after the due date.OverdueLimit: By adding this parameter, you can add time in days counted from the due date until the boleto expiration.After expiration, the invoice can no longer be paid.Default value: 5097600 (59 days).

Python


import starkbank

boletos = starkbank.boleto.create([
    starkbank.Boleto(
        amount=400000,
        due="2020-05-20",
        name="Iron Bank S.A.",
        tax_id="20.018.183/0001-80",
        fine=2.5,
        interest=1.3,
        overdue_limit=5,
        street_line_1="Av. Faria Lima, 1844",
        street_line_2="CJ 13",
        district="Itaim Bibi",
        city="São Paulo",
        state_code="SP",
        zip_code="01500-000"
    )
])

for boleto in boletos:
    print(boleto)
  

Javascript


const starkbank = require('starkbank');

(async() => {
    let boletos = await starkbank.boleto.create([
        {
            amount: 400000,
            name: 'Iron Bank S.A.',
            taxId: '20.018.183/0001-80', 
            streetLine1: 'Av. Faria Lima, 1844', 
            streetLine2: 'CJ 13',
            district: 'Itaim Bibi', 
            city: 'São Paulo',
            stateCode: 'SP',
            zipCode: '01500-000',
            due: '2020-05-20',
            fine: 2.5,
            interest: 1.3,
            overdueLimit: 5
        },
    ]);

    for (let boleto of boletos) {
        console.log(boleto);
    }
})();
  

PHP


$boletos = StarkBank\Boleto::create([
    new StarkBank\Boleto([
        "amount" => 400000,
        "name" => "Iron Bank S.A.",
        "taxId" => "20.018.183/0001-80", 
        "streetLine1" => "Av. Faria Lima, 1844", 
        "streetLine2" => "CJ 13",
        "district" => "Itaim Bibi", 
        "city" => "São Paulo",
        "stateCode" => "SP",
        "zipCode" => "01500-000",
        "due" => "2020-05-20",
        "fine" => 2.5,
        "interest" => 1.3,
        "overdueLimit" => 5
    ])
]);

foreach($boletos as $boleto){
    print_r($boleto);
}
  

Java


import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

List<Boleto> boletos = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("amount", 400000);
data.put("name", "Iron Bank S.A.");
data.put("taxId", "20.018.183/0001-80");
data.put("streetLine1", "Av. Faria Lima, 1844");
data.put("streetLine2", "CJ 13");
data.put("district", "Itaim Bibi");
data.put("city", "São Paulo");
data.put("stateCode", "SP");
data.put("zipCode", "01500-000");
data.put("due", "2020-05-20");
data.put("fine", 2.5);
data.put("interest", 1.3);
data.put("overdueLimit", 5);

boletos.add(new Boleto(data));

boletos = Boleto.create(boletos);

for (Boleto boleto : boletos){
    System.out.println(boleto);
}
  

Ruby


require('starkbank')

boletos = StarkBank::Boleto.create(
    [
        StarkBank::Boleto.new(
            amount: 400000,
            due: '2020-05-20',
            name: 'Iron Bank S.A.',
            street_line_1: 'Av. Faria Lima, 1844',
            street_line_2: 'CJ 13',
            district: 'Itaim Bibi',
            city: 'São Paulo',
            state_code: 'SP',
            zip_code: '01500-000',
            tax_id: '20.018.183/0001-80',
            overdue_limit: 5,
            fine: 2.5,
            interest: 1.3
        )
    ]
)

boletos.each do |boleto|
    puts boleto
end
  

Elixir


boletos = StarkBank.Boleto.create!([
    %StarkBank.Boleto{
        amount: 400000,
        due: "2020-05-20",
        name: "Iron Bank S.A.",
        street_line_1: "Av. Faria Lima, 1844",
        street_line_2: "CJ 13",
        district: "Itaim Bibi",
        city: "São Paulo",
        state_code: "SP",
        zip_code: "01500-000",
        tax_id: "20.018.183/0001-80",
        overdue_limit: 5,
        fine: 2.5,
        interest: 1.3
    }
])

for payment <- payments do
    payment |> IO.inspect
end
  

C#


using System;
using System.Collections.Generic;

List<StarkBank.Boleto> boletos = StarkBank.Boleto.Create(
    new List<StarkBank.Boleto> {
        new StarkBank.Boleto(
            amount: 400000,
            due: new DateTime(2020, 5, 20),
            name: "Iron Bank S.A.",
            streetLine1: "Av. Faria Lima, 1844",
            streetLine2: "CJ 13",
            district: "Itaim Bibi",
            city: "Sao Paulo",
            stateCode: "SP",
            zipCode: "01500-000",
            taxID: "20.018.183/0001-80",
            overdueLimit: 5,
            fine: 2.5,
            interest: 1.3
        )
    }
);

foreach(StarkBank.Boleto boleto in boletos)
{
    Console.WriteLine(boleto);
}
  

Go


package main

import (
    "fmt"
    "github.com/starkbank/sdk-go/starkbank/boleto"
)

func main() {

    due := time.Date(2020, 05, 20, 0, 0, 0, 0, time.UTC)

    boletos, err := boleto.Create(
        []boleto.Boleto{
            {
                Amount:       400000,
                Due:          &due,
                Name:         "Iron Bank S.A.",
                TaxId:        "20.018.183/0001-80",
                Fine:         2.5,
                Interest:     1.3,
                OverdueLimit: 5,
                StreetLine1:  "Av. Faria Lima, 1844",
                StreetLine2:  "CJ 13",
                District:     "Itaim Bibi",
                City:         "São Paulo",
                StateCode:    "SP",
                ZipCode:      "01500-000"
                },
            }, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message))
        }
    }

    for _, boleto := range boletos {
        fmt.Printf("%+v", boleto)
    }
}
  

Clojure


(def boletos (starkbank.boleto/create [{
    :amount 400000
    :due "2020-05-20"
    :name "Iron Bank S.A."
    :street-line-1 "Av. Faria Lima, 1844"
    :street-line-2 "CJ 13"
    :district "Itaim Bibi"
    :city "São Paulo"
    :state-code "SP"
    :zip-code "01500-000"
    :tax-id "20.018.183/0001-80"
    :overdue-limit 5
    :fine 2.5
    :interest 1.3
}]))
(dorun (map println boletos))
  

Curl


curl --location --request POST '{{baseUrl}}/v2/boleto' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "boletos": [
        {
            "amount": 400000,
            "due": "2020-05-20",
            "name": "Iron Bank S.A.",
            "taxId": "20.018.183/0001-80",
            "fine": 2.5,
            "interest": 1.3,
            "overdueLimit": 5,
            "streetLine1": "Av. Faria Lima, 1844",
            "streetLine2": "CJ 13",
            "district": "Itaim Bibi",
            "city": "São Paulo",
            "stateCode": "SP",
            "zipCode": "01500-000"
        },
    ]
}'
  
Response

Python


Boleto(
    id=6655767935451136,
    amount=400000,
    bar_code=34191826100004000001091007175647307144464000,
    city=São Paulo,
    created=2020-04-23 23:36:08.129614,
    descriptions=[],
    discounts=[],
    district=Itaim Bibi,
    due=2020-05-21,
    fee=0,
    fine=2.5,
    interest=1.3,
    line=34191.09107 07175.647309 71444.640008 1 82610000400000,
    name=Iron Bank S.A.,
    our_number=10445145,
    transaction_ids=[],
    overdue_limit=5,
    receiver_name=Winterfell S. A.,
    receiver_tax_id=71.735.814/0001-12,
    state_code=SP,
    status=created,
    street_line_1=Av. Faria Lima, 1844,
    street_line_2=CJ 13,
    tags=[],
    tax_id=20.018.183/0001-80,
    zip_code=01500-000,
    workspace_id=5083989094170624
)
  

Javascript


Boleto {
    id: '6655767935451136',
    amount: 400000,
    name: 'Iron Bank S.A.',
    taxId: '20.018.183/0001-80',
    streetLine1: 'Av. Faria Lima, 1844',
    streetLine2: 'CJ 13',
    district: 'Itaim Bibi',
    city: 'São Paulo',
    stateCode: 'SP',
    zipCode: '01500-000',
    due: '2020-05-21T02:59:59.999999+00:00',
    fine: 2.5,
    interest: 1.3,
    ourNumber: '10445145',
    transactionIds: [],
    overdueLimit: 5,
    receiverName: 'Winterfell S.A.',
    receiverTaxId: '71.735.814/0001-12',
    tags: [],
    descriptions: [],
    discounts: [],
    fee: 0,
    line: '34191.09107 07176.307309 71444.640008 1 82610000400000',
    barCode: '34191826100004000001091007175647307144464000',
    status: 'created',
    created: '2020-04-23T23:36:10.789288+00:00',
    workspaceId: '5083989094170624'
}
  

PHP


StarkBank\Boleto Object
(
    [id] => 6655767935451136
    [amount] => 400000
    [name] => Iron Bank S.A.
    [taxId] => 20.018.183/0001-80
    [streetLine1] => Av. Faria Lima, 1844
    [streetLine2] => CJ 13
    [district] => Itaim Bibi
    [city] => São Paulo
    [stateCode] => SP
    [zipCode] => 01500-000
    [due] => DateTime Object
        (
            [date] => 2020-05-21 02:59:59.999999
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [fine] => 2.5
    [interest] => 1.3
    [ourNumber] => 10445145
    [transactionIds] => Array
        (
        )
    [overdueLimit] => 5
    [receiverName] => Winterfell S.A.
    [receiverTaxId] => 71.735.814/0001-12
    [tags] => Array
        (
        )

    [descriptions] => Array
        (
        )

    [discounts] => Array
        (
        )

    [fee] => 0
    [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000
    [barCode] => 34197826100004000001091007150227307144464000
    [status] => created
    [created] => DateTime Object
        (
            [date] => 2020-04-22 20:12:56.830070
            [timezone_type] => 1
            [timezone] => +00:00
        )
    [workspaceId] => 5083989094170624

)
  

Java


Boleto({
    "id": "6655767935451136",
    "amount": "400000",
    "name": "Iron Bank S.A.",
    "taxId": "20.018.183/0001-80",
    "streetLine1": "Av. Faria Lima, 1844",
    "streetLine2": "CJ 13",
    "district": "Itaim Bibi",
    "city": "São Paulo",
    "stateCode": "SP",
    "zipCode": "01500-000",
    "due": "2020-04-21T02:59:59.999999+00:00",
    "fine": 2.5,
    "interest": 1.3,
    "ourNumber": "10445145",
    "workspaceId": "5083989094170624",
    "transactionIds": [],
    "overdueLimit": 5,
    "receiverName": "Winterfell S.A.",
    "receiverTaxId": "71.735.814/0001-12",
    "tags": [],
    "descriptions": [],
    "discounts": [],
    "fee": 0,
    "line": "34191.09107 07027.987309 71444.640008 5 82310000400000",
    "barCode": "34191826100004000001091007175647307144464000",
    "status": "created",
    "created": "2020-04-23T23:28:13+00:00"
    "workspaceId": "5083989094170624"
})
  

Ruby


boleto(
    id: 6655767935451136,
    amount: 400000,
    name: Iron Bank S.A.,
    tax_id: 20.018.183/0001-80,
    street_line_1: Av. Faria Lima, 1844,
    street_line_2: CJ 13,
    district: Itaim Bibi,
    city: São Paulo,
    state_code: SP,
    zip_code: 01500-000,
    due: 2020-05-21T02:59:59.999999+00:00,
    fine: 2.5,
    interest: 1.3,
    our_number: 10445145,
    transaction_ids: [],
    overdue_limit: 5,
    receiver_name: Winterfell S.A.,
    receiver_tax_id: 71.735.814/0001-12,
    tags: [],
    descriptions: [],
    discounts: [],
    fee: 0,
    line: 34191.09107 07149.917309 71444.640008 1 82610000400000,
    bar_code: 34191826100004000001091007149917307144464000,
    status: created,
    created: 2020-04-23T19:59:25+00:00
    workspace_id: 5083989094170624
)
  

Elixir


%StarkBank.Boleto{
    amount: 400000,
    bar_code: "34191826100004000001091007175647307144464000",
    city: "São Paulo",
    created: ~U[2020-04-23 17:41:58.458035Z],
    descriptions: [],
    discounts: [],
    district: "Itaim Bibi",
    due: ~U[2020-05-21 02:59:59.999999Z],
    fee: 0,
    fine: 2.5,
    id: "6655767935451136",
    interest: 1.3,
    line: "34191.09107 07156.837309 71444.640008 8 82610000400000",
    name: "Iron Bank S.A.",
    our_number: "10445145",
    transaction_ids: [],
    overdue_limit: 5,
    receiver_name: "Winterfell S.A.",
    receiver_tax_id: "71.735.814/0001-12",
    state_code: "SP",
    status: "created",
    street_line_1: "Av. Faria Lima, 1844",
    street_line_2: "CJ 13",
    tags: [],
    tax_id: "20.018.183/0001-80",
    zip_code: "01500-000",
    workspace_id: "5083989094170624"
}
  

C#


Boleto(
    Amount: 400000,
    Name: Iron Bank S.A.,
    TaxID: 20.018.183/0001-80,
    StreetLine1: Av. Faria Lima, 1844,
    StreetLine2: CJ 13,
    District: Itaim Bibi,
    City: Sao Paulo,
    StateCode: SP,
    ZipCode: 01500-000,
    Due: 05/21/2020 23:59:59,
    Fine: 2.5,
    Interest: 1.3,
    OverdueLimit: 5,
    OurNumber: 10445145,
    TransactionIds: {  },
    ReceiverName: Wintefell S.A.,
    ReceiverTaxID: 71.735.814/0001-12,
    Tags: {},
    Descriptions: {  },
    Discounts: {},
    Fee: 0,
    Line: 34191.09107 07159.647309 71444.640008 1 82610000400000,
    BarCode: 34191826100004000001091007159647307144464000,
    Status: created,
    Created: 04/23/2020 15:53:22,
    WorkspaceId: 5083989094170624
    ID: 6655767935451136
)
  

Go


{
    Id:6655767935451136 
    Amount:400000 
    Name:Iron Bank S.A. 
    TaxId:20.018.183/0001-80 
    StreetLine1:Av. Faria Lima, 1844 
    StreetLine2:CJ 13 
    District:Itaim Bibi 
    City:São Paulo 
    StateCode:SP 
    ZipCode:01500-000 
    Due:2020-05-21 02:59:59.999999 +0000 +0000 
    Fine:2.5
    Interest:1.3 
    OverdueLimit:5
    Descriptions:[] 
    Discounts:[]
    Tags:[] 
    ReceiverName:Winterfell S.A.
    ReceiverTaxId:71.735.814/0001-12
    Fee:0 
    Line:34191.09107 44555.427309 71444.640008 4 92570000400000 
    BarCode:34191826100004000001091007175647307144464000 
    Status:created 
    TransactionIds:[] 
    WorkspaceId:5083989094170624
    Created:2020-04-23 03:18:33.515597 +0000 +0000 
    OurNumber:10445554
}
  

Clojure


{:amount 400000,
 :fee 0,
 :tags [],
 :street-line-1 "Av. Faria Lima, 1844",
 :name "Iron Bank S.A.",
 :state-code "SP",
 :city "São Paulo",
 :tax-id "20.018.183/0001-80",
 :our-number "10445145",
 :transaction-ids [],
 :overdue-limit 5,
 :receiver-name "Winterfell S.A."
 :receiver-tax-id "71.735.814/0001-12"
 :created "2020-04-23T19:14:43.125462+00:00",
 :discounts [],
 :due "2020-05-21T02:59:59.999999+00:00",
 :street-line-2 "CJ 13",
 :line "34191.09107 07322.097309 71444.640008 1 82610000400000",
 :status "created",
 :interest 1.3,
 :id "6655767935451136",
 :fine 2.5,
 :zip-code "01500-000",
 :bar-code "34191826100004000001091007322097307144464000",
 :descriptions [],
 :district "Itaim Bibi"}
  

Curl


{
    "message": "Boleto(s) successfully created",
    "boletos": [
        {
            "id": "6655767935451136",
            "status": "created",
            "line": "34191.09107 07175.647309 71444.640008 1 82610000400000",
            "barCode": "34191826100004000001091007175647307144464000",
            "amount": 400000,
            "due": "2020-05-21T02:59:59.999999+00:00",
            "name": "Iron Bank S.A.",
            "taxId": "20.018.183/0001-80",
            "fine": 2.5,
            "interest": 1.3,
            "ourNumber": "10445145",
            "transactionIds": [],
            "overdueLimit": 5,
            "receiverName": "Winterfell S.A.",
            "receiverTaxId": "71.735.814/0001-12",
            "streetLine1": "Av. Faria Lima, 1844",
            "streetLine2": "CJ 13",
            "district": "Itaim Bibi",
            "city": "São Paulo",
            "stateCode": "SP",
            "zipCode": "01500-000",
            "tags": [],
            "workspaceId": "5083989094170624",
            "fee": 0,
            "descriptions": [],
            "discounts": [],
            "workspaceId": "5083989094170624"
        }
    ]
}
  

Creating Boleto with receiverName, receiverTaxId parameters

ReceiverName: By adding this parameter, you can set the name of the credit receiver (Sacador Avalista). If none is informed, workspace owner name will be used. If informed, receiverTaxId must also be informedExample: "Anthony Edward Stark"ReceiverTaxId: By adding this parameter, you can set the tax ID (CPF/CNPJ) of the credit receiver (Sacador Avalista). If none is informed, workspace owner tax ID will be used. If informed, receiverName must also be informed.Example: "20.018.183/0001-80"

Python


  import starkbank
  
  receiver = starkbank.splitreceiver.create(
        receiver=starkbank.SplitReceiver(
          name="Daenerys Targaryen Stormborn",
          tax_id="594.739.480-42",
          bank_code="341",
          branch_code="2201",
          account_number="76543-8",
          account_type="salary"
      )
  )
  
  print(receiver)  

Javascript


  Not yet available. Please contact us if you need this SDK.
    

PHP


  Not yet available. Please contact us if you need this SDK.
    

Java


  import com.starkbank.*;
  import java.util.Map;
  import java.util.List;
  import java.util.HashMap;
  import java.util.ArrayList;
  
  Map<String, Object> data = new HashMap<>();
  data.put("name", "Daenerys Targaryen Stormborn");
  data.put("taxId", "594.739.480-42");
  data.put("bankCode", "341");
  data.put("branchCode", "2201");
  data.put("accountNumber", "76543-8");
  data.put("accountType", "salary");
  
  SplitReceiver receiver = SplitReceiver.create(new SplitReceiver(data));
  
  System.out.println(receiver);  

Ruby


  Not yet available. Please contact us if you need this SDK.
    

Elixir


  Not yet available. Please contact us if you need this SDK.
    

C#


  Not yet available. Please contact us if you need this SDK.
    

Go


  Not yet available. Please contact us if you need this SDK.
    

Clojure


  Not yet available. Please contact us if you need this SDK.
    

Curl


  curl --location --request POST '{{baseUrl}}/v2/split-receiver' 
  --header 'Access-Id: {{accessId}}' 
  --header 'Access-Time: {{accessTime}}' 
  --header 'Access-Signature: {{accessSignature}}' 
  --header 'Content-Type: application/json' 
  --data-raw '{
      "receivers": [
          {
              "name": "Daenerys Targaryen Stormborn",
              "taxId": "594.739.480-42",
              "bankCode": "341",
              "branchCode": "2201",
              "accountNumber": "76543-8",
              "accountType": "salary"
          }
      ]
  }'
    
Response

Python


  SplitReceiver(
      account_number=76543-8,
      account_type=salary,
      bank_code=341,
      branch_code=2201,
      created=2024-01-30 20:17:12.586145,
      id=5710191014182912,
      name=Daenerys Targaryen Stormborn,
      status=created,
      tags=[],
      tax_id=594.739.480-42,
      updated=2024-01-30 20:17:12.586152
  )
    

Javascript


  Not yet available. Please contact us if you need this SDK.
          

PHP


  Not yet available. Please contact us if you need this SDK.
    

Java


  SplitReceiver({
      "accountNumber": 76543-8,
      "accountType": salary,
      "bankCode": 341,
      "branchCode": 2201,
      "created": 2024-01-30 20:17:12.586145,
      "id": 5710191014182912,
      "name": Daenerys Targaryen Stormborn,
      "status": created,
      "tags": [],
      "taxId": 594.739.480-42,
      "updated": 2024-01-30 20:17:12.586152
  })
    

Ruby


  Not yet available. Please contact us if you need this SDK.
    

Elixir


  Not yet available. Please contact us if you need this SDK.
    

C#


  Not yet available. Please contact us if you need this SDK.
    

Go


  Not yet available. Please contact us if you need this SDK.
    

Clojure


  Not yet available. Please contact us if you need this SDK.
    

Curl


  {
      "receivers": [
          {
              "accountNumber": "76543-8",
              "accountType": "salary",
              "bankCode": "341",
              "branchCode": "2201",
              "created": "2024-01-30T20:32:56.182031+00:00",
              "id": "5642933638266880",
              "name": "Daenerys Targaryen Stormborn",
              "status": "created",
              "tags": [],
              "taxId": "594.739.480-42",
              "updated": "2024-01-30T20:32:56.182039+00:00"
          }
      ]
  }
    

Creating Boleto with discounts, description and tags parameters

Discounts: With this parameter, you can set a list of up to 5 discounts specifying the discount percentage and the deadline until the discount is valid.Tags: By adding this parameter, you can have an array of strings to mark the entity for future queries.All tags will be converted to uppercase.Descriptions: With this parameter, you will have a list of up to 15 descriptions containing information to help understand the reason for the charge.For each description, you can add a title key and a description value.

Python


import starkbank

boletos = starkbank.boleto.create([
    starkbank.Boleto(
        amount=400000,
        name="Iron Bank S.A.",
        tax_id="20.018.183/0001-80",
        street_line_1="Av. Faria Lima, 1844",
        street_line_2="CJ 13",
        district="Itaim Bibi",
        city="São Paulo",
        state_code="SP",
        zip_code="01500-000",
        tags=["War supply", "Invoice #1234"],
        description=[
            {"text": "product A", "amount": 123}
        ],
        discounts=[
            {"percentage": 10, "date": "2020-04-25"}
        ]
    )
])

for boleto in boletos:
    print(boleto)
  

Javascript


const starkbank = require('starkbank');

(async() => {
    let boletos = await starkbank.boleto.create([
        {
            amount: 400000,
            name: 'Iron Bank S.A.',
            taxId: '20.018.183/0001-80', 
            streetLine1: 'Av. Faria Lima, 1844', 
            streetLine2: 'CJ 13',
            district: 'Itaim Bibi', 
            city: 'São Paulo',
            stateCode: 'SP',
            zipCode: '01500-000',
            tags: ['War supply', 'Invoice #1234'],
            description: [
                {'text': 'product A', 'amount': 123}
            ],
            discounts: [
                {'percentage': 10, 'date': '2020-04-25'}
            ]
        },
    ]);

    for (let boleto of boletos) {
        console.log(boleto);
    }
})();
  

PHP


$boletos = StarkBank\Boleto::create([
    new StarkBank\Boleto([
        "amount" => 400000,
        "name" => "Iron Bank S.A.",
        "taxId" => "20.018.183/0001-80", 
        "streetLine1" => "Av. Faria Lima, 1844", 
        "streetLine2" => "CJ 13",
        "district" => "Itaim Bibi", 
        "city" => "São Paulo",
        "stateCode" => "SP",
        "zipCode" => "01500-000",
        "tags" => ["War supply", "Invoice #1234"],
        "description" => [
            ["text" => "product A", "amount" => 123}]
        ]
        "discounts" => [
            ["percentage" => 10, "date" => "2020-04-25"]
        ]
    ])
]);

foreach($boletos as $boleto){
    print_r($boleto);
}
  

Java


import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

List<Boleto> boletos = new ArrayList<>();
HashMap<String, Object> data = new HashMap<>();
data.put("amount", 400000);
data.put("name", "Iron Bank S.A.");
data.put("taxId", "20.018.183/0001-80");
data.put("streetLine1", "Av. Faria Lima, 1844");
data.put("streetLine2", "CJ 13");
data.put("district", "Itaim Bibi");
data.put("city", "São Paulo");
data.put("stateCode", "SP");
data.put("zipCode", "01500-000");
data.put("tags", new String[]{"War supply", "Invoice #1234"});

List<HashMap<String, Object>> description = new ArrayList<>();
description.add(new HashMap<>());
description.get(0).put("text", "product A")
description.get(0).put("amount", "123")
data.put("description", description);

List<HashMap<String, Object>> discounts = new ArrayList<>();
discounts.add(new HashMap<>());
discounts.get(0).put("percentage", 5);
discounts.get(0).put("date", "2020-04-25");
data.put("discounts", discounts);

boletos.add(new Boleto(data));

boletos = Boleto.create(boletos);

for (Boleto boleto : boletos){
    System.out.println(boleto);
}
  

Ruby


require('starkbank')

boletos = StarkBank::Boleto.create(
    [
        StarkBank::Boleto.new(
            amount: 400000,
            name: 'Iron Bank S.A.',
            street_line_1: 'Av. Faria Lima, 1844',
            street_line_2: 'CJ 13',
            district: 'Itaim Bibi',
            city: 'São Paulo',
            state_code: 'SP',
            zip_code: '01500-000',
            tax_id: '20.018.183/0001-80',
            tags: ['War supply', 'Invoice #1234'],
            description: [
                {text: 'product A', amount: 123}
            ]
            discounts: [
                {percentage: 10, date: '2020-04-25'}
            ]
        )
    ]
)

boletos.each do |boleto|
    puts boleto
end
  

Elixir


boletos = StarkBank.Boleto.create!([
    %StarkBank.Boleto{
        amount: 400000,
        name: "Iron Bank S.A.",
        street_line_1: "Av. Faria Lima, 1844",
        street_line_2: "CJ 13",
        district: "Itaim Bibi",
        city: "São Paulo",
        state_code: "SP",
        zip_code: "01500-000",
        tax_id: "20.018.183/0001-80",
        tags: ["War supply", "Invoice #1234"],
        description: [
            %{text: "product A", amount: 123}
        ]
        discounts: [
            %{percentage: 10, date: "2020-04-25"}
        ]
    }
])

for payment <- payments do
    payment |> IO.inspect
end
  

C#


using System;
using System.Collections.Generic;

List<StarkBank.Boleto> boletos = StarkBank.Boleto.Create(
    new List<StarkBank.Boleto> {
        new StarkBank.Boleto(
            amount: 400000,
            name: "Iron Bank S.A.",
            streetLine1: "Av. Faria Lima, 1844",
            streetLine2: "CJ 13",
            district: "Itaim Bibi",
            city: "Sao Paulo",
            stateCode: "SP",
            zipCode: "01500-000",
            taxID: "20.018.183/0001-80",
            tags: new List<string> { "War supply", "Invoice #1234" },
            description: new List<Dictionary<string, object>>() {
                new Dictionary<string, object> {
                    {"text", "product A"},
                    {"amount", 123}
                }
            discounts: new List<Dictionary<string, object>>() {
                new Dictionary<string, object> {
                    {"percentage", 10},
                    {"date", new DateTime(2020, 4, 25)}
                }
            }
        )
    }
);

foreach(StarkBank.Boleto boleto in boletos)
{
    Console.WriteLine(boleto);
}
  

Go


package main

import (
    "fmt"
    "github.com/starkbank/sdk-go/starkbank/boleto"
)

func main() {

    boletos, err := boleto.Create(
        []boleto.Boleto{
            {
                Amount:       400000,
                Name:         "Iron Bank S.A.",
                TaxId:        "20.018.183/0001-80",
                StreetLine1:  "Av. Faria Lima, 1844",
                StreetLine2:  "CJ 13",
                District:     "Itaim Bibi",
                City:         "São Paulo",
                StateCode:    "SP",
                ZipCode:      "01500-000",
                Tags:         []string{"War Supply", "Invoice #1234"},
                Description:    []map[string]interface{}{
                    {
                        "text": "product A",
                        "amount": 123,
                    },
                }
                Discounts:    []map[string]interface{}{
                    {
                        "percentage": 10,
                        "date": "2020-04-25",
                    },
                }
            }, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message))
        }
    }

    for _, boleto := range boletos {
        fmt.Printf("%+v", boleto)
    }
}
  

Clojure


(def boletos (starkbank.boleto/create [{
    :amount 400000
    :name "Iron Bank S.A."
    :street-line-1 "Av. Faria Lima, 1844"
    :street-line-2 "CJ 13"
    :district "Itaim Bibi"
    :city "São Paulo"
    :state-code "SP"
    :zip-code "01500-000"
    :tax-id "20.018.183/0001-80"
    :tags ["War supply" "Invoice #1234"]
    :description [
        {:text "product A" :amount 123}
    ]
    :discounts [
        {:percentage 10 :date "2020-04-25"}
    ]
}]))
(dorun (map println boletos))
  

Curl


curl --location --request POST '{{baseUrl}}/v2/boleto' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "boletos": [
        {
            "amount": 400000,
            "name": "Iron Bank S.A.",
            "taxId": "20.018.183/0001-80",
            "streetLine1": "Av. Faria Lima, 1844",
            "streetLine2": "CJ 13",
            "district": "Itaim Bibi",
            "city": "São Paulo",
            "stateCode": "SP",
            "zipCode": "01500-000",
            "tags": ["War supply", "Invoice #1234"],
            "description": [                 {
                    "text": "product A",
                    "amount": 123
                }
            ],
            "discounts": [                 {
                    "percentage": 10,
                    "date": "2020-04-25"
                }
            ]
        },
    ]
}'
  
Response

Python


Boleto(
    id=6655767935451136,
    amount=400000,
    bar_code=34191826100004000001091007175647307144464000,
    city=São Paulo,
    created=2020-04-23 23:36:08.129614,
    descriptions=[{'text': 'product A', 'amount': 123}],
    discounts=[{'date': '2020-04-26T02:59:59.999999+00:00', 'percentage': 10.0}],
    district=Itaim Bibi,
    due=2020-05-21,
    fee=0,
    fine=2.0,
    interest=1.0,
    line=34191.09107 07175.647309 71444.640008 1 82610000400000,
    name=Iron Bank S.A.,
    our_number=10445145,
    transaction_ids=[],
    overdue_limit=59,
    receiver_name=Winterfell S. A.,
    receiver_tax_id=71.735.814/0001-12,
    state_code=SP,
    status=created,
    street_line_1=Av. Faria Lima, 1844,
    street_line_2=CJ 13,
    tags=['war supply', 'invoice #1234'],
    tax_id=20.018.183/0001-80,
    zip_code=01500-000,
    workspace_id=5083989094170624,
)
  

Javascript


Boleto {
    id: '6655767935451136',
    amount: 400000,
    name: 'Iron Bank S.A.',
    taxId: '20.018.183/0001-80',
    streetLine1: 'Av. Faria Lima, 1844',
    streetLine2: 'CJ 13',
    district: 'Itaim Bibi',
    city: 'São Paulo',
    stateCode: 'SP',
    zipCode: '01500-000',
    due: '2020-05-21T02:59:59.999999+00:00',
    fine: 2.0,
    interest: 1.0,
    ourNumber: '10445145',
    transactionIds: [],
    overdueLimit: 59,
    receiverName: 'Winterfell S.A.',
    receiverTaxId: '71.735.814/0001-12',
    tags: [ 'war supply', 'invoice #1234' ],
    descriptions: [ { text: 'product A', amount: 123} ],
    discounts: [ { date: '2020-04-26T02:59:59.999999+00:00', percentage: 10 } ],
    fee: 0,
    line: '34191.09107 07176.307309 71444.640008 1 82610000400000',
    barCode: '34191826100004000001091007175647307144464000',
    status: 'created',
    created: '2020-04-23T23:36:10.789288+00:00',
    workspaceId: '5083989094170624',
}
  

PHP


StarkBank\Boleto Object
(
    [id] => 6655767935451136
    [amount] => 400000
    [name] => Iron Bank S.A.
    [taxId] => 20.018.183/0001-80
    [streetLine1] => Av. Faria Lima, 1844
    [streetLine2] => CJ 13
    [district] => Itaim Bibi
    [city] => São Paulo
    [stateCode] => SP
    [zipCode] => 01500-000
    [due] => DateTime Object
        (
            [date] => 2020-05-21 02:59:59.999999
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [fine] => 2.0
    [interest] => 1.0
    [ourNumber] => 10445145
    [transactionIds] => Array
        (
        )
    [overdueLimit] => 59
    [receiverName] => Winterfell S.A.
    [receiverTaxId] => 71.735.814/0001-12
    [tags] => Array
        (
            [0] => war supply
            [1] => invoice #1234
        )

    [descriptions] => Array
        (
            [0] => Array
                (
                    [text] => product A
                    [amount] => 123
                )

        )

    [discounts] => Array
        (
            [0] => Array
                (
                    [date] => 2020-04-26T02:59:59.999999+00:00
                    [percentage] => 10
                )

        )

    [fee] => 0
    [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000
    [barCode] => 34197826100004000001091007150227307144464000
    [status] => created
    [created] => DateTime Object
        (
            [date] => 2020-04-22 20:12:56.830070
            [timezone_type] => 1
            [timezone] => +00:00
        )
    [workspaceId] => 5083989094170624

)
  

Java


Boleto({
    "id": "6655767935451136",
    "amount": "400000",
    "name": "Iron Bank S.A.",
    "taxId": "20.018.183/0001-80",
    "streetLine1": "Av. Faria Lima, 1844",
    "streetLine2": "CJ 13",
    "district": "Itaim Bibi",
    "city": "São Paulo",
    "stateCode": "SP",
    "zipCode": "01500-000",
    "due": "2020-04-21T02:59:59.999999+00:00",
    "fine": 2.0,
    "interest": 1.0,
    "ourNumber": "10445145",
    "workspaceId": "5083989094170624",
    "transactionIds": [],
    "overdueLimit": 59,
    "receiverName": "Winterfell S.A.",
    "receiverTaxId": "71.735.814/0001-12",
    "tags": ["war supply", "invoice #1234"],
    "descriptions": [
        {"text": "product A", "amount": 123}
    ],
    "discounts": [
        {"date": "2020-04-26T02:59:59.999999+00:00", "percentage": 10.0}
    ],
    "fee": 0,
    "line": "34191.09107 07027.987309 71444.640008 5 82310000400000",
    "barCode": "34191826100004000001091007175647307144464000",
    "status": "created",
    "created": "2020-04-23T23:28:13+00:00",
    "workspaceId": "5083989094170624"
})
  

Ruby


boleto(
    id: 6655767935451136,
    amount: 400000,
    name: Iron Bank S.A.,
    tax_id: 20.018.183/0001-80,
    street_line_1: Av. Faria Lima, 1844,
    street_line_2: CJ 13,
    district: Itaim Bibi,
    city: São Paulo,
    state_code: SP,
    zip_code: 01500-000,
    due: 2020-05-21T02:59:59.999999+00:00,
    fine: 2.0,
    interest: 1.0,
    our_number: 10445145,
    transaction_ids: [],
    overdue_limit: 59,
    receiver_name: Winterfell S.A.,
    receiver_tax_id: 71.735.814/0001-12,
    tags: ["war supply", "invoice #1234"],
    descriptions: [{"text"=>"product A", "amount"=>123}],
    discounts: [{"date"=>"2020-04-26T02:59:59.999999+00:00", "percentage"=>10.0}],
    fee: 0,
    line: 34191.09107 07149.917309 71444.640008 1 82610000400000,
    bar_code: 34191826100004000001091007149917307144464000,
    status: created,
    created: 2020-04-23T19:59:25+00:00,
    workspace_id: 5083989094170624
)
  

Elixir


%StarkBank.Boleto{
    amount: 400000,
    bar_code: "34191826100004000001091007175647307144464000",
    city: "São Paulo",
    created: ~U[2020-04-23 17:41:58.458035Z],
    descriptions: [
        %{"text" => "product A", "amount" => 123}
    ],
    discounts: [
        %{"date" => "2020-04-26T02:59:59.999999+00:00", "percentage" => 10.0}
    ],
    district: "Itaim Bibi",
    due: ~U[2020-05-21 02:59:59.999999Z],
    fee: 0,
    fine: 2.0,
    id: "6655767935451136",
    interest: 1.0,
    line: "34191.09107 07156.837309 71444.640008 8 82610000400000",
    name: "Iron Bank S.A.",
    our_number: "10445145",
    transaction_ids: [],
    overdue_limit: 59,
    receiver_name: "Winterfell S.A.",
    receiver_tax_id: "71.735.814/0001-12",
    state_code: "SP",
    status: "created",
    street_line_1: "Av. Faria Lima, 1844",
    street_line_2: "CJ 13",
    tags: ["war supply", "invoice #1234"],
    tax_id: "20.018.183/0001-80",
    zip_code: "01500-000",
    workspace_id: "5083989094170624",
}
  

C#


Boleto(
    Amount: 400000,
    Name: Iron Bank S.A.,
    TaxID: 20.018.183/0001-80,
    StreetLine1: Av. Faria Lima, 1844,
    StreetLine2: CJ 13,
    District: Itaim Bibi,
    City: Sao Paulo,
    StateCode: SP,
    ZipCode: 01500-000,
    Due: 05/21/2020 23:59:59,
    Fine: 2.0,
    Interest: 1.0,
    OverdueLimit: 59,
    OurNumber: 10445145,
    TransactionIds: {  },
    ReceiverName: Wintefell S.A.,
    ReceiverTaxID: 71.735.814/0001-12,
    Tags: { war supply, invoice #1234 },
    Descriptions: { { { text, product A }, { amount, 123 } }   },
    Discounts: { { { date, 2020-04-26T02:59:59.999999+00:00 }, { percentage, 10 } } },
    Fee: 0,
    Line: 34191.09107 07159.647309 71444.640008 1 82610000400000,
    BarCode: 34191826100004000001091007159647307144464000,
    Status: created,
    Created: 04/23/2020 15:53:22,
    WorkspaceId: 5083989094170624,
    ID: 6655767935451136
)
  

Go


{
    Id:6655767935451136 
    Amount:400000 
    Name:Iron Bank S.A. 
    TaxId:20.018.183/0001-80 
    StreetLine1:Av. Faria Lima, 1844 
    StreetLine2:CJ 13 
    District:Itaim Bibi 
    City:São Paulo 
    StateCode:SP 
    ZipCode:01500-000 
    Due:2020-05-21 02:59:59.999999 +0000 +0000 
    Fine:2.0
    Interest:1.0 
    OverdueLimit:59
    Descriptions:[map[text:product A amount:123]] 
    Discounts:[map[date:2020-04-26T02:59:59.999999+00:00 percentage:10]]
    Tags:[war supply invoice #1234] 
    ReceiverName:Winterfell S.A.
    ReceiverTaxId:71.735.814/0001-12
    Fee:0 
    Line:34191.09107 44555.427309 71444.640008 4 92570000400000 
    BarCode:34191826100004000001091007175647307144464000 
    Status:created 
    TransactionIds:[] 
    WorkspaceId:5083989094170624
    Created:2020-04-23 03:18:33.515597 +0000 +0000 
    OurNumber:10445554
}
  

Clojure


{:amount 400000,
 :fee 0,
 :tags ["war supply" "invoice #1234"],
 :street-line-1 "Av. Faria Lima, 1844",
 :name "Iron Bank S.A.",
 :state-code "SP",
 :city "São Paulo",
 :tax-id "20.018.183/0001-80",
 :our-number "10445145",
 :transaction-ids [],
 :overdue-limit 59,
 :receiver-name "Winterfell S.A."
 :receiver-tax-id "71.735.814/0001-12"
 :created "2020-04-23T19:14:43.125462+00:00",
 :discounts
 [{:date "2020-04-26T02:59:59.999999+00:00", :percentage 10.0}],
 :due "2020-05-21T02:59:59.999999+00:00",
 :street-line-2 "CJ 13",
 :line "34191.09107 07322.097309 71444.640008 1 82610000400000",
 :status "created",
 :interest 1.0,
 :id "6655767935451136",
 :fine 2.0,
 :zip-code "01500-000",
 :bar-code "34191826100004000001091007322097307144464000",
 :descriptions
 {:text "product A", :amount 123},
 :district "Itaim Bibi"}
  

Curl


{
    "message": "Boleto(s) successfully created",
    "boletos": [
        {
            "id": "6655767935451136",
            "status": "created",
            "line": "34191.09107 07175.647309 71444.640008 1 82610000400000",
            "barCode": "34191826100004000001091007175647307144464000",
            "amount": 400000,
            "due": "2020-05-21T02:59:59.999999+00:00",
            "name": "Iron Bank S.A.",
            "taxId": "20.018.183/0001-80",
            "fine": 2.0,
            "interest": 1.0,
            "ourNumber": "10445145",
            "transactionIds": [],
            "overdueLimit": 59,
            "receiverName": "Winterfell S.A.",
            "receiverTaxId": "71.735.814/0001-12",
            "streetLine1": "Av. Faria Lima, 1844",
            "streetLine2": "CJ 13",
            "district": "Itaim Bibi",
            "city": "São Paulo",
            "stateCode": "SP",
            "zipCode": "01500-000",
            "tags": ["War supply", "Invoice #1234"],
            "workspaceId": "5083989094170624",
            "fee": 0,
            "descriptions": [
                {
                    "text": product A, 
                    "amount": 123
                }
            ],
            "discounts": [
                {
                    "percentage": 10, 
                    "date": "2020-04-25"
                }
            ],
            "workspaceId": "5083989094170624"
        }
    ]
}
  

Creating Boleto with Split

It enables you to split the payment of a Boleto among multiple receivers based on criteria such as settlement date, amount, and predefined rules.To execute this operation, please follow the steps outlined below:Setup the Split Profile Split Profile is the set of rules that will define the behavior of transferring funds from the client's account to the Receivers.Two behaviors are essential for the transfer to occur:IntervalIt is the period during which the transfer of funds from the Workspace to the receiver's destination account will be conducted.You can choose from four methods to execute the interval:DelayIt is the period during which the value will be "retained" in the main Workspace until it is transferred to the receiver's destination account.The Delay is configured by the client, allowing it to determine how long the value should be "retained" before the transfer occurs.For clients who do not configure the Split Profile rules for interval and delay as desired, by default, the Payment Split will have the following properties:Interval - monthlyDelay - 7 days

The setup of Receivers involves adding information regarding the payment beneficiary.

Python


  import starkbank
  
  receiver = starkbank.splitreceiver.create(
        receiver=starkbank.SplitReceiver(
          name="Daenerys Targaryen Stormborn",
          tax_id="594.739.480-42",
          bank_code="341",
          branch_code="2201",
          account_number="76543-8",
          account_type="salary"
      )
  )
  
  print(receiver)  

Javascript


  Not yet available. Please contact us if you need this SDK.
    

PHP


  Not yet available. Please contact us if you need this SDK.
    

Java


  import com.starkbank.*;
  import java.util.Map;
  import java.util.List;
  import java.util.HashMap;
  import java.util.ArrayList;
  
  Map<String, Object> data = new HashMap<>();
  data.put("name", "Daenerys Targaryen Stormborn");
  data.put("taxId", "594.739.480-42");
  data.put("bankCode", "341");
  data.put("branchCode", "2201");
  data.put("accountNumber", "76543-8");
  data.put("accountType", "salary");
  
  SplitReceiver receiver = SplitReceiver.create(new SplitReceiver(data));
  
  System.out.println(receiver);  

Ruby


  Not yet available. Please contact us if you need this SDK.
    

Elixir


  Not yet available. Please contact us if you need this SDK.
    

C#


  Not yet available. Please contact us if you need this SDK.
    

Go


  Not yet available. Please contact us if you need this SDK.
    

Clojure


  Not yet available. Please contact us if you need this SDK.
    

Curl


  curl --location --request POST '{{baseUrl}}/v2/split-receiver' 
  --header 'Access-Id: {{accessId}}' 
  --header 'Access-Time: {{accessTime}}' 
  --header 'Access-Signature: {{accessSignature}}' 
  --header 'Content-Type: application/json' 
  --data-raw '{
      "receivers": [
          {
              "name": "Daenerys Targaryen Stormborn",
              "taxId": "594.739.480-42",
              "bankCode": "341",
              "branchCode": "2201",
              "accountNumber": "76543-8",
              "accountType": "salary"
          }
      ]
  }'
    
Response

Python


  SplitReceiver(
      account_number=76543-8,
      account_type=salary,
      bank_code=341,
      branch_code=2201,
      created=2024-01-30 20:17:12.586145,
      id=5710191014182912,
      name=Daenerys Targaryen Stormborn,
      status=created,
      tags=[],
      tax_id=594.739.480-42,
      updated=2024-01-30 20:17:12.586152
  )
    

Javascript


  Not yet available. Please contact us if you need this SDK.
          

PHP


  Not yet available. Please contact us if you need this SDK.
    

Java


  SplitReceiver({
      "accountNumber": 76543-8,
      "accountType": salary,
      "bankCode": 341,
      "branchCode": 2201,
      "created": 2024-01-30 20:17:12.586145,
      "id": 5710191014182912,
      "name": Daenerys Targaryen Stormborn,
      "status": created,
      "tags": [],
      "taxId": 594.739.480-42,
      "updated": 2024-01-30 20:17:12.586152
  })
    

Ruby


  Not yet available. Please contact us if you need this SDK.
    

Elixir


  Not yet available. Please contact us if you need this SDK.
    

C#


  Not yet available. Please contact us if you need this SDK.
    

Go


  Not yet available. Please contact us if you need this SDK.
    

Clojure


  Not yet available. Please contact us if you need this SDK.
    

Curl


  {
      "receivers": [
          {
              "accountNumber": "76543-8",
              "accountType": "salary",
              "bankCode": "341",
              "branchCode": "2201",
              "created": "2024-01-30T20:32:56.182031+00:00",
              "id": "5642933638266880",
              "name": "Daenerys Targaryen Stormborn",
              "status": "created",
              "tags": [],
              "taxId": "594.739.480-42",
              "updated": "2024-01-30T20:32:56.182039+00:00"
          }
      ]
  }
    

Once you have completed that step, you can generate an boleto by including the Split parameter along with the receiver ID, as demonstrated in the following example:For each party involved in the transaction, their respective receiver ID must be included, along with the amount to be sent. Therefore, if there are 3 parties in a transaction, three Receiver IDs should be sent, each with its corresponding Amount.

Python


  import starkbank
  
  boletos = starkbank.boleto.create([
      starkbank.Boleto(
          amount=400000,
          due="2020-05-20",
          name="Iron Bank S.A.",
          tax_id="20.018.183/0001-80",
          fine=2.5,
          interest=1.3,
          overdue_limit=5,
          street_line_1="Av. Faria Lima, 1844",
          street_line_2="CJ 13",
          district="Itaim Bibi",
          city="São Paulo",
          state_code="SP",
          zip_code="01500-000",
          tags=["War supply", "Invoice #1234"],
          discounts=[
              {"percentage": 10, "date": "2020-04-25"}
          ],
          splits=[
              Split(amount=3000, receiverId="5742447426535424"), Split(amount=5000, receiverId="5743243941642240")
          ]
      )
  ])
  
  for boleto in boletos:
      print(boleto)
    

Javascript


      Not yet available. Please contact us if you need this SDK.
    

PHP


      Not yet available. Please contact us if you need this SDK.
    

Java


      Not yet available. Please contact us if you need this SDK.
    

Ruby


      Not yet available. Please contact us if you need this SDK.
    

Elixir


      Not yet available. Please contact us if you need this SDK.
    

C#


      Not yet available. Please contact us if you need this SDK.
    

Go


      Not yet available. Please contact us if you need this SDK.
    

Clojure


      Not yet available. Please contact us if you need this SDK.
    

Curl


  curl --location --request POST '{{baseUrl}}/v2/boleto' 
  --header 'Access-Id: {{accessId}}' 
  --header 'Access-Time: {{accessTime}}' 
  --header 'Access-Signature: {{accessSignature}}' 
  --header 'Content-Type: application/json' 
  --data-raw '{
      "boletos": [
          {
              "amount": 400000,
              "due": "2020-05-20",
              "name": "Iron Bank S.A.",
              "taxId": "20.018.183/0001-80",
              "fine": 2.5,
              "interest": 1.3,
              "overdueLimit": 5,
              "streetLine1": "Av. Faria Lima, 1844",
              "streetLine2": "CJ 13",
              "district": "Itaim Bibi",
              "city": "São Paulo",
              "stateCode": "SP",
              "zipCode": "01500-000",
              "tags": ["War supply", "Invoice #1234"]
              "discounts": [                   {
                      "percentage": 10,
                      "date": "2020-04-25"
                  }
              ],
              "splits": [
                  {
                      "receiverId": "5742447426535424",
                      "amount": 3000
                  },
                  {
                      "receiverId": "5743243941642240",
                      "amount": 5000
                  }
              ]
          },
      ]
  }'
    
Response

Python


  Boleto(
      id=6655767935451136,
      amount=400000,
      bar_code=34191826100004000001091007175647307144464000,
      city=São Paulo,
      created=2020-04-23 23:36:08.129614,
      descriptions=[],
      discounts=[{'date': '2020-04-26T02:59:59.999999+00:00', 'percentage': 10.0}],
      district=Itaim Bibi,
      due=2020-05-21,
      fee=0,
      fine=2.5,
      interest=1.3,
      line=34191.09107 07175.647309 71444.640008 1 82610000400000,
      name=Iron Bank S.A.,
      our_number=10445145,
      transaction_ids=[],
      overdue_limit=5,
      receiver_name=Winterfell S. A.,
      receiver_tax_id=71.735.814/0001-12,
      state_code=SP,
      status=created,
      street_line_1=Av. Faria Lima, 1844,
      street_line_2=CJ 13,
      tags=['war supply', 'invoice #1234'],
      tax_id=20.018.183/0001-80,
      zip_code=01500-000,
      workspace_id=5083989094170624,
      splits=[
          Split(
              amount=3000,
              created=None,
              external_id=None,
              id=None,
              receiver_id=5742447426535424,
              scheduled=None,
              source=None,
              status=None,
              tags=None,
              updated=None
          ),
          Split(
              amount=5000,
              created=None,
              external_id=None,
              id=None,
              receiver_id=5743243941642240,
              scheduled=None,
              source=None,
              status=None,
              tags=None,
              updated=None
          )
      ]
  )
    

Javascript


      Not yet available. Please contact us if you need this SDK.
    

PHP


      Not yet available. Please contact us if you need this SDK.
    

Java


      Not yet available. Please contact us if you need this SDK.
    

Ruby


      Not yet available. Please contact us if you need this SDK.
    

Elixir


      Not yet available. Please contact us if you need this SDK.
    

C#


      Not yet available. Please contact us if you need this SDK.
    

Go


      Not yet available. Please contact us if you need this SDK.
    

Clojure


      Not yet available. Please contact us if you need this SDK.
    

Curl


  {
      "message": "Boleto(s) successfully created",
      "boletos": [
          {
              "id": "6655767935451136",
              "status": "created",
              "line": "34191.09107 07175.647309 71444.640008 1 82610000400000",
              "barCode": "34191826100004000001091007175647307144464000",
              "amount": 400000,
              "due": "2020-05-21T02:59:59.999999+00:00",
              "name": "Iron Bank S.A.",
              "taxId": "20.018.183/0001-80",
              "fine": 2.5,
              "interest": 1.3,
              "ourNumber": "10445145",
              "transactionIds": [],
              "overdueLimit": 5,
              "receiverName": "Winterfell S.A.",
              "receiverTaxId": "71.735.814/0001-12",
              "streetLine1": "Av. Faria Lima, 1844",
              "streetLine2": "CJ 13",
              "district": "Itaim Bibi",
              "city": "São Paulo",
              "stateCode": "SP",
              "zipCode": "01500-000",
              "tags": ["War supply", "Invoice #1234"],
              "workspaceId": "5083989094170624",
              "fee": 0,
              "descriptions": [],
              "discounts": [
                  {
                      "percentage": 10, 
                      "date": "2020-04-25"
                  }
              ],
              "workspaceId": "5083989094170624"
          },
          "splits": [
              {
                  "amount": 3000,
                  "receiverId": "5742447426535424",
              ),
              {
                  "amount": 5000,
                  "receiverId": "5743243941642240",
              }
          ]
      ]
  }
    

Getting Boleto PDF's

You can retrieve a boleto PDF by its ID using the "boleto/:id/pdf" route, as shown below:

Python


import starkbank

pdf = starkbank.boleto.pdf("6655767935451136")

with open("boleto.pdf", "wb") as file:
    file.write(pdf)
  

Javascript


const starkbank = require('starkbank');
const fs = require('fs').promises;

(async() => {
    let pdf = await starkbank.boleto.pdf('6655767935451136');
    await fs.writeFile('boleto.pdf', pdf);
})();
  

PHP


$pdf = StarkBank\Boleto::pdf("6655767935451136");

$fp = fopen('boleto.pdf', 'w');
fwrite($fp, $pdf);
fclose($fp);
  

Java


import java.io.File;
import java.io.InputStream;
import java.nio.file.StandardCopyOption;
import com.starkbank.*;

InputStream pdf = Boleto.pdf("6655767935451136");

java.nio.file.Files.copy(
    pdf,
    new File("boleto.pdf").toPath(),
    StandardCopyOption.REPLACE_EXISTING
);
  

Ruby


require('starkbank')

pdf = StarkBank::Boleto.pdf('6655767935451136')

File.open('boleto.pdf', 'w') { |file| file.write(pdf) }
  

Elixir


pdf = StarkBank.Boleto.pdf!("6655767935451136")

file = File.open!("boleto.pdf", [:write])
IO.binwrite(file, pdf)
File.close(file)
  

C#


byte[] pdf = Boleto.Pdf("6655767935451136");

System.IO.File.WriteAllBytes("boleto.pdf", pdf);
  

Go


package main

import (
    "fmt"
    "github.com/starkbank/sdk-go/starkbank/boleto"
)

func main() {

    pdf, err := boleto.Pdf("6655767935451136", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message))
        }
    }

    errFile := ioutil.WriteFile("boleto.pdf", pdf, 0666)
    if errFile != nil {
        fmt.Print(errFile)
    }
}
  

Clojure


(clojure.java.io/copy
  (starkbank.boleto/pdf "6655767935451136")
  (clojure.java.io/file "boleto.pdf"))
  

Curl


curl --location --request GET '{{baseUrl}}/v2/boleto/6655767935451136/pdf?layout=booklet' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  

Deleting Boletos

The method will allow the cancellation of a boleto.By utilizing this route, we send a request to CIP to cancel the boleto registration.After the boleto registration is canceled, it won't be possible to pay it anymore.

Python


import starkbank

boleto = starkbank.boleto.delete("6655767935451136")

print(boleto)
  

Javascript


const starkbank = require('starkbank');

(async() => {
    let boleto = await starkbank.boleto.delete('6655767935451136');
    console.log(boleto);
})();
  

PHP


$boleto = StarkBank\Boleto::delete("6655767935451136");

print_r($boleto);
  

Java


import com.starkbank.*;

Boleto boleto = Boleto.delete("6655767935451136");

System.out.println(boleto);
  

Ruby


require('starkbank')

boleto = StarkBank::Boleto.delete('6655767935451136')

puts boleto
  

Elixir


boleto = StarkBank.Boleto.delete!("6655767935451136")

boleto |> IO.inspect
  

C#


using System;

StarkBank.Boleto boleto = StarkBank.Boleto.Delete("6655767935451136");

Console.WriteLine(boleto);
  

Go


package main

import (
    "fmt"
    "github.com/starkbank/sdk-go/starkbank/boleto"
)

func main() {

    boleto, err := boleto.Delete("6655767935451136", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message))
        }
    }

    fmt.Printf("%+v", boleto)
}
  

Clojure


(def boleto (starkbank.boleto/delete "6655767935451136"))
(println boleto)
  

Curl


curl --location --request DELETE '{{baseUrl}}/v2/boleto/6655767935451136' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  

Consulting Boleto

Is it possible to retrieve a boleto by its ID or even list them using parameters as after, before to filter the results, as shown in the example below:

Python


import starkbank

boletos = starkbank.boleto.query(
    after="2020-04-01",
    before="2020-04-30"
)

for boleto in boletos:
    print(boleto)
  

Javascript


const starkbank = require('starkbank');

(async() => {
    let boletos = await starkbank.boleto.query({
        after: '2020-04-01',
        before: '2020-04-30',
    });

    for await (let boleto of boletos) {
        console.log(boleto);
    }
})();
  

PHP


$boletos = StarkBank\Boleto::query([
    "after" => "2020-04-01",
    "before" => "2020-04-30"
]);

foreach($boletos as $boleto){
    print_r($boleto);
}
  

Java


import com.starkbank.*;
import com.starkbank.utils.Generator;
import java.util.HashMap;

HashMap<String, Object> params = new HashMap<>();
params.put("after", "2020-04-01");
params.put("before", "2020-04-30");
Generator<Boleto> boletos = Boleto.query(params);

for (Boleto boleto : boletos){
    System.out.println(boleto);
}
  

Ruby


require('starkbank')

boletos = StarkBank::Boleto.query(
    after: '2020-04-01',
    before: '2020-04-30'
)

boletos.each do |boleto|
    puts boleto
end
  

Elixir


boletos = StarkBank.Boleto.query!(
    after: "2019-04-01",
    before: "2020-04-30"
)

for payment <- payments do
    payment |> IO.inspect
end
  

C#


using System;
using System.Collections.Generic;

IEnumerable<StarkBank.Boleto> boletos = StarkBank.Boleto.Query(
    after: new DateTime(2020, 4, 1),
    before: new DateTime(2020, 4, 30)
);

foreach(StarkBank.Boleto boleto in boletos)
{
    Console.WriteLine(boleto);
}
  

Go


package main

import (
    "fmt"
    "github.com/starkbank/sdk-go/starkbank/boleto"
)

func main() {

    var params = map[string]interface{}{}
    params["after"] = "2020-04-01"
    params["before"] = "2020-04-30"
    
    boletos := boleto.Query(params, nil)

    for boleto := range boletos {
        fmt.Printf("%+v", boleto)
    }
}
  

Clojure


(def boletos
  (starkbank.boleto/query
    {
      :after "2020-4-1",
      :before "2020-4-30"
    }))
(dorun (map println boletos))
  

Curl


curl --location --request GET '{{baseUrl}}/v2/boleto?after=2020-04-01&before=2020-04-30' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
  
Response

Python


Boleto(
    id=6655767935451136,
    amount=400000,
    bar_code=34191826100004000001091007175647307144464000,
    city=São Paulo,
    created=2020-04-23 23:36:08.129614,
    descriptions=[],
    discounts=[{'date': '2020-04-26T02:59:59.999999+00:00', 'percentage': 10.0}],
    district=Itaim Bibi,
    due=2020-05-21,
    fee=0,
    fine=2.5,
    interest=1.3,
    line=34191.09107 07175.647309 71444.640008 1 82610000400000,
    name=Iron Bank S.A.,
    our_number=10445145,
    transaction_ids=[],
    overdue_limit=5,
    receiver_name=Winterfell S. A.,
    receiver_tax_id=71.735.814/0001-12,
    state_code=SP,
    status=created,
    street_line_1=Av. Faria Lima, 1844,
    street_line_2=CJ 13,
    tags=['war supply', 'invoice #1234'],
    tax_id=20.018.183/0001-80,
    zip_code=01500-000
    workspace_id=5083989094170624
)
  

Javascript


Boleto {
    id: '6655767935451136',
    amount: 400000,
    name: 'Iron Bank S.A.',
    taxId: '20.018.183/0001-80',
    streetLine1: 'Av. Faria Lima, 1844',
    streetLine2: 'CJ 13',
    district: 'Itaim Bibi',
    city: 'São Paulo',
    stateCode: 'SP',
    zipCode: '01500-000',
    due: '2020-05-21T02:59:59.999999+00:00',
    fine: 2.5,
    interest: 1.3,
    ourNumber: '10445145',
    transactionIds: [],
    overdueLimit: 5,
    receiverName: 'Winterfell S.A.',
    receiverTaxId: '71.735.814/0001-12',
    tags: [ 'war supply', 'invoice #1234' ],
    descriptions: [],
    discounts: [ { date: '2020-04-26T02:59:59.999999+00:00', percentage: 10 } ],
    fee: 0,
    line: '34191.09107 07176.307309 71444.640008 1 82610000400000',
    barCode: '34191826100004000001091007175647307144464000',
    status: 'created',
    created: '2020-04-23T23:36:10.789288+00:00',
    workspaceId: '5083989094170624'
}
  

PHP


StarkBank\Boleto Object
(
    [id] => 6655767935451136
    [amount] => 400000
    [name] => Iron Bank S.A.
    [taxId] => 20.018.183/0001-80
    [streetLine1] => Av. Faria Lima, 1844
    [streetLine2] => CJ 13
    [district] => Itaim Bibi
    [city] => São Paulo
    [stateCode] => SP
    [zipCode] => 01500-000
    [due] => DateTime Object
        (
            [date] => 2020-05-21 02:59:59.999999
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [fine] => 2.5
    [interest] => 1.3
    [ourNumber] => 10445145
    [transactionIds] => Array
        (
        )
    [overdueLimit] => 5
    [receiverName] => Winterfell S.A.
    [receiverTaxId] => 71.735.814/0001-12
    [tags] => Array
        (
            [0] => war supply
            [1] => invoice #1234
        )

    [descriptions] => Array
        (
        )

    [discounts] => Array
        (
            [0] => Array
                (
                    [date] => 2020-04-26T02:59:59.999999+00:00
                    [percentage] => 10
                )

        )

    [fee] => 0
    [line] => 34191.09107 07150.227309 71444.640008 7 82610000400000
    [barCode] => 34197826100004000001091007150227307144464000
    [status] => created
    [created] => DateTime Object
        (
            [date] => 2020-04-22 20:12:56.830070
            [timezone_type] => 1
            [timezone] => +00:00
        )
    [workspaceId] => 5083989094170624
)
  

Java


Boleto({
    "id": "6655767935451136",
    "amount": "400000",
    "name": "Iron Bank S.A.",
    "taxId": "20.018.183/0001-80",
    "streetLine1": "Av. Faria Lima, 1844",
    "streetLine2": "CJ 13",
    "district": "Itaim Bibi",
    "city": "São Paulo",
    "stateCode": "SP",
    "zipCode": "01500-000",
    "due": "2020-04-21T02:59:59.999999+00:00",
    "fine": 2.5,
    "interest": 1.3,
    "ourNumber": "10445145",
    "workspaceId": "5083989094170624",
    "transactionIds": [],
    "overdueLimit": 5,
    "receiverName": "Winterfell S.A.",
    "receiverTaxId": "71.735.814/0001-12",
    "tags": ["war supply", "invoice #1234"],
    "descriptions": [],
    "discounts": [
        {"date": "2020-04-26T02:59:59.999999+00:00", "percentage": 10.0}
    ],
    "fee": 0,
    "line": "34191.09107 07027.987309 71444.640008 5 82310000400000",
    "barCode": "34191826100004000001091007175647307144464000",
    "status": "created",
    "created": "2020-04-23T23:28:13+00:00"
    "workspaceId": "5083989094170624"
})
  

Ruby


boleto(
    id: 6655767935451136,
    amount: 400000,
    name: Iron Bank S.A.,
    tax_id: 20.018.183/0001-80,
    street_line_1: Av. Faria Lima, 1844,
    street_line_2: CJ 13,
    district: Itaim Bibi,
    city: São Paulo,
    state_code: SP,
    zip_code: 01500-000,
    due: 2020-05-21T02:59:59.999999+00:00,
    fine: 2.5,
    interest: 1.3,
    our_number: 10445145,
    transaction_ids: [],
    overdue_limit: 5,
    receiver_name: Winterfell S.A.,
    receiver_tax_id: 71.735.814/0001-12,
    tags: ["war supply", "invoice #1234"],
    descriptions: [],
    discounts: [{"date"=>"2020-04-26T02:59:59.999999+00:00", "percentage"=>10.0}],
    fee: 0,
    line: 34191.09107 07149.917309 71444.640008 1 82610000400000,
    bar_code: 34191826100004000001091007149917307144464000,
    status: created,
    created: 2020-04-23T19:59:25+00:00
    workspace_id: 5083989094170624
)
  

Elixir


%StarkBank.Boleto{
    amount: 400000,
    bar_code: "34191826100004000001091007175647307144464000",
    city: "São Paulo",
    created: ~U[2020-04-23 17:41:58.458035Z],
    descriptions: [],
    discounts: [
        %{"date" => "2020-04-26T02:59:59.999999+00:00", "percentage" => 10.0}
    ],
    district: "Itaim Bibi",
    due: ~U[2020-05-21 02:59:59.999999Z],
    fee: 0,
    fine: 2.5,
    id: "6655767935451136",
    interest: 1.3,
    line: "34191.09107 07156.837309 71444.640008 8 82610000400000",
    name: "Iron Bank S.A.",
    our_number: "10445145",
    transaction_ids: [],
    overdue_limit: 5,
    receiver_name: "Winterfell S.A.",
    receiver_tax_id: "71.735.814/0001-12",
    state_code: "SP",
    status: "created",
    street_line_1: "Av. Faria Lima, 1844",
    street_line_2: "CJ 13",
    tags: ["war supply", "invoice #1234"],
    tax_id: "20.018.183/0001-80",
    zip_code: "01500-000",
    workspace_id: "5083989094170624"
}
  

C#


Boleto(
    Amount: 400000,
    Name: Iron Bank S.A.,
    TaxID: 20.018.183/0001-80,
    StreetLine1: Av. Faria Lima, 1844,
    StreetLine2: CJ 13,
    District: Itaim Bibi,
    City: Sao Paulo,
    StateCode: SP,
    ZipCode: 01500-000,
    Due: 05/21/2020 23:59:59,
    Fine: 2.5,
    Interest: 1.3,
    OverdueLimit: 5,
    OurNumber: 10445145,
    TransactionIds: {  },
    ReceiverName: Wintefell S.A.,
    ReceiverTaxID: 71.735.814/0001-12,
    Tags: { war supply, invoice #1234 },
    Descriptions: {  },
    Discounts: { { { date, 2020-04-26T02:59:59.999999+00:00 }, { percentage, 10 } } },
    Fee: 0,
    Line: 34191.09107 07159.647309 71444.640008 1 82610000400000,
    BarCode: 34191826100004000001091007159647307144464000,
    Status: created,
    Created: 04/23/2020 15:53:22,
    WorkspaceId: 5083989094170624
    ID: 6655767935451136
)
  

Go


{
    Id:6655767935451136 
    Amount:400000 
    Name:Iron Bank S.A. 
    TaxId:20.018.183/0001-80 
    StreetLine1:Av. Faria Lima, 1844 
    StreetLine2:CJ 13 
    District:Itaim Bibi 
    City:São Paulo 
    StateCode:SP 
    ZipCode:01500-000 
    Due:2020-05-21 02:59:59.999999 +0000 +0000 
    Fine:2.5
    Interest:1.3 
    OverdueLimit:5
    Descriptions:[] 
    Discounts:[map[date:2020-04-26T02:59:59.999999+00:00 percentage:10]]
    Tags:[war supply invoice #1234] 
    ReceiverName:Winterfell S.A.
    ReceiverTaxId:71.735.814/0001-12
    Fee:0 
    Line:34191.09107 44555.427309 71444.640008 4 92570000400000 
    BarCode:34191826100004000001091007175647307144464000 
    Status:created 
    TransactionIds:[] 
    WorkspaceId:5083989094170624
    Created:2020-04-23 03:18:33.515597 +0000 +0000 
    OurNumber:10445554
}
  

Clojure


{:amount 400000,
 :fee 0,
 :tags ["war supply" "invoice #1234"],
 :street-line-1 "Av. Faria Lima, 1844",
 :name "Iron Bank S.A.",
 :state-code "SP",
 :city "São Paulo",
 :tax-id "20.018.183/0001-80",
 :our-number "10445145",
 :transaction-ids [],
 :overdue-limit 5,
 :receiver-name "Winterfell S.A."
 :receiver-tax-id "71.735.814/0001-12"
 :created "2020-04-23T19:14:43.125462+00:00",
 :discounts
 [{:date "2020-04-26T02:59:59.999999+00:00", :percentage 10.0}],
 :due "2020-05-21T02:59:59.999999+00:00",
 :street-line-2 "CJ 13",
 :line "34191.09107 07322.097309 71444.640008 1 82610000400000",
 :status "created",
 :interest 1.3,
 :id "6655767935451136",
 :fine 2.5,
 :zip-code "01500-000",
 :bar-code "34191826100004000001091007322097307144464000",
 :descriptions [],
 :district "Itaim Bibi"}
  

Curl


{
    "cursor": null,
    "boletos": [
        {
            "id": "6655767935451136",
            "status": "created",
            "line": "34191.09107 07175.647309 71444.640008 1 82610000400000",
            "barCode": "34191826100004000001091007175647307144464000",
            "amount": 400000,
            "due": "2020-05-21T02:59:59.999999+00:00",
            "name": "Iron Bank S.A.",
            "taxId": "20.018.183/0001-80",
            "fine": 2.5,
            "interest": 1.3,
            "ourNumber": "10445145",
            "transactionIds": [],
            "overdueLimit": 5,
            "receiverName": "Winterfell S.A.",
            "receiverTaxId": "71.735.814/0001-12",
            "streetLine1": "Av. Faria Lima, 1844",
            "streetLine2": "CJ 13",
            "district": "Itaim Bibi",
            "city": "São Paulo",
            "stateCode": "SP",
            "zipCode": "01500-000",
            "tags": ["War supply", "Invoice #1234"],
            "workspaceId": "5083989094170624",
            "fee": 0,
            "descriptions": [],
            "discounts": [
                {
                    "percentage": 10,
                    "date": "2020-04-25"
                }
            ],
            "workspaceId": "5083989094170624"
        }
    ]
}
  

Consulting Split

Once an invoice with Split is created, a Split entity is also generated. It is possible to retrieve it by its ID or list them using parameters such as limit, after, before to filter the results, as shown in the example below:

Python


  import starkbank
  
  splits = starkbank.split.query(
      after="2024-01-30",
      before="2024-02-01",
      limit=1
  )
  
  for split in splits:
      print(split)
    

Javascript


  Not yet available. Please contact us if you need this SDK.
    

PHP


  Not yet available. Please contact us if you need this SDK.
    

Java


  import com.starkbank.*;
  import java.util.Map;
  import java.util.HashMap;
  
  Map params = new HashMap<>();
  params.put("limit", 1);
  
  Generator splits = Split.query(params);
  
  for (Split split : splits) {
      System.out.println(split);
  }
    

Ruby


  Not yet available. Please contact us if you need this SDK.
    

Elixir


  Not yet available. Please contact us if you need this SDK.
    

C#


  Not yet available. Please contact us if you need this SDK.
    

Go


  Not yet available. Please contact us if you need this SDK.
    

Clojure


  Not yet available. Please contact us if you need this SDK.
    

Curl


  curl --location --request GET '{{baseUrl}}/v2/split?after=2024-01-30&before=2024-02-01' 
  --header 'Access-Id: {{accessId}}' 
  --header 'Access-Time: {{accessTime}}' 
  --header 'Access-Signature: {{accessSignature}}'
    
Response

Python


  Split(
      amount=10000,
      created=2024-01-30 16:10:59.874663,
      external_id=invoice/5163468596445184/receiver/5143677177430016,
      id=5745664021495808,
      receiver_id=5143677177430016,
      scheduled=2024-01-30 16:10:59.840821,
      source=invoice/5163468596445184,
      status=created,
      tags=['invoice/5163468596445184'],
      updated=2024-01-30 16:21:03.973723
  )  

Javascript


  Not yet available. Please contact us if you need this SDK.
    

PHP


  Not yet available. Please contact us if you need this SDK.
    

Java


  Split({
      "amount": 10000,
      "created": "2024-01-30 16:10:59.874824",
      "external_id": invoice/5163468596445184/receiver/5706627130851328,
      "id": 5182714068074496,
      "receiver_id": 5706627130851328,
      "scheduled": "2024-01-30 16:10:59.840821",
      "source": invoice/5163468596445184,
      "status": created,
      "tags": ['invoice/5163468596445184'],
      "updated": 2024-01-30 16:10:59.874829
  })
    

Ruby


  Not yet available. Please contact us if you need this SDK.
    

Elixir


  Not yet available. Please contact us if you need this SDK.
    

C#


  Not yet available. Please contact us if you need this SDK.
    

Go


  Not yet available. Please contact us if you need this SDK.
    

Clojure


  Not yet available. Please contact us if you need this SDK.
    

Curl


  {
      "cursor": null,
      "splits": [
          {
              "amount": 10000,
              "created": "2023-10-23T23:40:04.809130+00:00",
              "externalId": "invoice/6394476721340416/receiver/5644004762845184",
              "id": "5714489739575296",
              "receiverId": "5644004762845184",
              "scheduled": "2023-11-01T10:00:00+00:00",
              "source": "invoice/6394476721340416",
              "status": "success",
              "tags": [],
              "updated": "2023-11-01T09:51:02.985959+00:00"
          }
      ]
  }
    

Creating Boletos Holmes

This feature allows your application to investigate updated boleto status according to CIP in less than an hour.Here we will teach you how to create and manage your Boleto Holmes. Ideally, since results are asynchronous, you should register a Boleto Holmes webhook subscription in order to receive the investigation results instead of polling.

Python


import starkbank

holmes = starkbank.boletoholmes.create([
    starkbank.BoletoHolmes(
        boleto_id="5656565656565656",
        tags=["sherlock", "holmes"],
    )
])

for holmes in holmes:
    print(holmes)
  

Javascript


const starkbank = require('starkbank');

(async() => {
    let holmes = await starkbank.boletoHolmes.create([
        {
            boletoId: '5656565656565656',
            tags: ['sherlock', 'holmes'],
        }
    ])

    for (let holmes of holmes) {
        console.log(holmes);
    }
})();
  

PHP


use StarkBank\BoletoHolmes;

$holmes = [new BoletoHolmes([
    "boletoId" => "5656565656565656",
    "tags" => ["sherlock", "holmes"]
])];

$boletoHolmes = BoletoHolmes::create($holmes)[0];

foreach($boletoHolmes as $sherlock){
    print_r($sherlock);
}
  

Java


import com.starkbank.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

List<BoletoHolmes> holmes = new ArrayList<>();
HashMap<String, Object> dataHolmes = new HashMap<>();
dataHolmes.put("boletoId", "5656565656565656");
dataHolmes.put("tags", new String[]{"sherlock", "holmes"});
holmes.add(new BoletoHolmes(dataHolmes));

holmes = BoletoHolmes.create(holmes);

for (BoletoHolmes sherlock : holmes){
    System.out.println(sherlock);
}
  

Ruby


require('starkbank')

holmes = StarkBank::BoletoHolmes.create([
    StarkBank::BoletoHolmes.new(
        boleto_id: '5656565656565656',
        tags: ['sherlock', 'holmes']
    )
])

holmes.each do |sherlock|
    puts sherlock
end
  

Elixir


holmes = StarkBank.BoletoHolmes.create!(
    [
        %StarkBank.BoletoHolmes{
            boleto_id: "5656565656565656",
            tags: ["sherlock", "holmes"],
        }
    ]
) |> IO.inspect
  

C#


using System;
using System.Collections.Generic;

List<StarkBank.BoletoHolmes> holmes = StarkBank.BoletoHolmes.Create(
    new List<StarkBank.BoletoHolmes>() {
        new BoletoHolmes(
            boletoID: "5656565656565656",
            tags: new List<string> { "sherlock", "holmes" }
        )
    }
);

foreach(StarkBank.BoletoHolmes sherlock in holmes)
{
    Console.WriteLine(sherlock);
}
  

Go


package main

import (
    "fmt"
    "github.com/starkbank/sdk-go/starkbank/boletoholmes"
)

func main() {

    holmes, err := boletoholmes.Create(
        []boletoholmes.BoletoHolmes{
            {
                BoletoId: "4933519247671296",
                Tags: []string{"sherlock", "holmes"},
            },
        }, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            panic(fmt.Sprintf("code: %s, message: %s", e.Code, e.Message))
        }
    }

    for _, sherlock := range holmes {
        fmt.Printf("%+v", sherlock)
    }
}
  

Clojure


def holmes (starkbank.boleto-holmes/create
[{
    :boleto-id "5656565656565656"
    :tags ["sherlock" "holmes"]
}]))

(doseq [sherlock holmes]
    (println sherlock))
  

Curl


curl --location --request POST '{{baseUrl}}/v2/boleto-holmes' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "holmes": [
        {
            "boletoId": "5656565656565656",
            "tags": ["sherlock", "holmes"],
        },
    ]
}'
  
Response

Python


BoletoHolmes(
    boleto_id=5656565656565656,
    created=2020-07-23 00:07:51.069587,
    id=3232323232323232,
    result=,
    status=solving,
    tags=["sherlock", "holmes"],
    updated=2020-07-23 00:07:51.069597
)
  

Javascript


BoletoHolmes {
    boletoId: '5656565656565656',
    created: '2020-07-23T00:07:40.611174+00:00',
    id: '3232323232323232',
    result: '',
    status: 'solving',
    tags: ['sherlock', 'holmes'],
    updated: '2020-07-23T00:07:51.611174+00:00'
}
  

PHP


StarkBank\BoletoHolmes Object
(
    [id] => 3232323232323232
    [boletoId] => 5656565656565656
    [tags] => Array
        (
            [0] => sherlock
            [1] => holmes
        )

    [status] => solving
    [result] => 
    [created] => DateTime Object
        (
            [date] => 2020-07-23 00:07:51.532473
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [updated] => DateTime Object
        (
            [date] => 2020-07-23 00:07:51.532473
            [timezone_type] => 1
            [timezone] => +00:00
        )
)
  

Java


BoletoHolmes({
    "tags": [
        "sherlock",
        "holmes"
    ],
    "boletoId": "5656565656565656",
    "status": "solving",
    "result": "",
    "created": "2020-07-23T00:07:51.176283+00:00",
    "updated": "2020-07-23T00:07:51.176290+00:00",
    "id": "3232323232323232"
})
  

Ruby


boletoholmes(
    id: 3232323232323232,
    boleto_id: 5656565656565656,
    tags: ["sherlock", "holmes"],
    status: solving,
    result: ,
    created: 2020-07-23T00:07:51+00:00,
    updated: 2020-07-23T00:07:51+00:00
)
  

Elixir


  StarkBank.BoletoHolmes{
    boleto_id: "5656565656565656",
    created: ~U[2020-07-23 00:07:51.256963Z],
    id: "3232323232323232",
    result: "",
    status: "solving",
    tags: ["sherlock", "holmes"],
    updated: ~U[2020-07-23 00:07:51.256969Z]
}
  

C#


BoletoHolmes(
    BoletoID: '5656565656565656',
    Created: 07/23/2020 00:07:51,
    ID: 3232323232323232,
    Result: ,
    Status: solving,
    Tags: { sherlock, holmes },
    Updated: 07/23/2020 00:07:51,
)
  

Go


{
    Id:3232323232323232 
    BoletoId:5656565656565656 
    Tags:[sherlock holmes] 
    Status:solving 
    Result: 
    Created:2020-07-23 00:07:51.351907 +0000 +0000 
    Updated:2020-07-23 00:07:51.351914 +0000 +0000
}
  

Clojure


{
    :id 3232323232323232,
    :boleto-id 5656565656565656,
    :status solving,
    :result,
    :tags [sherlock holmes],
    :created 2020-07-23T00:07:51.467925+00:00,
    :updated 2020-07-23T00:07:51.467931+00:00
}
  

Curl


{
    "message": "Boleto Holmes successfully created",
    "holmes": [
        {
            "boletoId": "5656565656565656",
            "created": "2020-07-23T00:07:51.611174+00:00",
            "id": "3232323232323232",
            "result": "",
            "status": "solving",
            "tags": ["sherlock", "holmes"],
            "updated": "2020-07-23T00:07:51.611174+00:00"
        }
    ]
}
  

When you create a boletoHolmes the status start as "solving".It's important to note that once it changes to "solved," it does not change anymore.Therefore, it is necessary to create a new boletoHolmes to receive boletoHolmes webhook notifications.