Skip to main content

Token validation for bank slip payment batch

This endpoint completes the two-factor authentication (2FA) step for a bank slip batch that, after batch confirmation with tfa_info, is in batch_status pending_2fa_approval (approval) or pending_2fa_rejection (rejection). After token validation, the batch proceeds to asynchronous payment processing, and the final status reflects the decision recorded at confirmation (approved or rejected). To request a new token while the batch is in pending_2fa_approval (approval) or pending_2fa_rejection (rejection), use Resend token for bank slip payment batch confirmation.

Bank slip

A traditional bank slip (digitable line not starting with digit 8). It is registered in the Interbank Payment Chamber (CIP/Núclea) and can be paid at financial and payment institutions authorized by the Central Bank.

Request

Request Endpoint

ENDPOINT
/bill_payment/account/ACCOUNT_KEY/payment/batch_bank_slip/PAYMENT_BATCH_KEY/validate_token
METHOD
PATCH

Request Path Params

FieldTypeDescriptionCharacters
account_key *uuid4Unique account identifier.36
payment_batch_key *uuid4Unique batch identifier (batch_payment_key returned at batch creation).36

Authentication via Email and SMS

Request Body: Batch token validation
{
"token": "329adf"
}

Authentication via Device

To complete device authentication, the request must be sent with an empty payload. Validation is performed internally, with no additional request body information required. This endpoint should only be used after the batch enters pending_2fa_approval (approval) or pending_2fa_rejection (rejection) at batch confirmation with tfa_info.

Request Body: Batch token validation
{

}

Body Params

FieldTypeDescriptionCharacters
tokenstringAuthentication code sent to the account transaction approver required for TFA via SMS or email6

Response

Success Response

After successful validation, the API responds with 202 and the batch is processed asynchronously. The final status follows the decision registered in confirmation (approved or rejected).

STATUS
202
Response Body: Batch after token validation (example with approved decision)
{
"batch_payment_key": "a3214093-e51c-55e2-b5d3-60244475b3fb",
"request_control_key": "b6804f32-101e-4702-8fbc-c2dbc4c2caec",
"account_key": "6dc89d57-fac7-4643-b151-cd2ca0a7f68f",
"total_amount": 1357.3,
"batch_status": "approved",
"payment_type": "bank_slip"
}

Response Body Params

FieldTypeDescription
batch_payment_key *uuid4Unique batch payment identifier.
request_control_key *uuid4Unique client request identifier (batch).
account_key *uuid4Debited account key.
total_amount *numberSum of the amounts of all batch items.
batch_status *stringAfter token validation, the final status reflects the decision registered during confirmation (approved or rejected). The batch_status cycle follows the batch payment request documentation available for your operation (enumerator batch_payment_status).
payment_type *stringPayment type; for this flow, expected value is bank_slip.

Error Response

STATUS
4XX
Response Body
{
"title": "Title",
"description": "Description in english",
"translation": "Description em português",
"code": "Code"
}
HTTP codeQI codeTitleDescription (eng)Description (pt-br)
403BIP000010ForbiddenUser is not allowed to do this actionUser is not allowed to do this action
404BIP000011Not FoundThe source account key was not found.The source account key was not found.
400BIP000013Bad RequestThe source account is closed.The source account is closed.
400BIP000050Bad RequestRequester configuration does not existRequester configuration does not exist.
400BIP000058Bad RequestError while validating verification tokenError while validating verification token
400BIP000059Bad RequestNumber of verification token validation attempts exceeded.Number of verification token validation attempts exceeded.
400BIP000060Bad RequestVerification token expired.Verification token expired.
400BIP000061Bad RequestVerification token validation failed.Verification token validation failed.
400BIP000065Bad RequestPayment verification time window exceeded.Payment verification time window exceeded.
404BIP000083Not FoundBatch payment not found by batch payment key.Batch payment not found by batch payment key.
400BIP000085Bad RequestBatch payment status is not pending approval.Batch payment status is not pending approval.
400BIP000086Bad RequestA token is required for SMS or email validation.A token is required for SMS or email validation.