openapi: 3.0.3 info: title: Brazil QR code - Dynamic Collections with Due Date API description: >- This API allows clients to accept and manage PIX QR code collections with due date. PIX is a payment method owned by the Central Bank of Brazil (Banco Central), offering instant direct bank transfers in Brazil. version: 1.0.0 servers: - url: https://tts.sit.apib2b.citi.com/citiconnect/sit5/ description: dev gateway url - url: https://tts.apib2b.citi.com/citiconnect/prod/ description: production gateway url - url: https://tts.sandbox.apib2b.citi.com/citiconnect/sb/ description: 'sbox url ' paths: /paymentservices/collections/qrcodes/cobv/{txid}: parameters: - $ref: '#/components/parameters/TxId' - $ref: '#/components/parameters/ClientId' put: summary: Create collection with due date. operationId: dynamicCollectionCreateWithDueDate security: - cobVWriteSample: - cobv.write description: Endpoint to create a collection with due date. requestBody: $ref: '#/components/requestBodies/CobVBody' responses: '201': $ref: '#/components/responses/CobVGeradaCreateResponse' '400': $ref: '#/components/responses/RequisicaoInvalida' '401': $ref: '#/components/responses/AcessoNegado1' '403': $ref: '#/components/responses/AcessoNegado' '404': $ref: '#/components/responses/NaoEncontrado' '405': $ref: '#/components/responses/MetodoInvalido' '415': $ref: '#/components/responses/MidiaInvalida' '500': $ref: '#/components/responses/ServicoIndisponivel1' '503': $ref: '#/components/responses/ServicoIndisponivel' patch: parameters: - $ref: '#/components/parameters/CNPJ' summary: Update collection with due date. operationId: dynamicCollectionUpdateWithDueDate security: - cobVWriteSample: - cobv.write requestBody: $ref: '#/components/requestBodies/CobVBodyRevisada' responses: '200': $ref: '#/components/responses/CobVGeradaUpdateResponse' '400': $ref: '#/components/responses/RequisicaoInvalida' '401': $ref: '#/components/responses/AcessoNegado1' '403': $ref: '#/components/responses/AcessoNegado' '404': $ref: '#/components/responses/NaoEncontrado' '405': $ref: '#/components/responses/MetodoInvalido' '415': $ref: '#/components/responses/MidiaInvalida' '500': $ref: '#/components/responses/ServicoIndisponivel1' '503': $ref: '#/components/responses/ServicoIndisponivel' get: parameters: - $ref: '#/components/parameters/TxId' - $ref: '#/components/parameters/CNPJQuery' - $ref: '#/components/parameters/Revisao' - $ref: '#/components/parameters/ClientId' summary: Retrieve specific collection with due date details. operationId: dynamicCollectionInquiryWithDueDate security: - cobVReadSample: - cobv.read description: >- Endpoint intended to retrieve details for a collection with due date through a specific TXID. responses: '200': $ref: '#/components/responses/CobVCompletaResponse' '400': $ref: '#/components/responses/RequisicaoInvalida' '401': $ref: '#/components/responses/AcessoNegado1' '403': $ref: '#/components/responses/AcessoNegado' '404': $ref: '#/components/responses/NaoEncontrado' '405': $ref: '#/components/responses/MetodoInvalido' '500': $ref: '#/components/responses/ServicoIndisponivel1' '503': $ref: '#/components/responses/ServicoIndisponivel' /paymentservices/collections/qrcodes/cobv: get: parameters: - $ref: '#/components/parameters/Inicio' - $ref: '#/components/parameters/Fim' - $ref: '#/components/parameters/CPF' - $ref: '#/components/parameters/CNPJ' - $ref: '#/components/parameters/LocationPresente' - $ref: '#/components/parameters/Status' - $ref: '#/components/parameters/loteCobVId' - $ref: '#/components/parameters/PaginaAtual' - $ref: '#/components/parameters/ItensPorPagina' - $ref: '#/components/parameters/ClientId' summary: Retrieve a list of collection items with due date. operationId: dynamicCollectionInquiryListWithDueDate security: - cobVReadSample: - cobv.read description: >- Endpoint to query outstanding collections through parameters like start date, end date, taxpayer ID (CPF/CNPJ) and status. responses: '200': $ref: '#/components/responses/CobsVConsultadasResponse' '400': $ref: '#/components/responses/RequisicaoInvalida' '401': $ref: '#/components/responses/AcessoNegado1' '403': $ref: '#/components/responses/AcessoNegado' '404': $ref: '#/components/responses/NaoEncontrado' '405': $ref: '#/components/responses/MetodoInvalido' '500': $ref: '#/components/responses/ServicoIndisponivel1' '503': $ref: '#/components/responses/ServicoIndisponivel' components: securitySchemes: cobVWriteSample: type: oauth2 flows: clientCredentials: tokenUrl: /authenticationservices/v3/oauth/token scopes: cobv.write: Authenticates to update collection with due date cobVReadSample: type: oauth2 flows: clientCredentials: tokenUrl: /authenticationservices/v3/oauth/token scopes: cobv.read: Authenticates to retrieve collection item with due date examples: cobBody1: summary: 'Example of creating a QR code collection #1' value: calendario: dataDeVencimento: '2020-12-31' validadeAposVencimento: 30 loc: id: 789 devedor: logradouro: Alameda Souza, Numero 80, Bairro Braz cidade: Recife uf: PE cep: '70011750' cpf: '12345678909' nome: Francisco da Silva valor: original: '123.45' multa: modalidade: '2' valorPerc: '15.00' juros: modalidade: '2' valorPerc: '2.00' desconto: modalidade: '1' descontoDataFixa: - data: '2020-11-30' valorPerc: '30.00' chave: 5f84a4c5-c5cb-4599-9f13-7eb4d419dacc solicitacaoPagador: Cobrança dos serviços prestados. cobBody7: summary: 'Collection Review Example #1' value: loc: id: 789 devedor: logradouro: Alameda Souza, Numero 80, Bairro Braz cidade: Recife uf: PE cep: '70011750' cpf: '12345678909' nome: Francisco da Silva valor: original: '123.45' solicitacaoPagador: Cobrança dos serviços prestados. cobBody5: summary: 'Collection Review Example #3' value: status: REMOVIDA_PELO_USUARIO_RECEBEDOR cobBody4: summary: 'Collection Review Example #2' value: valor: original: '567.89' solicitacaoPagador: Informar cartão fidelidade OperacaoInvalidaCobVExample1: summary: 'Request Error Example #1' value: type: https://pix.bcb.gov.br/api/v2/error/CobVOperacaoInvalida title: Operação inválida. status: 400 detail: >- Cobrança não encontra-se mais com o status ATIVA, somente cobranças ativas podem ser revisadas. cobResponse4: summary: 'Example of collection due #1' value: calendario: criacao: '2020-09-09T20:15:00.358Z' dataDeVencimento: '2020-12-31' validadeAposVencimento: 30 txid: 7978c0c97ea847e78e8849634473c1f1 revisao: 0 loc: id: 789 location: pix.example.com/qr/c2/cobv/9d36b84fc70b478fb95c12729b90ca25 tipoCob: cobv status: ATIVA devedor: logradouro: Alameda Souza, Numero 80, Bairro Braz cidade: Recife uf: PE cep: '70011750' cpf: '12345678909' nome: Francisco da Silva recebedor: logradouro: Rua 15 Numero 1200, Bairro São Luiz cidade: São Paulo uf: SP cep: '70800100' cnpj: '56989000019533' nome: Empresa de Logística SA valor: original: '123.45' chave: 5f84a4c5-c5cb-4599-9f13-7eb4d419dacc solicitacaoPagador: Cobrança dos serviços prestados. RequisicaoInvalidaCobExample1: summary: 'Example Request Error #1' value: type: https://pix.bcb.gov.br/api/v2/error/CobOperacaoInvalida title: Cobrança inválida. status: 400 detail: >- A requisição que busca alterar ou criar uma cobrança para pagamento imediato não respeita o _schema_ ou está semanticamente errada. violacoes: - razao: O campo cob.valor.original não respeita o _schema_. propriedade: cob.valor.original AcessoNegadoExample1: summary: Example Request 1 Error value: type: https://pix.bcb.gov.br/api/v2/error/AcessoNegado title: Acesso Negado status: 403 detail: >- Requisição de participante autenticado que viola alguma regra de autorização. AcessoNegadoExample2: summary: Example Request 1 Error value: type: https://pix.bcb.gov.br/api/v2/error/AcessoNegado title: Acesso Negado status: 401 detail: >- Requisição de participante autenticado que viola alguma regra de autorização. MetodoInvalidoExample1: summary: Request sent with invalid method value: type: https://pix.bcb.gov.br/api/v2/error/Metodoinvalido title: Metodo invalido status: 405 detail: Requisição enviada com metodo invalido MidiaInvalidaExample1: summary: Request sent with unsupported media value: type: https://pix.bcb.gov.br/api/v2/error/midianaosuportada title: Midia invalida status: 415 detail: Requisição enviada com midia não suportada violacoes: - razao: Midia não suportada NaoEncontradoExample1: summary: Example Request 1 Error value: type: https://pix.bcb.gov.br/api/v2/error/NaoEncontrado title: Não Encontrado status: 404 detail: Entidade não encontrada. getCobsV1: summary: Example of the return of the due date collection query 1 value: parametros: inicio: '2020-04-01T00:00:00Z' fim: '2020-04-01T23:59:59Z' paginacao: paginaAtual: 0 itensPorPagina: 100 quantidadeDePaginas: 1 quantidadeTotalDeItens: 1 cobs: - calendario: criacao: '2020-09-09T20:15:00.358Z' dataDeVencimento: '2020-12-31' validadeAposVencimento: 30 txid: 7978c0c97ea847e78e8849634473c1f1 revisao: 0 loc: id: 789 location: pix.example.com/qr/c2/cobv/9d36b84fc70b478fb95c12729b90ca25 tipoCob: cobv status: ATIVA devedor: logradouro: Alameda Souza, Numero 80, Bairro Braz cidade: Recife uf: PE cep: '70011750' cpf: '12345678909' nome: Francisco da Silva recebedor: logradouro: Rua 15 Numero 1200, Bairro São Luiz cidade: São Paulo uf: SP cep: '70800100' cnpj: '56989000019533' nome: Empresa de Logística SA valor: original: '123.45' chave: 5f84a4c5-c5cb-4599-9f13-7eb4d419dacc solicitacaoPagador: Cobrança dos serviços prestados. ServicoIndisponivelExample1: summary: Example Request 1 Error value: type: https://pix.bcb.gov.br/api/v2/error/ServicoIndisponivel title: Serviço Indisponível status: 503 detail: >- Serviço não está disponível no momento. Serviço solicitado pode estar em manutenção ou fora da janela de funcionamento. ServicoIndisponivelExample2: summary: Example Request 1 Error value: type: https://pix.bcb.gov.br/api/v2/error/ServicoIndisponivel title: Serviço Indisponível status: 500 detail: >- Serviço não está disponível no momento. Serviço solicitado pode estar em manutenção ou fora da janela de funcionamento. requestBodies: CobVBody: description: Data for generating the collection item with due date. required: true content: application/json: schema: $ref: '#/components/schemas/CobVSolicitada' examples: exemplo1: $ref: '#/components/examples/cobBody1' CobVBodyRevisada: description: Data for updating the collection item. required: true content: application/json: schema: $ref: '#/components/schemas/CobVRevisada' examples: exemplo1: $ref: '#/components/examples/cobBody7' exemplo2: $ref: '#/components/examples/cobBody4' exemplo3: $ref: '#/components/examples/cobBody5' responses: CobVGeradaCreateResponse: description: Collection item with due date created content: application/json: schema: $ref: '#/components/schemas/CobVGerada' examples: retorno1: $ref: '#/components/examples/cobResponse4' CobVGeradaUpdateResponse: description: Collection item with due date updated content: application/json: schema: $ref: '#/components/schemas/CobVGerada' examples: retorno1: $ref: '#/components/examples/cobResponse4' RequisicaoInvalida: description: Request with invalid format. content: application/problem+json: schema: $ref: '#/components/schemas/Problema' examples: exemplo1: $ref: '#/components/examples/RequisicaoInvalidaCobExample1' NaoEncontrado: description: Requested resource not found. content: application/problem+json: schema: $ref: '#/components/schemas/Problema' examples: exemplo1: $ref: '#/components/examples/NaoEncontradoExample1' AcessoNegado: description: Authenticated participant request that violates some authorization rule. content: application/problem+json: schema: $ref: '#/components/schemas/Problema' examples: exemplo1: $ref: '#/components/examples/AcessoNegadoExample1' AcessoNegado1: description: Authenticated participant request that violates some authorization rule. content: application/problem+json: schema: $ref: '#/components/schemas/Problema' examples: exemplo1: $ref: '#/components/examples/AcessoNegadoExample2' MetodoInvalido: description: Request sent with invalid method content: application/problem+json: schema: $ref: '#/components/schemas/Problema' examples: exemplo1: $ref: '#/components/examples/MetodoInvalidoExample1' ServicoIndisponivel: description: >- Service is not currently available. Requested service may be under maintenance or out of working window. content: application/problem+json: schema: $ref: '#/components/schemas/Problema' examples: exemplo1: $ref: '#/components/examples/ServicoIndisponivelExample1' ServicoIndisponivel1: description: >- Service is not currently available. Requested service may be under maintenance or out of working window. content: application/problem+json: schema: $ref: '#/components/schemas/Problema' examples: exemplo1: $ref: '#/components/examples/ServicoIndisponivelExample2' MidiaInvalida: description: Request sent with unsupported media content: application/problem+json: schema: $ref: '#/components/schemas/Problema' examples: exemplo1: $ref: '#/components/examples/MidiaInvalidaExample1' CobsVConsultadasResponse: description: Immediate collection data content: application/json: schema: $ref: '#/components/schemas/CobsVConsultadas' examples: getCobs1: $ref: '#/components/examples/getCobsV1' CobVCompletaResponse: description: Immediate collection data with due date. content: application/json: schema: $ref: '#/components/schemas/CobVCompleta' examples: retorno1: $ref: '#/components/examples/cobResponse4' schemas: PayloadLocationId: type: integer format: int64 title: Id da location description: Identifier of the location to be informed when creating the collection. CobBase: type: object title: Cobrança Base description: Attributes common to all collection entities properties: chave: type: string title: Chave DICT do recebedor description: >- PIX Alias - Determines the alias registered in DICT, which will be used for the collection. This alias will be submitted by the payer’s PSP applications to DICT, which will return the translated information that will identify the collection creditor. *The aliases can be of the following types: phone number, e-mail address, taxpayer ID (CPF/CNPJ) or EVP.* The aliases formats can be found in [Standards Manual for starting Pix](https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos). maxLength: 77 solicitacaoPagador: type: string title: Solicitação ao pagador description: >- This optional field determines a text to be presented to the payer so that he can enter related information, in free format, to be sent to the recipient. This text will be filled, in pacs.008, by the payer's PSP, in the RemittanceInformation field. The length of the field in pacs.008 is limited to 140 characters. maxLength: 140 infoAdicionais: type: array title: Informações adicionais description: >- Each respective additional information contained in the list (name and amount) must be presented to the payer. maximum: 50 items: type: object required: - nome - valor properties: nome: type: string title: Nome description: Field name. maxLength: 50 valor: type: string title: Valor description: Field data. maxLength: 200 CobBaseCopiaCola: type: object title: Cobrança Base com Copia e Cola description: >- Attributes common to all collection entities that have Copy and Paste information allOf: - type: object properties: pixCopiaECola: type: string title: Pix Copia e Cola correspondente à cobrança. description: >- This field returns the QR code string representation for a copy & paste operation. maxLength: 512 - $ref: '#/components/schemas/CobBase' CobVSolicitada: type: object title: Cobrança com vencimento solicitada description: Data sent to create or update the collection with due date via API required: - valor - chave - devedor - calendario allOf: - type: object properties: calendario: title: Calendário description: >- Fields nested under the calendar identifier organize information regarding collection-related dates. allOf: - $ref: '#/components/schemas/CobDataDeVencimento' - $ref: '#/components/schemas/DadosDevedor' - type: object properties: loc: allOf: - $ref: '#/components/schemas/PayloadLocationCob' - type: object properties: valor: allOf: - required: - original - $ref: '#/components/schemas/CobVValor' - $ref: '#/components/schemas/CobBase' CobVRevisada: type: object title: Cobrança com vencimento revisada description: Data sent for review of the collection item with due date via API allOf: - type: object properties: calendario: title: Calendário description: >- Fields nested under the calendar identifier organize information regarding collection-related dates. allOf: - $ref: '#/components/schemas/CobDataDeVencimento' - $ref: '#/components/schemas/DadosDevedor' - type: object properties: loc: allOf: - $ref: '#/components/schemas/PayloadLocationCob' - type: object properties: status: type: string title: Status do registro da cobrança enum: - REMOVIDA_PELO_USUARIO_RECEBEDOR - type: object properties: valor: $ref: '#/components/schemas/CobVValor' - $ref: '#/components/schemas/CobBase' TxId: type: string title: Id da Transação description: >- Field `txid` determines the transaction identifier for reconciliation purposes. In pacs.008 it is referenced as `TransactionIdentification ` or `idConciliacaoRecebedor`. The txid is retrieved by the payer’s PSP application and, after the payment is confirmed, it is sent to SPI via pacs.008. A pacs.008 is also sent to the receiver’s PSP, containing the txid in addition to all the usual payment information. Upon receiving the payment with txid, the receiver's PSP may inform the creditor to reconcile. The contents of this field are provided exclusively by the collector, who is the ultimate responsible for them. The txid should be unique by collector’s CPF/CNPJ. The receiving PSP is responsible for validating this rule in the API. pattern: '[a-zA-Z0-9]{26,35}' CNPJ: type: string title: número de identificação fiscal description: | # Tax identification identifier Field `taxid` determines the tax identification number. pattern: ^[0-9]{14}$ EndToEndId: type: string title: Id fim a fim da transação description: EndToEndIdentification that carries over PACS002, PACS004 and PACS008 pattern: '[a-zA-Z0-9]{32}' minLength: 32 maxLength: 32 DevolucaoId: type: string title: Id da Devolução description: Location ID to be informed in the collection item creation. pattern: '[a-zA-Z0-9]{1,35}' DevolucaoNatureza: type: string title: Natureza da Devolução description: > Indicates the nature of the return. A return can be related to a regular Pix, or to a Withdrawal/Change Pix. In the absence of this field the nature must be interpreted as being of a common Pix (ORIGINAL). Natures are defined as follows: - `ORIGINAL`: when the return refers to a common Pix or the purchase amount in a Pix Troca; - `RETIRADA`: when the return refers to a Cash Out Pix or the amount of change in a Pix Change. - `MED_OPERACIONAL`: when the return occurs within the MED due to operational failure and refers to a common Pix (`BE08`); - `MED_FRAUDE`: when the return occurs within the MED on grounds of suspected fraud and refers to a common Pix (`FR01`). enum: - ORIGINAL - RETIRADA - MED_OPERACIONAL - MED_FRAUDE Revisao: type: integer format: int32 title: Revisão description: >- Denotes the collection review version. Always starts at zero. Always increments 1. This should increase whenever a collection item is updated. The `loc` field change is not considered an update and therefore does not trigger an increment to the version number. The `loc` field does not change the collection itself. It is not necessary to store the history of changes in the `loc` field for a given collection. For the other fields of the collection, history is recorded. PessoaFisica: type: object required: - cpf - nome title: Pessoa Física properties: cpf: type: string title: CPF pattern: /^\d{11}$/ description: User's CPF. nome: type: string title: Nome description: Username. maxLength: 200 PessoaJuridica: type: object required: - cnpj - nome title: Pessoa Jurídica properties: cnpj: type: string title: CNPJ pattern: /^\d{14}$/ description: User's CNPJ. nome: type: string title: Nome description: User's Nome. maxLength: 200 DadosComplementaresPessoa: type: object properties: logradouro: type: string title: Logradouro description: User address. maxLength: 200 cidade: type: string title: Cidade description: User city. maxLength: 200 uf: type: string title: UF description: UF of the user. maxLength: 2 cep: type: string title: CEP description: User zip code. maxLength: 8 DadosDevedor: type: object properties: devedor: description: The debtor object organizes information about the collection debtor. oneOf: - $ref: '#/components/schemas/PessoaFisica' - $ref: '#/components/schemas/PessoaJuridica' allOf: - type: object properties: email: type: string title: Email description: User email. - $ref: '#/components/schemas/DadosComplementaresPessoa' DadosRecebedor: type: object required: - logradouro - cidade - uf - cep properties: recebedor: description: >- The receiving object organizes the information about the creditor of the collection. oneOf: - $ref: '#/components/schemas/PessoaFisica' - type: object allOf: - $ref: '#/components/schemas/PessoaJuridica' - type: object properties: nomeFantasia: type: string title: Nome fantasia description: Fantasy name. maxLength: 200 allOf: - required: - logradouro - cidade - uf - cep - $ref: '#/components/schemas/DadosComplementaresPessoa' CobDataDeVencimento: type: object title: Data de Vencimento required: - dataDeVencimento properties: dataDeVencimento: type: string format: date title: Data de vencimento da cobrança description: >- This is a date, in the format `YYYY-MM-DD`, as per ISO 8601. It is the collection due date. The collection can be paid with no late payment penalty or interest up to this date, at any time of the day. example: '2020-04-01' validadeAposVencimento: type: integer format: int32 title: Validade após vencimento description: >2- It is the number of calendar days after calendario.dateDeVencimento, in which the collection can be technically paid (with or without late payment penalties or interest). Whenever the due date falls on a weekend or a holiday for the paying user, it must be automatically extended to the first subsequent business day. all fields that make reference to this date (`PostExpiration validity`; `discount`; `interest` and `fine`) must assume this extension, when applicable. To illustrate how it works, here are some examples, where: - ``(#)`` represents the due date; - ``(*)`` represents the date adjusted in terms of non-working days; - the ``()`` correspond to the additional days of validity for the payment. Exemplo A: ```txt Expiration Date: 2020-10-20, Tuesday. validityAfter Expiration: 4 Trying to pay on the day 2020-10-20, Tuesday: accepted. (#)(*) Trying to pay on the day 2020-10-21, Wednesday: accepted. (1) Trying to pay on 2020-10-22, Thursday: accepted. (two) Trying to pay on the day 2020-10-23, Friday: accepted. (3) Attempts to pay on 2020-10-24, Saturday: accepted. Attempts to pay on the day 2020-10-25, Sunday: accepted. (Holiday) Trying to pay on 2020-10-26, Monday: accepted. (4) Trying to pay on 2020-10-27, Tuesday: denied. ``` Exemplo B: ```txt Expiration Date: 2020-12-25, Friday, holiday. validityAfterExpiration: 0 Attempts to pay on the day 2020-12-25, Friday: accepted. (#)(Holiday) Attempts to pay on 2020-12-26, Saturday: accepted. Attempts to pay on 2020-12-27, Sunday: accepted. Trying to pay on the day 2020-12-28, Monday: accepted. (*) Trying to pay on 2020-12-29, Tuesday: denied. ``` Exemplo C: ```txt Expiration Date: 2020-12-25, Friday, holiday. validityAfter Expiration: 1 Attempts to pay on the day 2020-12-25, Friday: accepted. (#)(Holiday) Attempts to pay on 2020-12-26, Saturday: accepted. Attempts to pay on 2020-12-27, Sunday: accepted. Trying to pay on the day 2020-12-28, Monday: accepted. (*) Trying to pay on 2020-12-29, Tuesday: accepted. (1) Trying to pay on the day 2020-12-30, Wednesday: denied. ``` Exemplo D: ```txt Expiration Date: 2020-12-25, Friday, holiday. validityAfter Expiration: 3 Attempts to pay on the day 2020-12-25, Friday: accepted. (#)(Holiday) Attempts to pay on 2020-12-26, Saturday: accepted. Attempts to pay on 2020-12-27, Sunday: accepted. Trying to pay on the day 2020-12-28, Monday: accepted. (*) Trying to pay on 2020-12-29, Tuesday: accepted. (1) Attempts to pay on the day 2020-12-30, Wednesday: accepted. (two) Trying to pay on 2020-12-31, Thursday: accepted. (3) Trying to pay on 2021-01-01, Friday: denied. ``` Exemplo E: ```txt Expiration Date: 2020-12-25, Friday, holiday. validityAfter Expiration: 4 Attempts to pay on the day 2020-12-25, Friday: accepted. (#)(Holiday) Attempts to pay on 2020-12-26, Saturday: accepted. Attempts to pay on 2020-12-27, Sunday: accepted. Trying to pay on the day 2020-12-28, Monday: accepted. (*) Trying to pay on 2020-12-29, Tuesday: accepted. (1) Attempts to pay on the day 2020-12-30, Wednesday: accepted. (two) Trying to pay on 2020-12-31, Thursday: accepted. (3) Trying to pay on 2021-01-01, Friday: accepted. (Holiday) Attempts to pay on 2021-01-02, Saturday: accepted. Attempts to pay on 2021-01-03, Sunday: accepted. Trying to pay on 2021-01-04, Monday: accepted. (4) Trying to pay on 2021-01-05, Tuesday: denied. ``` Exemplo F: ```txt Expiration Date: 2021-08-27, Friday. validityAfter Expiration: 5 Trying to pay on the day 2020-08-27, Friday: accepted. (#)(*) Attempts to pay on the day 2020-08-28, Saturday: accepted. (1) Attempts to pay on the day 2020-08-29, Sunday: accepted. (two) Trying to pay on the day 2020-08-30, Monday: accepted. (3) Trying to pay on 2020-12-31, Tuesday: accepted. (4) Attempts to pay on the day 2020-12-01, Wednesday: accepted. (5) Trying to pay on 2020-12-02, Thursday: denied. ``` Exemplo G: ```txt Expiration Date: 2021-08-28, Saturday. validityAfter Expiration: 5 Attempts to pay on the day 2020-08-28, Saturday: accepted. (#) Attempts to pay on the day 2020-08-29, Sunday: accepted. Trying to pay on the day 2020-08-30, Monday: accepted. (*) Trying to pay on the day 2020-08-31, Tuesday: accepted. (1) Trying to pay on the day 2020-09-01, Wednesday: accepted. (two) Trying to pay on 2020-09-02, Thursday: accepted. (3) Trying to pay on the day 2020-09-03, Friday: accepted. (4) Trying to pay on the day 2020-09-04, Saturday: accepted. Trying to pay on the day 2020-09-05, Sunday: accepted. Trying to pay on the day 2020-09-06, Monday: accepted. (5) ``` default: 30 CobCriacao: type: object title: Criação required: - criacao properties: criacao: type: string format: date-time title: Data de Criação description: >- Timestamp that indicates when the collection item was created. Complies with the format defined in RFC 3339. CobVValor: type: object title: Valor da cobrança com vencimento description: Collection amount. properties: original: type: string title: Valor pattern: \d{1,10}\.\d{2} description: Valor original da cobrança. multa: type: object required: - modalidade - valorPerc title: Multa aplicada description: Penalty applied to collection properties: modalidade: type: integer format: int32 title: Modalidade da multa minimum: 1 maximum: 2 description: >-
DescriptionDomain
Value Fixo1
percentage2
valorPerc: type: string title: Valor da multa absoluta description: >- Penalty in absolute or percentage amount, according to "amount.fine.modality". pattern: \d{1,10}\.\d{2} juros: type: object required: - modalidade - valorPerc title: Juro aplicado description: Interest applied to collection properties: modalidade: type: integer format: int32 minimum: 1 maximum: 8 title: Modalidade de juros description: >- Interest rate, according to the domain table.
DescriptionDomain
Value (calendar days)1
Percentage per day (calendar days)2
Percentage per month (calendar days)3
Percentage per year (calendar days)4
Value (working days)5
Percentage per day (working days)6
Percentage per month (working days)7
Percentage per year (working days)8
valorPerc: type: string title: Valor pattern: \d{1,10}\.\d{2} abatimento: title: Abatimento aplicado required: - modalidade - valorPerc description: Deduction applied to collection properties: modalidade: type: integer format: int32 minimum: 1 maximum: 2 title: Modalidade de abatimentos description: >- Deduction modality, according to the table of Domains.
DescriptionDomain
Fixed Value1
Percentage2
valorPerc: type: string title: Abatimentos description: >- Deductions applied to the collection, in absolute value or as a percentage of the original value of the collection. pattern: \d{1,10}\.\d{2} desconto: title: Descontos aplicados required: - modalidade description: Discounts applied to collection allOf: - type: object properties: modalidade: type: integer format: int32 minimum: 1 maximum: 6 title: Modalidade de descontos description: >- Discount modality, according to the domain table.
DescriptionDomain
Fixed Value until[s] informed date[s]1
Percentage until the date informed2
Amount in advance day corrido3
Amount in advance business day4
Percentage in calendar day advance5
Percentage in business day advance6
oneOf: - type: object properties: descontoDataFixa: title: Lista de Descontos description: Absolute discounts applied to the collection. type: array minItems: 1 maxItems: 3 uniqueItems: true items: required: - data - valorPerc allOf: - properties: data: title: Data limite para o desconto absoluto da cobrança description: >- Discounts for prepayment, with a fixed date. Matrix with up to three elements, each element consisting of a pair "date and value Perc", to establish percentage or absolute discounts, up to that payment date. This is a date, in the format `YYYY-MM-DD`, according to ISO 8601. The discount date must be earlier than the collection due date. type: string format: date example: '2020-04-01' - properties: valorPerc: type: string title: Valor do desconto absoluto description: >- Discount in absolute amount or percentage per day, business or consecutive, according to value.discount.modality pattern: \d{1,10}\.\d{2} - type: object required: - valorPerc properties: valorPerc: type: string title: Abatimentos description: >- Deductions applied to the collection, in absolute value or as a percentage of the original value of the collection. pattern: \d{1,10}\.\d{2} CobVGerada: type: object title: Cobrança com vencimento gerada description: Collection item with due date created or updated via API required: - location - txid - devedor - calendario - revisao - status - valor - chave - recebedor allOf: - type: object properties: calendario: required: - validadeAposVencimento title: Calendário description: >- The fields nested under the calendar identifier organize information regarding collection-related dates. allOf: - $ref: '#/components/schemas/CobCriacao' - $ref: '#/components/schemas/CobDataDeVencimento' txid: $ref: '#/components/schemas/TxId' revisao: $ref: '#/components/schemas/Revisao' - $ref: '#/components/schemas/DadosRecebedor' - type: object properties: loc: required: - id - txid - tipoCob - criacao allOf: - $ref: '#/components/schemas/PayloadLocation' - type: object properties: status: $ref: '#/components/schemas/CobrancaStatus' - type: object properties: valor: required: - original allOf: - $ref: '#/components/schemas/CobVValor' - $ref: '#/components/schemas/CobBaseCopiaCola' CobrancaStatus: type: string title: Status do registro da cobrança. description: >2- Collection registration status. Not to be confused with its payment status, like paid, overdue, expired, for instance. The statuses are defined in this way: - `ATIVA`: indicates that the collection item was generated and is active (not yet been paid or removed); - `CONCLUIDA`: indicates that the collection item is no longer active and therefore will not accept further payments; - `REMOVIDO_PELO_USUARIO_RECEBEDOR`: indicates that the collection item was removed by the creditor; and - `REMOVIDO_PELO_PSP`: indicates that the collection item was removed by the PSP. enum: - ATIVA - CONCLUIDA - REMOVIDA_PELO_USUARIO_RECEBEDOR - REMOVIDA_PELO_PSP CobVCompleta: title: Cobrança com vencimento completa required: - status allOf: - $ref: '#/components/schemas/CobVSolicitada' - $ref: '#/components/schemas/CobVGerada' - type: object properties: pix: type: array title: Pix recebidos items: allOf: - $ref: '#/components/schemas/Pix' - type: object properties: txid: allOf: - $ref: '#/components/schemas/TxId' - pattern: '[a-zA-Z0-9]{26,35}' - type: object properties: status: $ref: '#/components/schemas/CobrancaStatus' PayloadLocation: type: object title: Location do Payload description: Payload location identifier. required: - id - location - tipoCob - criacao properties: id: $ref: '#/components/schemas/PayloadLocationId' location: type: string title: Localização do payload description: Payload location to be provided when creating the collection item. maxLength: 77 format: uri example: pix.example.com/qr/v2/2353c790eefb11eaadc10242ac120002 tipoCob: type: string title: Tipo da cobrança enum: - cob - cobv criacao: type: string format: date-time title: Data de Criação description: Payload location creation Date and time. Complies with RFC 3339. PayloadLocationCob: type: object title: Location do Payload required: - id - tipoCob description: Identifier of the payload location. properties: id: $ref: '#/components/schemas/PayloadLocationId' ParametrosConsultaCob: type: object title: Parâmetros de Consulta de Cobrança description: '[DEPRECATED] Parameters used to carry out collection items query.' required: - inicio - fim - paginacao properties: inicio: type: string format: date-time title: Data de Início description: Starting date used in the query. Complies with RFC 3339. example: '2020-04-01T00:00:00Z' fim: type: string format: date-time title: Data de Fim description: End date used in the query. Complies with RFC 3339. example: '2020-04-01T17:00:00Z' cpf: type: string title: CPF pattern: /^\d{11}$/ description: >- Filter by the CPF of the debtor. It cannot be used at the same time as the CNPJ. cnpj: type: string title: CNPJ pattern: /^\d{14}$/ description: >- Filter by the debtor's CNPJ. It cannot be used at the same time as the CPF. locationPresente: type: boolean description: Filter by the existence of linked location. status: type: string title: Status do registro da cobrança description: Filter by collection status. paginacao: $ref: '#/components/schemas/Paginacao' CobsVConsultadas: type: object title: Cobranças com vencimento consultadas required: - parametros - cobs properties: parametros: $ref: '#/components/schemas/ParametrosConsultaCob' cobs: type: array title: Lista de cobranças items: allOf: - $ref: '#/components/schemas/CobVCompleta' - required: - status - txid - idCob Pix: type: object title: Pix required: - endToEndId - valor - horario - pagador properties: endToEndId: $ref: '#/components/schemas/EndToEndId' txid: allOf: - $ref: '#/components/schemas/TxId' - pattern: '[a-zA-Z0-9]{1,35}' valor: type: string title: Valor do Pix. pattern: \d{1,10}\.\d{2} description: Valor do Pix. componentesValor: type: object title: Informações sobre o valor do Pix description: >- The purpose of this framework is to explain the elements that make up the Pix amount, including information on fines, interest, discounts, and deductions when Pix is related to overdue collections. Structure rules: - Pix `value` is equal to: - (`original.amount` + `withdrawal.amount` + `change.amount`) + `fine.amount` + `interest.amount` – `rebate.amount` – `discount.amount` considering only the fields that are present for each type of paid collection. - The `withdrawal` and `change` structures will only be returned when the Pix is relative to a Cashout Pix or Change Pix, respectively, and the other structures (`interest`, `fine`, `rebate` and `discount`) will only be relevant to the Pix of payments of collections due. - There cannot be simultaneously a substructure of type `withdrawal` and another of type `change`; - There is no restriction on the order of substructures. In the case of a Pix Withdraw, you can return `original` with value=0.00 (zero) since the sum will be respected, or you can omit the original substructure. In the case of a Pix Swap or a collection payment due date, the `original` substructure will always be gift. #### Valid examples: Example of valid fills. - **Pix para pagamento de cobrança imediata (sem saque ou troco).** ``` ... "componentsValue": { "original": { "value": "100.00" } } ... ``` - **Pix Saque.** ``` ... "componentsValue": { "withdraw": { "value": "100.00", "agent modality": "AGPSS", "Withdrawal Service Provider": "12345678" } } ... ``` - **Pix para pagamento de cobrança imediata com saque (pode vir original.valor=0.00).** ``` ... "componentsValue": { "original": { "value": "0.00" }, "withdraw": { "value": "100.00", "agent modality": "AGPSS", "Withdrawal Service Provider": "12345678" } } ... ``` - **Pix Troco.** ``` ... "componentsValue": { "original": { "value": "80.00" }, "Thing": { "value": "20.00", "agent modality": "AGTEC", "Withdrawal Service Provider": "12345678" } } ... ``` - **Pix para pagamento de cobrança imediata com troco (ordem não importa).** ``` ... "componentsValue": { "Thing": { "value": "20.00", "agent modality": "AGTEC", "Withdrawal Service Provider": "12345678" }, "original": { "value": "80.00" } } ... ``` - **Pix para pagamento de cobrança com vencimento de R$100,00 considerando-se um atraso de 2 dias a uma multa de 3% e juros de 1% ao dia. O valor do Pix será R$105,00.** ``` ... "componentsValue": { "original": { "value": "100.00" }, "traffic ticket": { "value": "3.00" }, "fees": { "value": "2.00" } } ... ``` #### Invalid examples: Non-exhaustive examples of invalid fills. - **`original.valor maior que 0.00 (zero) e saque juntos** ``` ... "componentsValue": { "original": { "value": "80.00" }, "withdraw": { "value": "20.00", "agent modality": "AGPSS", "Withdrawal Service Provider": "12345678" } } ... ``` - **dois elementos de saque** ``` ... "componentsValue": [ "withdraw": { "value": "20.00", "agent modality": "AGPSS", "Withdrawal Service Provider": "12345678" }, "withdraw": { "value": "10.00", "agent modality": "AGPSS", "Withdrawal Service Provider": "12345678" } ] ... ``` - **saque e troco simultaneamente** ``` ... "componentsValue": { "original": { "value": "60.00" }, "withdraw": { "value": "20.00", "agent modality": "AGPSS", "Withdrawal Service Provider": "12345678" }, "Thing": { "value": "20.00", "agent modality": "AGTEC", "Withdrawal Service Provider": "12345678" } } ... ``` anyOf: - $ref: '#/components/schemas/PixValorOriginal' - $ref: '#/components/schemas/PixValorSaque' - $ref: '#/components/schemas/PixValorTroco' - $ref: '#/components/schemas/PixValorJuros' - $ref: '#/components/schemas/PixValorMulta' - $ref: '#/components/schemas/PixValorAbatimento' - $ref: '#/components/schemas/PixValorDesconto' chave: type: string title: Chave DICT do recebedor description: > # Creditor DICT alias * Creditor alias field as assigned in the respective PACS008. * Aliases types can be: phone, email, cpf/cnpj or EVP. * The format of the aliases can be found in the section "Formatting DICT aliases in BR Code" of the [Pix Initiation Standards Manual](https://www.bcb.gov.br/estabilidadefinanceira/pix). maxLength: 77 horario: type: string format: date-time title: Horário description: Time the Pix was processed on the PSP. infoPagador: type: string title: Informação livre do pagador maxLength: 140 devolucoes: type: array title: Devoluções items: $ref: '#/components/schemas/Devolucao' PixValorOriginal: type: object properties: original: type: object required: - valor properties: valor: type: string title: Valor original description: Original Pix value. pattern: \d{1,10}\.\d{2} PixValorSaque: type: object properties: saque: type: object required: - valor - modalidadeAgente - prestadorDoServicoDeSaque properties: valor: type: string title: Valor do Saque Pix description: Pix Withdrawal Value Pix pattern: \d{1,10}\.\d{2} modalidadeAgente: type: string title: AgentModalidade do Agente description: > ##### Agent Type
ACRONYMDescription
AGTECBusiness Establishment Agent
AGTOTOther Type of Legal Entity Agent
AGPSSAgent Withdrawal Service Provider< /td>
enum: - AGTEC - AGTOT - AGPSS prestadorDoServicoDeSaque: type: string title: Facilitador de Serviço de Saque pattern: \d{8} description: Withdrawal Service Provider ISPB PixValorTroco: type: object properties: troco: type: object required: - valor - modalidadeAgente - prestadorDoServicoDeSaque properties: valor: type: string title: Valor do Troco Pix description: Amount of Change Pix. pattern: \d{1,10}\.\d{2} modalidadeAgente: type: string title: Modalidade do Agente description: > ##### Agent Type
ACRONYMDescription
AGTECBusiness Establishment Agent
AGTOTOther Type of Legal Entity Agent
enum: - AGTEC - AGTOT prestadorDoServicoDeSaque: type: string title: Facilitador de Serviço de Saque pattern: \d{8} description: Withdrawal Service Provider ISPB PixValorJuros: type: object properties: juros: type: object required: - valor properties: valor: type: string title: Valor relativo aos juros. description: Interest amount. pattern: \d{1,10}\.\d{2} PixValorMulta: type: object properties: multa: type: object required: - valor properties: valor: type: string title: Valor relativo a multa. description: Fine amount. pattern: \d{1,10}\.\d{2} PixValorDesconto: type: object properties: desconto: type: object required: - valor properties: valor: type: string title: Valor relativo a desconto. description: Discount amount. pattern: \d{1,10}\.\d{2} PixValorAbatimento: type: object properties: abatimento: type: object required: - valor properties: valor: type: string title: Valor relativo a abatimento. description: Rebate amount. pattern: \d{1,10}\.\d{2} Devolucao: type: object title: Devolução required: - id - rtrId - valor - horario - status properties: id: $ref: '#/components/schemas/DevolucaoId' rtrId: type: string title: RtrId description: ReturnIdentification transiting PACS004. example: D12345678202009091000abcde123456 pattern: '[a-zA-Z0-9]{32}' minLength: 32 maxLength: 32 valor: type: string title: Valor a devolver. pattern: \d{1,10}\.\d{2} description: Amount to return. natureza: $ref: '#/components/schemas/DevolucaoNatureza' descricao: type: string title: Mensagem ao pagador relativa à devolução. maxLength: 140 description: >- The optional `description` field determines a text to be displayed to the payer containing information about the payment return. This text will be filled in, in pacs.004, by the recipient's PSP, in the field RemittanceInformation. The field size in pacs.004 is limited to 140 characters. horario: type: object properties: solicitacao: type: string format: date-time title: Horário de solicitação description: Time when the payment return was requested on the PSP. liquidacao: type: string format: date-time title: Horário de liquidacao description: Time the payment return was settled on the PSP. status: type: string title: Status description: Return status. enum: - EM_PROCESSAMENTO - DEVOLVIDO - NAO_REALIZADO motivo: type: string title: Descrição do status. description: > # Payment Return Status Optional field that can be used by the receiving PSP to detail the reasons the return has reached the status in question. It can be used, for example, to detail the reason why the return was not carried out. maxLength: 140 Paginacao: type: object title: Paginação required: - paginaAtual - itensPorPagina - quantidadeDePaginas - quantidadeTotalDeItens properties: paginaAtual: type: integer title: Página atual description: Retrieved page number. minimum: 0 itensPorPagina: type: integer title: Itens por página description: Number of records returned on the page. minimum: 1 quantidadeDePaginas: type: integer title: Quantidade de páginas description: Number of pages available for consultation. minimum: 1 quantidadeTotalDeItens: type: integer title: Quantidade total de itens description: >- Total amount of items available according to the parameters informed. minimum: 0 Violacao: type: object title: Violações properties: razao: type: string title: Descrição do erro description: Error description example: Valor da cobrança não pode ser 0.00 propriedade: type: string title: Nome da propriedade description: Property name example: cob.chave valor: type: string title: Valor da propriedade description: Property Value example: '061996671234' Problema: type: object required: - type - title - status properties: type: type: string format: uri description: Reference URI identifying the type of issue. As per RFC 7807. example: https://pix.bcb.gov.br/api/v2/error/NaoEncontrado title: type: string description: A short description of the problem. example: Not found status: type: integer description: HTTP code of status returned. example: 404 detail: type: string description: Full description of the problem. correlationId: type: string description: Issue correlation identifier for support purposes violacoes: type: array items: $ref: '#/components/schemas/Violacao' Inicio: type: string title: Data de início description: >- Filters records whose creation date is greater than or equal to the start date. Complies with RFC 3339.It should be in ISO_DATE(yyyy-MM-dd'T'HH:mm:ss.SSSZ) format example: '2021-10-01T00:01:54.876Z' Fim: type: string title: Data de fim description: >- Filters records whose creation date is less than or equal to the end date. Complies with RFC 3339.It should be in ISO_DATE(yyyy-MM-dd'T'HH:mm:ss.SSSZ) format example: '2021-10-02T00:01:54.876Z' parameters: ClientId: name: client_id in: query description: >- Unique reference which was shared during CitiConnect API on-boarding(ClientId-which used during oauth token generation) required: true schema: type: string example: 898918181818181aczta TxId: name: txid in: path required: true schema: $ref: '#/components/schemas/TxId' Revisao: name: revisao in: query required: false schema: $ref: '#/components/schemas/Revisao' CNPJQuery: name: cnpj in: query required: false schema: $ref: '#/components/schemas/CNPJ' Inicio: name: inicio in: query required: true schema: $ref: '#/components/schemas/Inicio' Fim: name: fim in: query required: true schema: $ref: '#/components/schemas/Fim' CPF: name: cpf in: query schema: type: string title: CPF pattern: ^[0-9]{11}$ description: >- Filter by the CPF of the debtor. It cannot be used at the same time as the CNPJ. CNPJ: name: cnpj in: query schema: type: string title: CNPJ pattern: ^[0-9]{14}$ description: >- Filter by the debtor's CNPJ. It cannot be used at the same time as the CPF. LocationPresente: name: locationPresente in: query schema: type: boolean Status: name: status in: query schema: type: string title: Status do registro da cobrança description: Filter by collection status. loteCobVId: name: loteCobVId in: query schema: type: integer format: int32 title: Id do lote de cobrança com vencimento description: Due collection batch id. PaginaAtual: in: query name: paginacao.paginaAtual required: false schema: type: integer format: int32 title: Página atual minimum: 0 default: 0 description: >- Page to be returned by the query. If not informed, the PSP will assume it will be 0. ItensPorPagina: in: query name: paginacao.itensPorPagina required: false schema: type: integer format: int32 title: Itens por Página minimum: 1 maximum: 1000 default: 100 description: >- Maximum number of records returned on each page. Only the last page can contain a smaller amount of records.