Skip to main content

Create a Payment by barcode

POST 

/v2/payments/barcode

Creates a payment from just the barcode or the typable line. The payment type is resolved from the code itself, following the FEBRABAN v08 layout, and returned in the kind field of the response:

Codekind
47 positions, or 44 not starting with 8bank_billet
starts with 8, segment 2, 3, 4, 6 or 7utility
starts with 8, segment 1 or 5tax, with tax.kind = "unknown" and tax.format = "code"

The code is rejected with 422 when a check digit does not match (the general one, in boleto and collection codes, and the field or block ones of the typable line), when it uses segment 9, 0 or 8, when the length does not match the first digit (47 positions starting with 8, 48 not starting with 8), or when it is an FGTS slip (segment 5 with agreement 0181 or 0182 in positions 16 to 19).

Prerequisites​

payment_account_uid is required and defines the source financial account. financial_account_uid is not accepted in this endpoint.

amount is optional when the code carries the amount to pay: collection codes with value identifier 6 or 8 (3rd position) and boletos with a non-zero amount. Without amount, the payment uses the code's amount; for a boleto, it is the face value, without interest, fine or discount. It is required for collection codes with identifier 7 or 9, where the code's amount is only a reference, and when the code comes with a zero amount.

Webhook Events​

The payment.db.created event is triggered by this operation.

Request​

Responses​

Boleto payment created