4 - Queries

Search by Payment Orders

API Method = GetPaymentOrder

Through this method, the customer is able to query Payment Orders by the CPF or CNPJ that generated the order (TaxNumber), by its Identifier applied by the customer in its emission (Identifier), by its Document Number generated after the successfull emission of the payment order (PaymentOrderId), by its status (PaymentOrderStatus) or by its payment date (PaymentDate).

It is also possible to organize how the search results can be presented, using the Index and PageSize fields.

{
     "Method": "GetPaymentOrder",
     "PartnerId": 30750,
     "BusinessUnitId": 61799,
     "TaxNumber": "77708946034",
     "PaymentDate": null,
     "PaymentOrderId": null,
     "PaymentOrderStatus": null,
     "Identifier": null,
     "Index": 0,
     "PageSize": 10
}

Description

ParametersDescriptionMandatoryType
MethodAPI method to be usedYESSTRING
PartnerIdPartner ID provided by FitBankYESINT64
BusinessUnitIdBusiness Unit ID provided by FitBankYESINT64
TaxNumberUser's Social Security Number (CPF or CNPJ)NOSTRING
PaymentDateDate of the operationNOSTRING
PaymentOrderIdPayment order identificationNOINT64
PaymentOrderStatusOperation statusNOINTEGER
IdentifierExternal identifierNOSTRING
IndexReference of which page will be accessedNOINTEGER
PageSizeNumber of results that will be displayed on the same pageNOINTEGER

In addition to the required fields, it is necessary to inform some transaction data in order to obtain a result.

JSON return from GetPaymentOrder

ParametersDescriptionCommentsType
PaymentOrderIdPayment order identificationNoneLONG (NUMBER)
NameBeneficiary's nameNoneSTRING (TEXT)
TaxNumberUser's Social Security Number (CPF or CNPJ)NoneSTRING (TEXT)
StatusOperation statusNoneSTRING (TEXT)
PaymentDateDate of operationNoneSTRING (TEXT)
TypeOperation typeNoneSTRING (TEXT)
IdentifierExternal identifierNoneSTRING (TEXT)
ReasonCodeReason for canceling the payment orderIf the payment order is not canceled it will appear as nullSTRING (TEXT)
SubReasonCodeDetail about the reason for canceling the payment orderIf the payment order is not canceled it will appear as nullSTRING (TEXT)

PaymentOrder Status

StatusTitleDescription
0CreatedCreated Payment Order
2SettledPayment concluded either by PIX or TED
3CanceledEXC0023 - Beneficiary Diverges From PIX Key Owner.
EXC0024 - Consult PixKey Error.
EXC0025 - Beneficiary failed KYC process.
EXC0033 - Beneficiary requires qualification process.
4RegisteredRegistered after transaction validations
6ErrorProcess failed

ReasonCode + SubReasonCode

ReasonCodeSubReasonCode
EXC0023 - Beneficiary Diverges From PIX Key OwnerNULL
EXC0024 - Consult PixKey ErrorEXCP002 - NotFound
EXCP004 - InvalidFormat
EXCP005 -Error
EXCP006 - InternalError
EXC0025 - Beneficiary failed KYC processEXCB0001 - Beneficiary appears on OFAC’s sanction list
EXCB0002 - Beneficiary appears on UN’s sanction list
EXCB0003 - Beneficiary appears on FitBank's internal block list
EXCB0004 - Situation with data inconsistency that does not allow to claim that the hit is false. More identification information related to the beneficiary is needed
EXCB0005 - The beneficiary is sanctioned
EXCB0006 - Identified that the Beneficiary is on the internal list
EXC0026 - Payment Order failed Risk processNULL
EXC0028 - Payment Order process failedEXC0001 - Occurrence with Type {0} not found..
OCR0001 - Insufficient balance to pay the transaction and/or fees.
OCR0002 - Transaction canceled by the Institution.
OCR0003 - Transaction canceled by user request.
SPI0001 - An error occurred while processing the PIX transaction.
SPI0002 - Transaction settlement interrupted due to SPI timeout.
SPI0003 - Transaction interrupted due to an error on the receiving user's participant.
SPI0004 - PIX transaction sender timeout.
SPI0005 - Invalid/non-existent agency and/or account number of the receiving user.
SPI0006 - Blocked payee account.
SPI0007 - Receiving user's account is closed.
SPI0008 - Incorrect type for the receiving user's transactional account.
SPI0009 - The transaction type is not supported/authorized in the receiving user's account.
SPI0010 - Transaction with this Processing Type is not allowed.
SPI0011 - Returning an instant payment is not allowed.
SPI0012 - The direct participant is not settling the paying user.
SPI0013 - PIX transaction with zero value is not allowed.
SPI0014 - Money Order/Return Exceeds Allowed Limit for Account Type.
SPI0015 - Insufficient balance in the paying user's PI account.
SPI0017 - Divergence between the sum of block values.
SPI0018 - Invalid number of transactions.
SPI0019 - CPF/CNPJ of the recipient differs from the Account holder's data.
SPI0020 - Unauthorized PIX transaction initiator.
SPI0022 - Incorrect receiving user's CPF/CNPJ.
SPI0023 - Incorrect or incompatible message content.
SPI0024 - Transaction rejected by receiving user participant.
SPI0025 - Participant who signed the message is not authorized.
SPI0026 - Transaction rejected due to time exceeded between messages.
SPI0027 - The participant is not registered or has not yet started the operation in the SPI.
SPI0028 - Invalid message sending date and time.
SPI0029 - The transaction exceeds the maximum time limit for returning a PIX transaction.
SPI0030 - Inconsistency between transaction purpose and message.
SPI0032 - ISPB of the participant facilitating service PIX Withdrawal or PIX Exchange non-existent.
SPI0033 - Invalid or non-existent Paying Participant ISPB.
SPI0034 - Invalid or non-existent receiving participant's ISPB.
SPI0035 - Transaction rejected because paying user is sanctioned.

Request FX Forecast

API Method = GetFXforecast

The Request FX Forecast API allows our clients to manage the cash flow of their accounts. This endpoint aims to offer our customers a comprehensive view of their funds, facilitating cash flow management and strategic decision-making. Please note that this API is just to give you information for create your own forecast. To have detailed statement on a single account, GetAccountEntryPaged is our standard API.

{
    "Method": "GetFXforecast",
    "PartnerId": 1019,
    "BusinessUnitId": 1019
}
{
  	"Success": "true",
    "FXCurrency": 
    {
        "Currency": "USD",
        "DateTimeLastTransaction": "2023-04-17T09:04:39.110",
        "CurrentBalance": "184976.75"
    },
    "LastExchangeCutMade": 
    {
        "DateTimeLastExchangeCut": "2023-04-17T08:56:53.957",
        "LastExchangeRate": "4.8751"
    },
    "LocalCurrencyNonExchanged": 
    {
        "Currency": "BRL",
        "DateTimeLastTransaction": "2023-04-17T09:04:39.110",
        "TotalValue": "698048.000000000000",
        "TotalFee": "21798.700000000000"
    }
}

Description

ParametersDescription
MethodAPI method to be used
PartnerIdPartner ID provided by FitBank
BusinessUnitIDBusiness Unit ID provided by FitBank

JSON return from GetFXforecast

ParametersDescription
FXCurrencyForeign Currency Block
CurrencyForeign currency associated with the account (USD)
DateTimeLastTransactionExact time of the last foreign currency transaction
CurrentBalanceCurrent account balance in dollars (or in the respective foreign currency)
LastExchangeCutMadeBlock of Last Exchange Performed
DateTimeLastExchangeCutTime of the last currency cut performed (cut time)
LastExchangeRateExchange rate used in the last cut
LocalCurrencyNonExchangedNon exchanged Local Currency Block
CurrencyLocal currency associated with the account (BRL)
DateTimeLastTransactionExact time of last transaction in local currency
TotalValueTotal amount of transactions in local currency that have not yet been subjected to currency cutoff
TotalFeeTotal sum of local currency rates not exchanged since the last exchange rate cut

📘

Explanation

To be clear, this calculation will be only a prediction, because the correct FX rate only will be defined in the moment of next FX window.