Create credit note previews

POST {{baseInfraUrl}}/{{version}}/credit-note

A CreditNotePreview is used to preview a CCB contract between the borrower and lender with a specific table type.

ParametersValue TypeDescription
typeREQUIREDTable type that defines the amortization system. type=sac
nominalAmountREQUIREDAmount in cents transferred to the credit receiver, before deductions. Example: nominalAmount=250000 (= R$ 2500,00)
scheduledREQUIREDDate or datetime of payment execution in ISO format. Example: scheduled=2022-01-01
taxIdREQUIREDDebtor's taxId (CPF/CNPJ). Example: taxId=20.018.183/0001-80
invoicesCONDITIONALLY-REQUIREDList of Invoice objects to be created and sent to the credit receiver.
nominalInterestCONDITIONALLY-REQUIREDYearly nominal interest rate of the Credit Note in percentage. Example: nominalInterest=12.5
initialDueCONDITIONALLY-REQUIREDDate of the first invoice in ISO format. Example: initialDue=2022-05-17
countCONDITIONALLY-REQUIREDInteger that represents the quantity of invoices for payment.
initialAmountCONDITIONALLY-REQUIREDValue of the first Invoice in cents. Example: initialAmount=1234 (= R$12.34)
intervalCONDITIONALLY-REQUIREDList of Invoice objects to be created and sent to the credit receiver.
rebateAmountOPTIONALCredit analysis fee deducted from the nominal amount.

Request Body

{"notes"=>[{"externalId"=>"my_unique_id_postman1", "invoices"=>[{"amount"=>234413, "due"=>"2023-06-16"}], "name"=>"Jamie Lannister", "nominalAmount"=>200000, "rebateAmount"=>0, "scheduled"=>"2022-06-07", "signers"=>[{"contact"=>"jamie.lannister@gmail.com", "method"=>"link", "name"=>"Jamie Lannister"}], "taxId"=>"012.345.678-90", "templateId"=>"5707012469948416", "paymentType"=>"transfer", "payment"=>{"accountNumber"=>"5005482", "bankCode"=>"60701190", "branchCode"=>"7248", "name"=>"Jamie Lannister", "taxId"=>"594.739.480-42"}, "city"=>"São Paulo", "stateCode"=>"SP", "district"=>"Jardim Paulista", "streetLine1"=>"Rua ABC", "streetLine2"=>"Ap 123", "zipCode"=>"01234-567"}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"notes":[{"amount":193240,"city":"São Paulo","created":"2022-07-07T16:50:07.366012+00:00","district":"Jardim Paulista","documentId":"c9a5c5f7aae54537bff8dad2216530ae","expiration":"2022-08-14T07:00:00+00:00","externalId":"my_unique_id_ ","id":"4695822818082816","interest":19.79,"invoices":[{"amount":104413,"descriptions":[],"discounts":[],"due":"2023-08-17T02:59:59.999999+00:00","expiration":5097600,"fine":2,"id":"","interest":1,"name":"Jamie Lannister","tags":[],"taxId":"012.345.678-90"},{"amount":124413,"descriptions":[],"discounts":[],"due":"2023-06-17T02:59:59.999999+00:00","expiration":5097600,"fine":2,"id":"","interest":1,"name":"Jamie Lannister","tags":[],"taxId":"012.345.678-90"}],"name":"Jamie Lannister","nominalAmount":200000,"nominalInterest":15.47,"payment":{"accountNumber":"5005482","accountType":"checking","amount":193240,"bankCode":"60701190","branchCode":"7248","id":"","name":"Jamie Lannister","scheduled":"2022-07-07T16:50:07.236594+00:00","status":"","tags":[],"taxId":"594.739.480-42"},"paymentType":"transfer","rebateAmount":0,"scheduled":"2022-08-07T07:00:00+00:00","signers":[{"contact":"https://development.api.starkinfra.com/v2/credit-note-signature","id":"5316720336044032","method":"organization","name":"Stark Sociedade de Crédito Direto S.A."},{"contact":"jamie.lannister@gmail.com","id":"5879670289465344","method":"link","name":"Jamie Lannister"}],"stateCode":"SP","status":"created","streetLine1":"Rua ABC","streetLine2":"Ap 123","tags":[],"taxAmount":6760,"taxId":"012.345.678-90","templateId":"5707012469948416","transactionIds":[],"updated":"2022-07-07T16:50:07.574676+00:00","workspaceId":"6275127679385600","zipCode":"01234-567"}]}