---
updatedAt: 2025-02-19T02:26:05.000Z
agentTools:
  projectIndex: https://devs.bs2.com/llms.txt
---

# Payments

In this session, we make the operations to make and follow up a payment available.

#

## Making payments scanning the barcode or typing its sequence of numerical digits

In this functionality, we receive the barcode or its sequence of numerical digits, and process the payment of bank slips and bank slips.

We request the fields:

| Field               | Description                                 | Format            | Mandatory |
| ------------------- | ------------------------------------------- | ----------------- | :-------- |
| codigoIdentificacao | Barcode or its sequence of numerical digits | string            | Yes       |
| valor               | Payment amount                              | number `<double>` | Yes       |
| efetuarEm           | Date on which payment must occur            | date-time         | No        |
| vencimentoEm        | Due date of the document to be paid         | date-time         | No        |

Response:

| Field         | Description                                          | Format  | Nullable |
| ------------- | ---------------------------------------------------- | ------- | :------- |
| solicitacaoId | Payment request identifier                           | string  | No       |
| aprovado      | Informs whether the payment was approved or rejected | boolean | No       |
| mensagem      | Request return message in case of failure            | string  | Yes      |

<br />

[Efetuar pagamento de título de cobrança/arrecadação pelo código de barras ou pela linha digitável](https://devs.bs2.com/reference/post_pj-apibanking-forintegration-v1-pagamentos)

#

## Checking the status of the payment request

In this functionality, it is possible to follow up the status of the payment request.

We request the fields:

| Field         | Description                 | Format | Mandatory |
| ------------- | --------------------------- | ------ | :-------- |
| solicitacaoId | Payment identification code | string | Yes       |

Resposta:

| Field      | Description                                                       | Format  | Nullable |
| ---------- | ----------------------------------------------------------------- | ------- | :------- |
| id         | Payment identification code                                       | string  | No       |
| situacao   | Description of payment status, see table **\[Payment Status]**    | string  | Yes      |
| status     | Displays the payment status code, see table **\[Payment Status]** | integer | No       |
| observacao | Note with the reason for the failure, if it occurs                | string  | Yes      |

[Consultar o status da solicitação de pagamento](https://devs.bs2.com/reference/get_pj-apibanking-forintegration-v1-pagamentos-solicitacoes-solicitacaoid)

#

## Checking bank slip for collection/levying scanning the barcode or typing its sequence of numerical digits

We make checking of the data of a bank slip or bank slip for collection available from any financial institution.

We request the fields:

| Field               | Description                 | Format | Mandatory |
| ------------------- | --------------------------- | ------ | :-------- |
| codigoIdentificacao | Payment identification code | string | Yes       |

Resposta:

| Field              | Description                                                                                                               | Format    | nullable |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------- | --------- | :------- |
| vencimento         | Document due date                                                                                                         | date-time | Yes      |
| banco              | Code and name of the bank issuing the document (valid only for bank slips)                                                | object    | No       |
| beneficiario       | Name and CPF/CNPJ number of the payment beneficiary                                                                       | object    | Yes      |
| valores            | Details of amounts paid (original amount, amount charged, discounts, interest on arrears, other deductions and additions) | object    | No       |
| descricaoPagamento | Displays payment description                                                                                              | string    | Yes      |
| nomePagador        | Name of the document payer                                                                                                | string    | Yes      |
| codigoBarras       | Document barcode                                                                                                          | string    | Yes      |
| linhaDigitavel     | Barcode´s sequence of numerical digits                                                                                    | string    | Yes      |
| cedente            | Payment assignor                                                                                                          | string    | Yes      |

[Consultar título de cobrança/arrecadação pelo código de barras ou pela linha digitável](https://devs.bs2.com/reference/get_pj-apibanking-forintegration-v1-pagamentos-codigoidentificacao)

## Payment status

The mapped statuses to the payment status are:

| Enumeration | Description              |
| :---------: | ------------------------ |
|      1      | Canceled                 |
|      2      | Automatically Canceled   |
|      3      | Scheduled                |
|      4      | Processing               |
|      5      | Completed                |
|      6      | Waiting for homologation |
|      7      | Rejected                 |
|      8      | Failure                  |