Overview

Setup

Boleto Payment

Boleto Payment Overview

The Boleto Payment Object

Creating Boleto Payments

Creating Boleto Payments with scheduled, tags parameters

Listing Boleto Payments

Getting a Boleto Payment

Canceling Boleto Payment

Receiving Boleto Payment Webhook

Boleto Payment

We provide the convenience of paying registered boletos directly from your Stark Bank balance.

In the document below, we will detail the processes related to creating and managing Boleto Payments, providing a clear and comprehensive understanding of the operation and how to manage the lifecycle of this resource.

NOTE: Read Core Concepts before continuing this guide.

RESOURCE SUMMARY
Pay registered boletos using your Stark Bank balance

Setup

For each environment: (Sandbox or Production)

1. Create an account at Stark Bank.

2. Create a webhook with the following subscriptions to receive events in your desired URL:

boleto-payment

2.1. Via Internet Banking:

Integrations > Webhook > New Webhook

2.2. Via API:

Use the POST /webhook route to create the webhook

Boleto Payment Overview

Boleto Payment is a resource that can be used to pay registered boletos from Stark Bank or other institutions.

To create a Boleto Payment, you need to provide the mandatory parameters: line, taxId and description.

Optional parameters include scheduled and tags.

The Boleto Payment Status

Each Boleto Payment has a status that can change over time according to its life cycle:

boleto-payment-status

StatusDescription
CreatedThe Boleto Payment was successfully created in Stark Bank.
ProcessingThe Boleto Payment is being processed by Stark Bank.
SuccessThe Boleto Payment was successfully completed.
FailedThe Boleto Payment was unsuccessful.
CanceledThe Boleto Payment was canceled before processing.

The Boleto Payment Logs

Every time either you or Stark Bank makes a change to a Boleto Payment, we create a Log. Logs are pretty useful for understanding the life cycle of each Boleto Payment and the changes that happened to it. Here you can see the flow of possible logs:

boleto-payment-log

Log typeStatusDescription
CreatedCreatedThe Boleto Payment was successfully created in Stark Bank.
ProcessingProcessingThe Boleto Payment is being processed.
SuccessSuccessThe Boleto Payment was successfully completed.
FailedFailedThe Boleto Payment was unsuccessful.
CancelingProcessingThe Boleto Payment cancellation is being processed.
CanceledCanceledThe Boleto Payment was canceled before processing.

The Boleto Payment Object

Attributes

id STRING

Unique id for the boleto payment.

amount INTEGER

Amount automatically calculated from the line or barCode. Example: 11631 (R$116.31).

barCode STRING

Bar code number of the boleto. Example: "34198846600000116313109105447947307154464000".

created STRING

Creation datetime. Example: "2020-02-06T16:22:24.664148+00:00".

description STRING

Text to be displayed in your statement. Example: "Payment for killing white walkers".

fee INTEGER

Fee charged in cents.

line STRING

Number sequence that describes the payment. Example: "34191.09107 05447.947309 71544.640008 8 84660000011631".

scheduled STRING

Scheduled date for the payment. Example: "2020-08-14".

status STRING

Current payment status. Options: "created", "processing", "success", "failed", "canceled".

tags LIST OF STRINGS

Tags associated with the boleto payment.

taxId STRING

Tax ID (CPF or CNPJ) of the payer. Example: "38.435.677/0001-25".

transactionIds LIST OF STRINGS

Ledger transaction IDs linked to the boleto payment.

Creating Boleto Payments

To create a Boleto Payment, fill in the mandatory parameters: line, taxId and description.

The amount is automatically calculated from the line or barCode provided.

Python

import starkbank

payments = starkbank.boletopayment.create([
    starkbank.BoletoPayment(
        line="34191.09107 05447.947309 71544.640008 8 84660000011631",
        tax_id="38.435.677/0001-25",
        description="Payment for killing white walkers"
    )
])

for payment in payments:
    print(payment)
    

Javascript

const starkbank = require('starkbank');

(async() => {
    let payments = await starkbank.boletoPayment.create([
        {
            line: '34191.09107 05447.947309 71544.640008 8 84660000011631',
            taxId: '38.435.677/0001-25',
            description: 'Payment for killing white walkers'
        }
    ])

    for (let payment of payments) {
        console.log(payment);
    }
})();
    

PHP

$payments = StarkBank\BoletoPayment::create([
    new StarkBank\BoletoPayment([
        "line" => "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "taxId" => "38.435.677/0001-25",
        "description" => "Payment for killing white walkers"
    ])
]);

foreach($payments as $payment){
    print_r($payment);
}
    

Java

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

List<BoletoPayment> payments = new ArrayList<>();

HashMap<String, Object> data = new HashMap<>();
data.put("line", "34191.09107 05447.947309 71544.640008 8 84660000011631");
data.put("taxId", "38.435.677/0001-25");
data.put("description", "Payment for killing white walkers");
payments.add(new BoletoPayment(data));

payments = BoletoPayment.create(payments);

for (BoletoPayment payment : payments){
    System.out.println(payment);
}
    

Ruby

require('starkbank')

payments = StarkBank::BoletoPayment.create(
    [
        StarkBank::BoletoPayment.new(
            line: '34191.09107 05447.947309 71544.640008 8 84660000011631',
            tax_id: '38.435.677/0001-25',
            description: 'Payment for killing white walkers'
        )
    ]
)

payments.each do |payment|
    puts payment
end
    

Elixir

payments = StarkBank.BoletoPayment.create!([
    %StarkBank.BoletoPayment{
        line: "34191.09107 05447.947309 71544.640008 8 84660000011631",
        tax_id: "38.435.677/0001-25",
        description: "Payment for killing white walkers"
    }
])

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

C#

using System;
using System.Collections.Generic;

List<StarkBank.BoletoPayment> payments = StarkBank.BoletoPayment.Create(
    new List<StarkBank.BoletoPayment> {
        new StarkBank.BoletoPayment(
            line: "34191.09107 05447.947309 71544.640008 8 84660000011631",
            taxID: "38.435.677/0001-25",
            description: "Payment for killing white walkers"
        )
    }
);

foreach(StarkBank.BoletoPayment payment in payments)
{
    Console.WriteLine(payment);
}
    

Go

package main

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

func main() {

    payments, err := boletopayment.Create(
        []boletopayment.BoletoPayment{
            {
                Line:        "34191.09107 05447.947309 71544.640008 8 84660000011631",
                TaxId:       "38.435.677/0001-25",
                Description: "Payment for killing white walkers",
            },
        }, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

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

Clojure

(def payments
  (starkbank.boleto-payment/create
    [
      {
        :line "34191.09107 05447.947309 71544.640008 8 84660000011631"
        :tax-id "38.435.677/0001-25"
        :description "Payment for killing white walkers"
      }
    ]))
(dorun (map println payments))
    

Curl

curl --location --request POST '{{baseUrl}}/v2/boleto-payment' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "payments": [
        {
            "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
            "taxId": "38.435.677/0001-25",
            "description": "Payment for killing white walkers"
        }
    ]
}'
    
RESPONSE

Python

BoletoPayment(
    amount=11631,
    bar_code=34198846600000116313109105447947307154464000,
    created=2020-02-06 16:22:24.664134,
    description=Payment for killing white walkers,
    fee=0,
    id=5412038532661248,
    line=34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled=2020-02-07 10:00:00,
    status=created,
    tags=[],
    tax_id=38.435.677/0001-25,
    transaction_ids=[]
)
    

Javascript

BoletoPayment {
    id: '5412038532661248',
    amount: 11631,
    barCode: '34198846600000116313109105447947307154464000',
    created: '2020-02-06T16:22:24.664148+00:00',
    description: 'Payment for killing white walkers',
    fee: 0,
    line: '34191.09107 05447.947309 71544.640008 8 84660000011631',
    scheduled: '2020-02-07T10:00:00+00:00',
    status: 'created',
    tags: [ ],
    taxId: '38.435.677/0001-25',
    transactionIds: []
}
    

PHP

StarkBank\BoletoPayment Object
(
    [id] => 5412038532661248
    [amount] => 11631
    [barCode] => 34198846600000116313109105447947307154464000
    [created] => DateTime Object
        (
            [date] => 2020-02-06 16:22:24.664148
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [description] => Payment for killing white walkers
    [fee] => 0
    [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631
    [scheduled] => DateTime Object
        (
            [date] => 2020-02-07 10:00:00.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [status] => created
    [tags] => Array
        (
        )

    [taxId] => 38.435.677/0001-25
    [transactionIds] => Array
        (
        )

)
    

Java

BoletoPayment({
    "amount": 11631,
    "barCode": "34198846600000116313109105447947307154464000",
    "created": "2020-02-06T16:22:24.664148+00:00",
    "description": "Payment for killing white walkers",
    "fee": 0,
    "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
    "scheduled": "2020-02-07T10:00:00+00:00",
    "status": "created",
    "tags": [],
    "taxId": "38.435.677/0001-25",
    "transactionIds": [],
    "id": "5412038532661248"
})
    

Ruby

boletopayment(
    id: 5412038532661248,
    amount: 11631,
    bar_code: 34198846600000116313109105447947307154464000,
    created: 2020-02-06T16:22:24+00:00,
    description: Payment for killing white walkers,
    fee: 0,
    line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled: 2020-02-07T10:00:00+00:00,
    status: created,
    tags: [],
    tax_id: 38.435.677/0001-25,
    transaction_ids: []
)
    

Elixir

%StarkBank.BoletoPayment{
    amount: 11631,
    bar_code: "34198846600000116313109105447947307154464000",
    created: ~U[2020-02-06 16:22:24.664148Z],
    description: "Payment for killing white walkers",
    fee: 0,
    id: "5412038532661248",
    line: "34191.09107 05447.947309 71544.640008 8 84660000011631",
    scheduled: ~U[2020-02-07 10:00:00Z],
    status: "created",
    tags: [],
    tax_id: "38.435.677/0001-25",
    transaction_ids: []
}
    

C#

BoletoPayment(
    Amount: 11631,
    BarCode: 34198846600000116313109105447947307154464000,
    Created: 06/02/2020 16:22:24,
    Description: Payment for killing white walkers,
    Fee: 0,
    Line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    Scheduled: 07/02/2020 10:00:00,
    Status: created,
    Tags: {},
    TaxID: 38.435.677/0001-25,
    TransactionIds: {  },
    ID: 5412038532661248
)
    

Go

{
    Id:5412038532661248
    Amount:11631
    BarCode:34198846600000116313109105447947307154464000
    Created:2020-02-06 16:22:24.664148 +0000 +0000
    Description:Payment for killing white walkers
    Fee:0
    Line:34191.09107 05447.947309 71544.640008 8 84660000011631
    Scheduled:2020-02-07 10:00:00 +0000 +0000
    Status:created
    Tags:[]
    TaxId:38.435.677/0001-25
    TransactionIds:[]
}
    

Clojure

{:amount 11631,
 :bar-code "34198846600000116313109105447947307154464000",
 :created "2020-02-06T16:22:24.664148+00:00",
 :description "Payment for killing white walkers",
 :fee 0,
 :id "5412038532661248",
 :line "34191.09107 05447.947309 71544.640008 8 84660000011631",
 :scheduled "2020-02-07T10:00:00+00:00",
 :status "created",
 :tags [],
 :tax-id "38.435.677/0001-25",
 :transaction-ids []}
    

Curl

{
    "message": "Boleto Payment(s) successfully created",
    "payments": [
        {
            "amount": 11631,
            "barCode": "34198846600000116313109105447947307154464000",
            "created": "2020-02-06T16:22:24.387022+00:00",
            "description": "Payment for killing white walkers",
            "fee": 0,
            "id": "5412038532661248",
            "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
            "scheduled": "2020-02-07T10:00:00+00:00",
            "status": "created",
            "tags": [],
            "taxId": "38.435.677/0001-25",
            "transactionIds": []
        }
    ]
}
    

Creating Boleto Payments with scheduled, tags parameters

Scheduled: Schedule the payment for a specific date.

Today is the default.

Boleto Payments scheduled for today will be accepted until 16:00 (BRT) and will be pushed to the next business day afterwards.

Example: "2020-08-14"

Tags: Array of strings to tag the entity for future queries. All tags will be converted to lowercase. Example: ["war", "invoice/1234"]

Python

import starkbank

payments = starkbank.boletopayment.create([
    starkbank.BoletoPayment(
        line="34191.09107 05447.947309 71544.640008 8 84660000011631",
        tax_id="38.435.677/0001-25",
        description="Payment for killing white walkers",
        scheduled="2020-08-14",
        tags=["war", "invoice/1234"]
    )
])

for payment in payments:
    print(payment)
    

Javascript

const starkbank = require('starkbank');

(async() => {
    let payments = await starkbank.boletoPayment.create([
        {
            line: '34191.09107 05447.947309 71544.640008 8 84660000011631',
            taxId: '38.435.677/0001-25',
            description: 'Payment for killing white walkers',
            scheduled: '2020-08-14',
            tags: ['war', 'invoice/1234']
        }
    ])

    for (let payment of payments) {
        console.log(payment);
    }
})();
    

PHP

$payments = StarkBank\BoletoPayment::create([
    new StarkBank\BoletoPayment([
        "line" => "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "taxId" => "38.435.677/0001-25",
        "description" => "Payment for killing white walkers",
        "scheduled" => "2020-08-14",
        "tags" => ["war", "invoice/1234"]
    ])
]);

foreach($payments as $payment){
    print_r($payment);
}
    

Java

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

List<BoletoPayment> payments = new ArrayList<>();

HashMap<String, Object> data = new HashMap<>();
data.put("line", "34191.09107 05447.947309 71544.640008 8 84660000011631");
data.put("taxId", "38.435.677/0001-25");
data.put("description", "Payment for killing white walkers");
data.put("scheduled", "2020-08-14");
data.put("tags", new String[]{"war", "invoice/1234"});
payments.add(new BoletoPayment(data));

payments = BoletoPayment.create(payments);

for (BoletoPayment payment : payments){
    System.out.println(payment);
}
    

Ruby

require('starkbank')

payments = StarkBank::BoletoPayment.create(
    [
        StarkBank::BoletoPayment.new(
            line: '34191.09107 05447.947309 71544.640008 8 84660000011631',
            tax_id: '38.435.677/0001-25',
            description: 'Payment for killing white walkers',
            scheduled: '2020-08-14',
            tags: ['war', 'invoice/1234']
        )
    ]
)

payments.each do |payment|
    puts payment
end
    

Elixir

payments = StarkBank.BoletoPayment.create!([
    %StarkBank.BoletoPayment{
        line: "34191.09107 05447.947309 71544.640008 8 84660000011631",
        tax_id: "38.435.677/0001-25",
        description: "Payment for killing white walkers",
        scheduled: "2020-08-14",
        tags: ["war", "invoice/1234"]
    }
])

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

C#

using System;
using System.Collections.Generic;

List<StarkBank.BoletoPayment> payments = StarkBank.BoletoPayment.Create(
    new List<StarkBank.BoletoPayment> {
        new StarkBank.BoletoPayment(
            line: "34191.09107 05447.947309 71544.640008 8 84660000011631",
            taxID: "38.435.677/0001-25",
            description: "Payment for killing white walkers",
            scheduled: new DateTime(2020, 8, 14),
            tags: new List<string> { "war", "invoice/1234" }
        )
    }
);

foreach(StarkBank.BoletoPayment payment in payments)
{
    Console.WriteLine(payment);
}
    

Go

package main

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

func main() {

    scheduled := time.Date(2020, 8, 14, 0, 0, 0, 0, time.UTC)

    payments, err := boletopayment.Create(
        []boletopayment.BoletoPayment{
            {
                Line:        "34191.09107 05447.947309 71544.640008 8 84660000011631",
                TaxId:       "38.435.677/0001-25",
                Description: "Payment for killing white walkers",
                Scheduled:   &scheduled,
                Tags:        []string{"war", "invoice/1234"},
            },
        }, nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

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

Clojure

(def payments
  (starkbank.boleto-payment/create
    [
      {
        :line "34191.09107 05447.947309 71544.640008 8 84660000011631"
        :tax-id "38.435.677/0001-25"
        :description "Payment for killing white walkers"
        :scheduled "2020-08-14"
        :tags ["war" "invoice/1234"]
      }
    ]))
(dorun (map println payments))
    

Curl

curl --location --request POST '{{baseUrl}}/v2/boleto-payment' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}' 
--header 'Content-Type: application/json' 
--data-raw '{
    "payments": [
        {
            "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
            "taxId": "38.435.677/0001-25",
            "description": "Payment for killing white walkers",
            "scheduled": "2020-08-14",
            "tags": ["war", "invoice/1234"]
        }
    ]
}'
    
RESPONSE

Python

BoletoPayment(
    amount=11631,
    bar_code=34198846600000116313109105447947307154464000,
    created=2020-02-06 16:22:24.664134,
    description=Payment for killing white walkers,
    fee=0,
    id=5412038532661248,
    line=34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled=2020-08-14 10:00:00,
    status=created,
    tags=['war', 'invoice/1234'],
    tax_id=38.435.677/0001-25,
    transaction_ids=[]
)
    

Javascript

BoletoPayment {
    id: '5412038532661248',
    amount: 11631,
    barCode: '34198846600000116313109105447947307154464000',
    created: '2020-02-06T16:22:24.664148+00:00',
    description: 'Payment for killing white walkers',
    fee: 0,
    line: '34191.09107 05447.947309 71544.640008 8 84660000011631',
    scheduled: '2020-08-14T10:00:00+00:00',
    status: 'created',
    tags: [ 'war', 'invoice/1234' ],
    taxId: '38.435.677/0001-25',
    transactionIds: []
}
    

PHP

StarkBank\BoletoPayment Object
(
    [id] => 5412038532661248
    [amount] => 11631
    [barCode] => 34198846600000116313109105447947307154464000
    [created] => DateTime Object
        (
            [date] => 2020-02-06 16:22:24.664148
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [description] => Payment for killing white walkers
    [fee] => 0
    [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631
    [scheduled] => DateTime Object
        (
            [date] => 2020-08-14 10:00:00.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [status] => created
    [tags] => Array
        (
            [0] => war
            [1] => invoice/1234
        )

    [taxId] => 38.435.677/0001-25
    [transactionIds] => Array
        (
        )

)
    

Java

BoletoPayment({
    "amount": 11631,
    "barCode": "34198846600000116313109105447947307154464000",
    "created": "2020-02-06T16:22:24.664148+00:00",
    "description": "Payment for killing white walkers",
    "fee": 0,
    "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
    "scheduled": "2020-08-14T10:00:00+00:00",
    "status": "created",
    "tags": ["war", "invoice/1234"],
    "taxId": "38.435.677/0001-25",
    "transactionIds": [],
    "id": "5412038532661248"
})
    

Ruby

boletopayment(
    id: 5412038532661248,
    amount: 11631,
    bar_code: 34198846600000116313109105447947307154464000,
    created: 2020-02-06T16:22:24+00:00,
    description: Payment for killing white walkers,
    fee: 0,
    line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled: 2020-08-14T10:00:00+00:00,
    status: created,
    tags: ['war', 'invoice/1234'],
    tax_id: 38.435.677/0001-25,
    transaction_ids: []
)
    

Elixir

%StarkBank.BoletoPayment{
    amount: 11631,
    bar_code: "34198846600000116313109105447947307154464000",
    created: ~U[2020-02-06 16:22:24.664148Z],
    description: "Payment for killing white walkers",
    fee: 0,
    id: "5412038532661248",
    line: "34191.09107 05447.947309 71544.640008 8 84660000011631",
    scheduled: ~U[2020-08-14 10:00:00Z],
    status: "created",
    tags: ["war", "invoice/1234"],
    tax_id: "38.435.677/0001-25",
    transaction_ids: []
}
    

C#

BoletoPayment(
    Amount: 11631,
    BarCode: 34198846600000116313109105447947307154464000,
    Created: 06/02/2020 16:22:24,
    Description: Payment for killing white walkers,
    Fee: 0,
    Line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    Scheduled: 14/08/2020 10:00:00,
    Status: created,
    Tags: { war, invoice/1234 },
    TaxID: 38.435.677/0001-25,
    TransactionIds: {  },
    ID: 5412038532661248
)
    

Go

{
    Id:5412038532661248
    Amount:11631
    BarCode:34198846600000116313109105447947307154464000
    Created:2020-02-06 16:22:24.664148 +0000 +0000
    Description:Payment for killing white walkers
    Fee:0
    Line:34191.09107 05447.947309 71544.640008 8 84660000011631
    Scheduled:2020-08-14 10:00:00 +0000 +0000
    Status:created
    Tags:[war invoice/1234]
    TaxId:38.435.677/0001-25
    TransactionIds:[]
}
    

Clojure

{:amount 11631,
 :bar-code "34198846600000116313109105447947307154464000",
 :created "2020-02-06T16:22:24.664148+00:00",
 :description "Payment for killing white walkers",
 :fee 0,
 :id "5412038532661248",
 :line "34191.09107 05447.947309 71544.640008 8 84660000011631",
 :scheduled "2020-08-14T10:00:00+00:00",
 :status "created",
 :tags ["war" "invoice/1234"],
 :tax-id "38.435.677/0001-25",
 :transaction-ids []}
    

Curl

{
    "message": "Boleto Payment(s) successfully created",
    "payments": [
        {
            "amount": 11631,
            "barCode": "34198846600000116313109105447947307154464000",
            "created": "2020-02-06T16:22:24.387022+00:00",
            "description": "Payment for killing white walkers",
            "fee": 0,
            "id": "5412038532661248",
            "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
            "scheduled": "2020-08-14T10:00:00+00:00",
            "status": "created",
            "tags": ["war", "invoice/1234"],
            "taxId": "38.435.677/0001-25",
            "transactionIds": []
        }
    ]
}
    

Listing Boleto Payments

Get a list of Boleto Payments using filters such as after, before, status and tags to narrow the results.

Python

import starkbank

payments = starkbank.boletopayment.query(
    after="2020-04-01",
    before="2020-04-30",
)

for payment in payments:
    print(payment)
    

Javascript

const starkbank = require('starkbank');

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

    for await (let payment of payments) {
        console.log(payment);
    }
})();
    

PHP

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

foreach($payments as $payment){
    print_r($payment);
}
    

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<BoletoPayment> payments = BoletoPayment.query(params);

for (BoletoPayment payment : payments){
    System.out.println(payment);
}
    

Ruby

require('starkbank')

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

payments.each do |payment|
    puts payment
end
    

Elixir

payments = StarkBank.BoletoPayment.query!(
    after: "2020-04-01",
    before: "2020-04-30"
)

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

C#

using System;
using System.Collections.Generic;

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

foreach(StarkBank.BoletoPayment payment in payments)
{
    Console.WriteLine(payment);
}
    

Go

package main

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

func main() {

    var params = map[string]interface{}{}
    params["after"] = time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC)
    params["before"] = time.Date(2020, 4, 30, 0, 0, 0, 0, time.UTC)

    payments, errorChannel := boletopayment.Query(params, nil)

    loop:
    for {
        select {
        case err := <-errorChannel:
            if err.Errors != nil {
                for _, e := range err.Errors {
                    fmt.Printf("code: %s, message: %s", e.Code, e.Message)
                }
            }
        case payment, ok := <-payments:
            if !ok {
                break loop
            }
            fmt.Printf("%+v", payment)
        }
    }
}
    

Clojure

(def payments
    (starkbank.boleto-payment/query
    {
        :after "2020-04-01"
        :before "2020-04-30"
    }))

(dorun (map println payments))
    

Curl

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

Python

BoletoPayment(
    amount=11631,
    bar_code=34198846600000116313109105447947307154464000,
    created=2020-04-24 17:49:10.225810,
    description=Payment for killing white walkers,
    fee=0,
    id=5950134772826112,
    line=34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled=2020-08-14 10:00:00,
    status=processing,
    tags=['war', 'invoice/1234'],
    tax_id=38.435.677/0001-25,
    transaction_ids=['5991715760504832']
)
    

Javascript

BoletoPayment {
    id: '5950134772826112',
    amount: 11631,
    barCode: '34198846600000116313109105447947307154464000',
    created: '2020-04-24T17:49:10.225810+00:00',
    description: 'Payment for killing white walkers',
    fee: 0,
    line: '34191.09107 05447.947309 71544.640008 8 84660000011631',
    scheduled: '2020-08-14T10:00:00+00:00',
    status: 'processing',
    tags: [ 'war', 'invoice/1234' ],
    taxId: '38.435.677/0001-25',
    transactionIds: [ '5991715760504832' ]
}
    

PHP

StarkBank\BoletoPayment Object
(
    [id] => 5950134772826112
    [amount] => 11631
    [barCode] => 34198846600000116313109105447947307154464000
    [created] => DateTime Object
        (
            [date] => 2020-04-24 17:49:10.225810
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [description] => Payment for killing white walkers
    [fee] => 0
    [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631
    [scheduled] => DateTime Object
        (
            [date] => 2020-08-14 10:00:00.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [status] => processing
    [tags] => Array
        (
            [0] => war
            [1] => invoice/1234
        )

    [taxId] => 38.435.677/0001-25
    [transactionIds] => Array
        (
            [0] => 5991715760504832
        )

)
    

Java

BoletoPayment({
    "amount": 11631,
    "barCode": "34198846600000116313109105447947307154464000",
    "created": "2020-04-24T17:49:10.225810+00:00",
    "description": "Payment for killing white walkers",
    "fee": 0,
    "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
    "scheduled": "2020-08-14T10:00:00+00:00",
    "status": "processing",
    "tags": ["war", "invoice/1234"],
    "taxId": "38.435.677/0001-25",
    "transactionIds": ["5991715760504832"],
    "id": "5950134772826112"
})
    

Ruby

boletopayment(
    id: 5950134772826112,
    amount: 11631,
    bar_code: 34198846600000116313109105447947307154464000,
    created: 2020-04-24T17:49:10+00:00,
    description: Payment for killing white walkers,
    fee: 0,
    line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled: 2020-08-14T10:00:00+00:00,
    status: processing,
    tags: ['war', 'invoice/1234'],
    tax_id: 38.435.677/0001-25,
    transaction_ids: ['5991715760504832']
)
    

Elixir

%StarkBank.BoletoPayment{
    amount: 11631,
    bar_code: "34198846600000116313109105447947307154464000",
    created: ~U[2020-04-24 17:49:10.225810Z],
    description: "Payment for killing white walkers",
    fee: 0,
    id: "5950134772826112",
    line: "34191.09107 05447.947309 71544.640008 8 84660000011631",
    scheduled: ~U[2020-08-14 10:00:00Z],
    status: "processing",
    tags: ["war", "invoice/1234"],
    tax_id: "38.435.677/0001-25",
    transaction_ids: ["5991715760504832"]
}
    

C#

BoletoPayment(
    Amount: 11631,
    BarCode: 34198846600000116313109105447947307154464000,
    Created: 24/04/2020 17:49:10,
    Description: Payment for killing white walkers,
    Fee: 0,
    Line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    Scheduled: 14/08/2020 10:00:00,
    Status: processing,
    Tags: { war, invoice/1234 },
    TaxID: 38.435.677/0001-25,
    TransactionIds: { 5991715760504832 },
    ID: 5950134772826112
)
    

Go

{
    Id:5950134772826112
    Amount:11631
    BarCode:34198846600000116313109105447947307154464000
    Created:2020-04-24 17:49:10.225810 +0000 +0000
    Description:Payment for killing white walkers
    Fee:0
    Line:34191.09107 05447.947309 71544.640008 8 84660000011631
    Scheduled:2020-08-14 10:00:00 +0000 +0000
    Status:processing
    Tags:[war invoice/1234]
    TaxId:38.435.677/0001-25
    TransactionIds:[5991715760504832]
}
    

Clojure

{:amount 11631,
 :bar-code "34198846600000116313109105447947307154464000",
 :created "2020-04-24T17:49:10.225810+00:00",
 :description "Payment for killing white walkers",
 :fee 0,
 :id "5950134772826112",
 :line "34191.09107 05447.947309 71544.640008 8 84660000011631",
 :scheduled "2020-08-14T10:00:00+00:00",
 :status "processing",
 :tags ["war" "invoice/1234"],
 :tax-id "38.435.677/0001-25",
 :transaction-ids ["5991715760504832"]}
    

Curl

{
    "cursor": null,
    "payments": [
        {
            "id": "5950134772826112",
            "amount": 11631,
            "barCode": "34198846600000116313109105447947307154464000",
            "created": "2020-04-24T17:49:10.225810+00:00",
            "description": "Payment for killing white walkers",
            "fee": 0,
            "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
            "scheduled": "2020-08-14T10:00:00+00:00",
            "status": "processing",
            "tags": ["war", "invoice/1234"],
            "taxId": "38.435.677/0001-25",
            "transactionIds": ["5991715760504832"]
        }
    ]
}
    

Getting a Boleto Payment

Get a single Boleto Payment by its id.

You can use it to check the current status of a Boleto Payment.

Python

import starkbank

payment = starkbank.boletopayment.get("5950134772826112")

print(payment)
    

Javascript

const starkbank = require('starkbank');

(async() => {
    let payment = await starkbank.boletoPayment.get('5950134772826112');
    console.log(payment);
})();
    

PHP

$payment = StarkBank\BoletoPayment::get("5950134772826112");

print_r($payment);
    

Java

import com.starkbank.*;

BoletoPayment payment = BoletoPayment.get("5950134772826112");

System.out.println(payment);
    

Ruby

require('starkbank')

payment = StarkBank::BoletoPayment.get('5950134772826112')

puts payment
    

Elixir

payment = StarkBank.BoletoPayment.get!("5950134772826112")

payment |> IO.inspect
    

C#

using System;

StarkBank.BoletoPayment payment = StarkBank.BoletoPayment.Get("5950134772826112");

Console.WriteLine(payment);
    

Go

package main

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

func main() {

    payment, err := boletopayment.Get("5950134772826112", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Println(payment)
}
    

Clojure

(def payment (starkbank.boleto-payment/get "5950134772826112"))

(println payment)
    

Curl

curl --location --request GET '{{baseUrl}}/v2/boleto-payment/5950134772826112' 
--header 'Access-Id: {{accessId}}' 
--header 'Access-Time: {{accessTime}}' 
--header 'Access-Signature: {{accessSignature}}'
    
RESPONSE

Python

BoletoPayment(
    amount=11631,
    bar_code=34198846600000116313109105447947307154464000,
    created=2020-04-24 17:49:10.225810,
    description=Payment for killing white walkers,
    fee=0,
    id=5950134772826112,
    line=34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled=2020-08-14 10:00:00,
    status=processing,
    tags=['war', 'invoice/1234'],
    tax_id=38.435.677/0001-25,
    transaction_ids=['5991715760504832']
)
    

Javascript

BoletoPayment {
    id: '5950134772826112',
    amount: 11631,
    barCode: '34198846600000116313109105447947307154464000',
    created: '2020-04-24T17:49:10.225810+00:00',
    description: 'Payment for killing white walkers',
    fee: 0,
    line: '34191.09107 05447.947309 71544.640008 8 84660000011631',
    scheduled: '2020-08-14T10:00:00+00:00',
    status: 'processing',
    tags: [ 'war', 'invoice/1234' ],
    taxId: '38.435.677/0001-25',
    transactionIds: [ '5991715760504832' ]
}
    

PHP

StarkBank\BoletoPayment Object
(
    [id] => 5950134772826112
    [amount] => 11631
    [barCode] => 34198846600000116313109105447947307154464000
    [created] => DateTime Object
        (
            [date] => 2020-04-24 17:49:10.225810
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [description] => Payment for killing white walkers
    [fee] => 0
    [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631
    [scheduled] => DateTime Object
        (
            [date] => 2020-08-14 10:00:00.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [status] => processing
    [tags] => Array
        (
            [0] => war
            [1] => invoice/1234
        )

    [taxId] => 38.435.677/0001-25
    [transactionIds] => Array
        (
            [0] => 5991715760504832
        )

)
    

Java

BoletoPayment({
    "amount": 11631,
    "barCode": "34198846600000116313109105447947307154464000",
    "created": "2020-04-24T17:49:10.225810+00:00",
    "description": "Payment for killing white walkers",
    "fee": 0,
    "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
    "scheduled": "2020-08-14T10:00:00+00:00",
    "status": "processing",
    "tags": ["war", "invoice/1234"],
    "taxId": "38.435.677/0001-25",
    "transactionIds": ["5991715760504832"],
    "id": "5950134772826112"
})
    

Ruby

boletopayment(
    id: 5950134772826112,
    amount: 11631,
    bar_code: 34198846600000116313109105447947307154464000,
    created: 2020-04-24T17:49:10+00:00,
    description: Payment for killing white walkers,
    fee: 0,
    line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled: 2020-08-14T10:00:00+00:00,
    status: processing,
    tags: ['war', 'invoice/1234'],
    tax_id: 38.435.677/0001-25,
    transaction_ids: ['5991715760504832']
)
    

Elixir

%StarkBank.BoletoPayment{
    amount: 11631,
    bar_code: "34198846600000116313109105447947307154464000",
    created: ~U[2020-04-24 17:49:10.225810Z],
    description: "Payment for killing white walkers",
    fee: 0,
    id: "5950134772826112",
    line: "34191.09107 05447.947309 71544.640008 8 84660000011631",
    scheduled: ~U[2020-08-14 10:00:00Z],
    status: "processing",
    tags: ["war", "invoice/1234"],
    tax_id: "38.435.677/0001-25",
    transaction_ids: ["5991715760504832"]
}
    

C#

BoletoPayment(
    Amount: 11631,
    BarCode: 34198846600000116313109105447947307154464000,
    Created: 24/04/2020 17:49:10,
    Description: Payment for killing white walkers,
    Fee: 0,
    Line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    Scheduled: 14/08/2020 10:00:00,
    Status: processing,
    Tags: { war, invoice/1234 },
    TaxID: 38.435.677/0001-25,
    TransactionIds: { 5991715760504832 },
    ID: 5950134772826112
)
    

Go

{
    Id:5950134772826112
    Amount:11631
    BarCode:34198846600000116313109105447947307154464000
    Created:2020-04-24 17:49:10.225810 +0000 +0000
    Description:Payment for killing white walkers
    Fee:0
    Line:34191.09107 05447.947309 71544.640008 8 84660000011631
    Scheduled:2020-08-14 10:00:00 +0000 +0000
    Status:processing
    Tags:[war invoice/1234]
    TaxId:38.435.677/0001-25
    TransactionIds:[5991715760504832]
}
    

Clojure

{:amount 11631,
 :bar-code "34198846600000116313109105447947307154464000",
 :created "2020-04-24T17:49:10.225810+00:00",
 :description "Payment for killing white walkers",
 :fee 0,
 :id "5950134772826112",
 :line "34191.09107 05447.947309 71544.640008 8 84660000011631",
 :scheduled "2020-08-14T10:00:00+00:00",
 :status "processing",
 :tags ["war" "invoice/1234"],
 :tax-id "38.435.677/0001-25",
 :transaction-ids ["5991715760504832"]}
    

Curl

{
    "payment": {
        "id": "5950134772826112",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2020-04-24T17:49:10.225810+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2020-08-14T10:00:00+00:00",
        "status": "processing",
        "tags": ["war", "invoice/1234"],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["5991715760504832"]
    }
}
    

Canceling Boleto Payment

This method will allow the cancellation of a boleto payment.

It's important to note that it's only possible to cancel boleto payments before the start of processing.

Python

import starkbank

payment = starkbank.boletopayment.delete("6693962735681536")

print(payment)
    

Javascript

const starkbank = require('starkbank');

(async() => {
    let payment = await starkbank.boletoPayment.delete('6693962735681536');
    console.log(payment);
})();
    

PHP

$payment = StarkBank\BoletoPayment::delete("6693962735681536");

print_r($payment);
    

Java

import com.starkbank.*;

BoletoPayment payment = BoletoPayment.delete("6693962735681536");

System.out.println(payment);
    

Ruby

require('starkbank')

payment = StarkBank::BoletoPayment.delete('6693962735681536')

puts payment
    

Elixir

payment = StarkBank.BoletoPayment.delete!("6693962735681536")

payment |> IO.inspect
    

C#

using System;

StarkBank.BoletoPayment payment = StarkBank.BoletoPayment.Delete("6693962735681536");

Console.WriteLine(payment);
    

Go

package main

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

func main() {

    payment, err := boletopayment.Delete("6693962735681536", nil)
    if err.Errors != nil {
        for _, e := range err.Errors {
            fmt.Printf("code: %s, message: %s", e.Code, e.Message)
        }
    }

    fmt.Println(payment)
}
    

Clojure

(def payment (starkbank.boleto-payment/delete "6693962735681536"))

(println payment)
    

Curl

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

Python

BoletoPayment(
    amount=11631,
    bar_code=34198846600000116313109105447947307154464000,
    created=2020-04-24 17:49:10.225810,
    description=Payment for killing white walkers,
    fee=0,
    id=6693962735681536,
    line=34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled=2020-08-14 10:00:00,
    status=canceled,
    tags=['war', 'invoice/1234'],
    tax_id=38.435.677/0001-25,
    transaction_ids=[]
)
    

Javascript

BoletoPayment {
    id: '6693962735681536',
    amount: 11631,
    barCode: '34198846600000116313109105447947307154464000',
    created: '2020-04-24T17:49:10.225810+00:00',
    description: 'Payment for killing white walkers',
    fee: 0,
    line: '34191.09107 05447.947309 71544.640008 8 84660000011631',
    scheduled: '2020-08-14T10:00:00+00:00',
    status: 'canceled',
    tags: [ 'war', 'invoice/1234' ],
    taxId: '38.435.677/0001-25',
    transactionIds: []
}
    

PHP

StarkBank\BoletoPayment Object
(
    [id] => 6693962735681536
    [amount] => 11631
    [barCode] => 34198846600000116313109105447947307154464000
    [created] => DateTime Object
        (
            [date] => 2020-04-24 17:49:10.225810
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [description] => Payment for killing white walkers
    [fee] => 0
    [line] => 34191.09107 05447.947309 71544.640008 8 84660000011631
    [scheduled] => DateTime Object
        (
            [date] => 2020-08-14 10:00:00.000000
            [timezone_type] => 1
            [timezone] => +00:00
        )

    [status] => canceled
    [tags] => Array
        (
            [0] => war
            [1] => invoice/1234
        )

    [taxId] => 38.435.677/0001-25
    [transactionIds] => Array
        (
        )

)
    

Java

BoletoPayment({
    "amount": 11631,
    "barCode": "34198846600000116313109105447947307154464000",
    "created": "2020-04-24T17:49:10.225810+00:00",
    "description": "Payment for killing white walkers",
    "fee": 0,
    "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
    "scheduled": "2020-08-14T10:00:00+00:00",
    "status": "canceled",
    "tags": ["war", "invoice/1234"],
    "taxId": "38.435.677/0001-25",
    "transactionIds": [],
    "id": "6693962735681536"
})
    

Ruby

boletopayment(
    id: 6693962735681536,
    amount: 11631,
    bar_code: 34198846600000116313109105447947307154464000,
    created: 2020-04-24T17:49:10+00:00,
    description: Payment for killing white walkers,
    fee: 0,
    line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    scheduled: 2020-08-14T10:00:00+00:00,
    status: canceled,
    tags: ['war', 'invoice/1234'],
    tax_id: 38.435.677/0001-25,
    transaction_ids: []
)
    

Elixir

%StarkBank.BoletoPayment{
    amount: 11631,
    bar_code: "34198846600000116313109105447947307154464000",
    created: ~U[2020-04-24 17:49:10.225810Z],
    description: "Payment for killing white walkers",
    fee: 0,
    id: "6693962735681536",
    line: "34191.09107 05447.947309 71544.640008 8 84660000011631",
    scheduled: ~U[2020-08-14 10:00:00Z],
    status: "canceled",
    tags: ["war", "invoice/1234"],
    tax_id: "38.435.677/0001-25",
    transaction_ids: []
}
    

C#

BoletoPayment(
    Amount: 11631,
    BarCode: 34198846600000116313109105447947307154464000,
    Created: 24/04/2020 17:49:10,
    Description: Payment for killing white walkers,
    Fee: 0,
    Line: 34191.09107 05447.947309 71544.640008 8 84660000011631,
    Scheduled: 14/08/2020 10:00:00,
    Status: canceled,
    Tags: { war, invoice/1234 },
    TaxID: 38.435.677/0001-25,
    TransactionIds: {  },
    ID: 6693962735681536
)
    

Go

{
    Id:6693962735681536
    Amount:11631
    BarCode:34198846600000116313109105447947307154464000
    Created:2020-04-24 17:49:10.225810 +0000 +0000
    Description:Payment for killing white walkers
    Fee:0
    Line:34191.09107 05447.947309 71544.640008 8 84660000011631
    Scheduled:2020-08-14 10:00:00 +0000 +0000
    Status:canceled
    Tags:[war invoice/1234]
    TaxId:38.435.677/0001-25
    TransactionIds:[]
}
    

Clojure

{:amount 11631,
 :bar-code "34198846600000116313109105447947307154464000",
 :created "2020-04-24T17:49:10.225810+00:00",
 :description "Payment for killing white walkers",
 :fee 0,
 :id "6693962735681536",
 :line "34191.09107 05447.947309 71544.640008 8 84660000011631",
 :scheduled "2020-08-14T10:00:00+00:00",
 :status "canceled",
 :tags ["war" "invoice/1234"],
 :tax-id "38.435.677/0001-25",
 :transaction-ids []}
    

Curl

{
    "payment": {
        "id": "6693962735681536",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2020-04-24T17:49:10.225810+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2020-08-14T10:00:00+00:00",
        "status": "canceled",
        "tags": ["war", "invoice/1234"],
        "taxId": "38.435.677/0001-25",
        "transactionIds": []
    }
}
    

Receiving Boleto Payment Webhook

After creation, you can use asynchronous Webhooks to monitor status changes of the entity. The Boleto Payment will follow the following life cycle:

Every time we change a Boleto Payment, we create a Log. Logs are pretty useful for understanding the life cycle of each Boleto Payment. Whenever a new Log is created, we will fire a Webhook to your registered URL.

NOTE: Check the Webhook Get Started for more details on how to receive and process Webhook events.

NOTE: A boleto-payment subscription is required to receive this event.

RESPONSE

Python

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}
        

Javascript

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}
        

PHP

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}
        

Java

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}
        

Ruby

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}
        

Elixir

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}
        

C#

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}
        

Go

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}
        

Clojure

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}
        

Curl

{
  "event": {
    "id": "5258020443389952",
    "subscription": "boleto-payment",
    "workspaceId": "6341320293482496",
    "created": "2024-02-01T02:06:27.872660+00:00",
    "log": {
      "id": "4638457385189376",
      "type": "success",
      "created": "2024-02-01T02:06:26.317809+00:00",
      "errors": [],
      "payment": {
        "id": "6679150966341632",
        "amount": 11631,
        "barCode": "34198846600000116313109105447947307154464000",
        "created": "2024-02-01T02:06:26.294998+00:00",
        "description": "Payment for killing white walkers",
        "fee": 0,
        "line": "34191.09107 05447.947309 71544.640008 8 84660000011631",
        "scheduled": "2024-02-02T10:00:00+00:00",
        "status": "success",
        "tags": [
          "order/123",
          "customer/456"
        ],
        "taxId": "38.435.677/0001-25",
        "transactionIds": ["6341320293482496"]
      }
    }
  }
}