# Register receivable Register an account receivable - Brazil only. A receivable represents money expected to be collected from an entity (*debtor*) who has purchased products or services, but has not yet paid for them in full. The *lender*, the person or entity owed the money, can sell this debt to a new *owner*, who may package it as part of another financial instrument, in much the same way a mortgage is sold to become part of a mortgage-backed security. Pismo works with B3 - a large financial market infrastructure provider in Brazil - to register invoices. If creation fails, a credit_rights_registration_failure-1 event is generated. If creation succeeds, a credit_rights_registration_success-1 event is generated # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Banking - Credit receivables", "contact": { "email": "support@pismo.com.br", "name": "API Support", "url": "https://developers.pismo.io/support/" }, "description": "Endpoints to handle contract operations", "license": { "name": "Copyright Pismo", "url": "https://developers.pismo.io/licenses/" }, "termsOfService": "https://developers.pismo.io/terms/", "version": "v1" }, "servers": [ { "url": "https://api-sandbox.pismolabs.io/credit-rights-receivable", "description": "Production server" } ], "tags": [ { "name": "Receivable", "description": "Endpoints to manage receivables" } ], "security": [ { "bearerAuth": [] } ], "components": { "schemas": { "AccessKey": { "type": "string", "description": "Client-generated identifier. This field is used for the [Get invoice](https://developers.pismo.io/pismo-docs/reference/findbyaccesskey) endpoint.", "minLength": 1, "maxLength": 44, "example": "KAB6J8903CNMH01892749JKSNOAXMCA7199382ABCERL" }, "CollateralType": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 1, "description": "Collateral type: \n\n 1 - Aval. In Brazil, the term \"aval collateral\" refers to a specific type of collateral used in financial transactions. \"Aval\" is a Portuguese term that means \"endorsement\" or \"guarantee,\" and it is commonly used in the Brazilian financial system. Aval collateral is a form of guarantee where a third party, known as the \"avalista\" or guarantor, pledges their assets or credit worthiness to secure a loan or financial obligation on behalf of the borrower. The avalista becomes jointly liable for the debt and agrees to fulfill the obligations if the borrower fails to do so. \n", "enum": [ 1 ], "example": 1 }, "ContactNumber": { "type": "string", "description": "Contact number", "maxLength": 15, "minLength": 1, "example": "+14158675309" }, "CorrelationID": { "type": "string", "description": "Correlation ID (CID). This field is used to link related API requests and events. The CID can help the Pismo engineering team track everything related to a call. If one isn't passed, one is automatically generated. You can find the CID in a response header. \n", "example": "88474990237-94940" }, "CreditOperationsArray": { "maxItems": 2147483647, "minItems": 1, "type": "array", "items": { "$ref": "#/components/schemas/CreditOperation" } }, "CreateReceivableRequest": { "type": "object", "required": [ "credit_rights_receivable_type", "debtor_document_number", "debtor_name", "face_value", "holding_number", "ibge_code", "internal_number", "invoice_number", "invoice_serie", "invoice_total_value", "issuing_date", "lender_document_number", "lender_name", "maturity_date", "payment_method", "payment_status", "recorder_account" ], "properties": { "credit_rights_receivable_type": { "$ref": "#/components/schemas/CreditRightsReceivableType" }, "debtor_name": { "$ref": "#/components/schemas/DebtorName" }, "debtor_document_number": { "$ref": "#/components/schemas/DebtorDocumentNumber" }, "face_value": { "$ref": "#/components/schemas/FaceValue" }, "holding_number": { "$ref": "#/components/schemas/HoldingNumber" }, "ibge_code": { "$ref": "#/components/schemas/IbgeCode" }, "internal_number": { "$ref": "#/components/schemas/InternalNumber" }, "invoice_number": { "$ref": "#/components/schemas/InvoiceNumber" }, "invoice_serie": { "$ref": "#/components/schemas/InvoiceSerie" }, "invoice_total_value": { "$ref": "#/components/schemas/InvoiceTotalValue" }, "issuing_date": { "$ref": "#/components/schemas/IssuingDate" }, "lender_name": { "$ref": "#/components/schemas/LenderName" }, "lender_document_number": { "$ref": "#/components/schemas/LenderDocumentNumber" }, "maturity_date": { "$ref": "#/components/schemas/MaturityDate" }, "payment_method": { "$ref": "#/components/schemas/PaymentMethod" }, "payment_status": { "$ref": "#/components/schemas/PaymentStatus" }, "recorder_account": { "$ref": "#/components/schemas/RecorderAccount" }, "access_key": { "$ref": "#/components/schemas/AccessKey" }, "collateral_type": { "$ref": "#/components/schemas/CollateralType" }, "credit_operations": { "$ref": "#/components/schemas/CreditOperationsArray" }, "debtor_signing_date": { "$ref": "#/components/schemas/DebtorSigningDate" }, "description": { "$ref": "#/components/schemas/Description" }, "guarantor_name": { "$ref": "#/components/schemas/GuarantorName" }, "lender_signing_date": { "$ref": "#/components/schemas/LenderSigningDate" }, "owner_document_number": { "$ref": "#/components/schemas/OwnerDocumentNumber" }, "owner_name": { "$ref": "#/components/schemas/OwnerName" } } }, "CreateReceivableResponse": { "type": "object", "properties": { "message": { "type": "string", "description": "Credit receivable response message" }, "recorder_account": { "type": "integer", "description": "Recorder account number", "format": "int64" } } }, "CreditRightsReceivableType": { "type": "integer", "maximum": 2, "minimum": 1, "format": "int32", "description": "Credit receivable type:\n\n1 - Mercantile\n2 - Service \n", "enum": [ 1, 2 ] }, "CreditOperation": { "type": "object", "properties": { "contact_number": { "$ref": "#/components/schemas/ContactNumber" }, "guarantee_percentage": { "$ref": "#/components/schemas/GuaranteePercentage" }, "operation_date": { "$ref": "#/components/schemas/OperationDate" }, "operation_maturity": { "$ref": "#/components/schemas/OperationMaturity" }, "operation_type": { "$ref": "#/components/schemas/OperationType" }, "operation_value": { "$ref": "#/components/schemas/OperationValue" } } }, "DebtorDocumentNumber": { "type": "string", "description": "Debtor document number. A government document number, such as a Social Security number (US) or Cadastro de Pessoas Fisicas number (Brazil). Must not be the same as the lender document number. \n", "maxLength": 14 }, "DebtorName": { "type": "string", "description": "Debtor name", "maxLength": 100, "minLength": 1, "example": "Bonnie Ann Clyde" }, "DebtorSigningDate": { "type": "string", "description": "Debtor signing date. Format = yyyy-mm-dd", "format": "date", "example": "2023-06-07" }, "Description": { "type": "string", "description": "Receivable description", "maxLength": 500, "example": "Receivable description..." }, "Errors": { "type": "array", "items": { "type": "string" } }, "FaceValue": { "type": "number", "description": "Face value refers to the nominal or stated value of a financial instrument or asset, typically printed or stated on the instrument itself. It represents the initial value assigned to the instrument at the time of issuance or purchase.\n", "example": 499.23 }, "GlobalErrorResponse": { "type": "object", "properties": { "correlationId": { "$ref": "#/components/schemas/CorrelationID" }, "errors": { "$ref": "#/components/schemas/Errors" } } }, "GuarantorName": { "type": "string", "description": "Guarantor name", "minLength": 1, "maxLength": 100, "example": "Lansky Loan" }, "GuaranteePercentage": { "type": "number", "description": "Gurantor percentage", "example": 5 }, "HoldingNumber": { "type": "string", "description": "Holding number - the number of the invoice (min size 1, max size 9) + '.' + the number of installments (min 1 - max 99).\n", "minLength": 3, "maxLength": 12, "example": "1234.8" }, "IbgeCode": { "type": "integer", "format": "int32", "description": "IBGE stands for Instituto Brasileiro de Geografia e Estatística, which translates to the Brazilian Institute of Geography and Statistics. This Brazilian national statistical agency is responsible for collecting and providing official data on various aspects of the country. An IBGE code is a specific numerical code assigned to various administrative divisions and geographical areas in Brazil.\n\nFor this application, the IBGE code identifies the town and **must** have 7 digits (1000000 to 9999999).\n", "minLength": 7, "maxLength": 7, "example": 3304557 }, "InternalNumber": { "type": "string", "description": "Client-assigned internal number.", "minLength": 1, "maxLength": 40, "example": "5eae1070-28cc-4e99-ad45-c380731d5c0a" }, "InvoiceNumber": { "type": "integer", "description": "Invoice number. Generated when receivable is created.", "format": "int64", "minLength": 1, "maxLength": 9, "example": 88 }, "InvoiceSerie": { "type": "integer", "description": "Invoice series number. \"Serie\" is the Portuguese word for \"series\".", "format": "int64", "minLength": 1, "maxLength": 3, "example": 1 }, "InvoiceTotalValue": { "type": "number", "description": "Invoice total value. Can be up to 16 digits and two decimal places.", "maxLength": 19, "example": 5678.99 }, "IssuingDate": { "type": "string", "description": "Issuing date. Must be before or equal to today. Format = yyyy-mm-dd.", "format": "date", "example": "2023-06-07" }, "LenderDocumentNumber": { "type": "string", "description": "Lender document number. A government document number, such as a Social Security number (US) or Cadastro de Pessoas Fisicas number (Brazil). Should not be the same as the debtor document number. \n", "example": "51407165000113" }, "LenderName": { "type": "string", "description": "Lender name", "minLength": 1, "maxLength": 100, "example": "Al Dente" }, "LenderSigningDate": { "type": "string", "description": "Lender signing date. Format = yyyy-mm-dd. Must be before or equal to today.", "format": "date", "example": "2023-06-22" }, "MaturityDate": { "type": "string", "description": "Maturity date. Format = yyyy-mm-dd. Must be equal to today or later.", "example": "2023-06=22" }, "OperationDate": { "type": "string", "description": "Operation date. Format = yyyy-mm-dd.", "format": "date", "example": "2023-06-06" }, "OperationMaturity": { "type": "string", "description": "Operation maturity. Format = yyyy-mm-dd.", "format": "date", "example": "2023-09-08" }, "OperationType": { "type": "string", "description": "Operation type. You need to configure the operation types with Pismo.", "maxLength": 50, "minLength": 1 }, "OperationValue": { "type": "number", "description": "Operation value. Must be positive or zero. Can be up to 16 digits and two decimal places.\n", "example": 234.5 }, "OwnerDocumentNumber": { "type": "string", "description": "Owner document number. A government document number, such as a Social Security number (US) or Cadastro de Pessoas Físicas number (Brazil). \n", "example": "51008931000177" }, "OwnerName": { "type": "string", "description": "Owner name", "minLength": 1, "maxLength": 100, "example": "Biff Wellington" }, "PaymentMethod": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 6, "enum": [ 1, 2, 3, 4, 5, 6 ], "description": "Payment method: \n\n1 - **Boleto**: The Boleto payment method is a popular payment system in Brazil. It is a widely used alternative to traditional credit card payments and bank transfers. Boleto Bancário, commonly referred to as \"Boleto,\" is a payment voucher that allows individuals and businesses to make payments for goods and services.\n\n2 - **TED**: The TED (Transferência Eletrônica Disponível) payment method is a popular electronic funds transfer system in Brazil. It is commonly used for interbank transfers, allowing individuals and businesses to transfer funds between different financial institutions within the country.\n\n3 - **DOC**: The DOC (Documento de Ordem de Crédito) payment method is another electronic funds transfer system in Brazil, similar to TED (Transferência Eletrônica Disponível). DOC is primarily used for interbank transfers but differs from TED in terms of timing, limits, and processing.\n\n4 - **Dinheiro**: \"Dinheiro\" is the Portuguese word for \"money\" or a general term for cash payments. Cash is a widely used payment method in various countries, including Brazil, where the official currency is the Brazilian Real (BRL).\n\n5 - **Título**: \"Titulo\" means title in Portuguese.\n\n6 - **Pix**: The Pix payment method is a new and instant electronic payment system introduced by the Central Bank of Brazil. It was launched in November 2020 and has gained significant popularity in a short period. Pix allows individuals and businesses to make real-time transfers and payments between different financial institutions in Brazil. It operates 24/7, including weekends and holidays, providing a fast and alternative to traditional payment methods such as TED and DOC transfers. \n", "example": 2 }, "PaymentStatus": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 2, "description": "Payment Status:\n 1 - PAID \n 2 - UNPAID\n", "enum": [ 1, 2 ], "example": 1 }, "RecorderAccount": { "type": "integer", "description": "Recorder account", "format": "int64", "minLength": 1, "maxLength": 8, "example": 12345678 } }, "responses": { "400BadRequest": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GlobalErrorResponse" } } } }, "401Unauthorized": { "description": "Missing or invalid access token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GlobalErrorResponse" } } } }, "500InternalServerError": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GlobalErrorResponse" } } } } }, "securitySchemes": { "bearerAuth": { "bearerFormat": "JWT", "scheme": "bearer", "type": "http" } } }, "paths": { "/v1/credit-rights": { "post": { "summary": "Register receivable", "description": "Register an account receivable - Brazil only. A receivable represents money expected to be collected from an entity (*debtor*) who has purchased products or services, but has not yet paid for them in full. The *lender*, the person or entity owed the money, can sell this debt to a new *owner*, who may package it as part of another financial instrument, in much the same way a mortgage is sold to become part of a mortgage-backed security. \n\nPismo works with B3 - a large financial market infrastructure provider in Brazil - to register invoices. \n\nIf creation fails, a credit_rights_registration_failure-1 event is generated. If creation succeeds, a credit_rights_registration_success-1 event is generated \n", "operationId": "create-receivable", "tags": [ "Receivable" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateReceivableRequest" } } }, "required": true }, "responses": { "202": { "description": "Success message is sent to the client while registration is processed asynchronously", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateReceivableResponse" } } } }, "400": { "$ref": "#/components/responses/400BadRequest" }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "500": { "$ref": "#/components/responses/500InternalServerError" } } } } } } ```