Handling Errors
How does it work?
In the case of POST operations a success response is identified with the HTTP Code 201 (Created). As it is shown in the diagram, when a 201 is received the status of the transaction should be validated. See the Transaction Status section for information about the status. A different HTTP Code Response means that there was a problem with the operation. HTTP Error codes possible for POST operations are:
- 400: Bad Request
- 401: An unauthorized execution attempt was detected.
- 404: There is no resource matching the requested ID or reference. For example when a one of both parties in the transaction does not exist.
- 500: An internal error occurred.
- 503: Represents an error caused by system unavailability.
In the case of GET operations a success response is identified with the HTTP Code 200 (OK). In the case the resource is not found the HTTP response code is 404. HTTP Error codes possible for GET operations are:
- 400: Bad Request
- 401: An unauthorized execution attemp was detected.
- 404: There is no resource matching the requested ID or reference.
- 500: An internal error occurred.
- 503: Represents an error caused by system unavailability.
In the case of PUT/PATCH/DELETE operations a success response is idenfied with the HTTP Code 204 (No Content) or 202 (Accepted). The last one is returned only for certain cases when a PATCH is executed over a transactions, please see the response body for such cases in the reference API section. A different HTTP Code Response means that there was a problem with the operation. HTTP Error codes possible for PUT/PATCH/DELETE operations are:
- 400: Bad Request
- 401: An unauthorized execution attemp was detected.
- 404: There is no resource matching the requested ID or reference.
- 500: An internal error occurred.
- 503: Represents an error caused by system unavailability.
Transaction processing error example
{
"amount": "10050.00000000",
"conciliationOptions": [],
"confirmed": true,
"country": "BR",
"creationDate": "2022-08-30T18:07:37.849305Z",
"creditParty": {
"data": {
"key": "[email protected]"
},
"type": "pixout-br",
"typeClass": "bank",
"typeCountry": "BR"
},
"currency": "BRL",
"debitParty": {
"data": {
"ACCOUNT_ID": "1000507"
},
"paymentMethodReference": "3334343132332D313030302D32333639",
"type": "emoneyout-brl",
"typeClass": "emoneyout",
"typeCountry": "BR"
},
"descriptionText": "PIX BR 13/04",
"error": {
"errorCategory": "businessRule",
"errorCode": "SV_INSUFFICIENT_FUNDS",
"errorDateTime": "2022-08-30T18:07:37Z",
"errorDescription": "Insufficient funds",
"errorParameters": [
{
"key": "svOriginalErrorCode",
"value": "TRANSACTION_NOT_ENOUGH_FUNDS"
}
]
},
"fx": {},
"geoCode": "",
"metadata": [],
"modificationDate": "2022-08-30T18:07:37.924050Z",
"recipientKyc": {},
"requestDate": "",
"requestingOrganisationTransactionReference": "185668",
"senderKyc": {},
"subType": "",
"transactionReference": "1005512",
"transactionStatus": "error",
"type": "withdrawal"
}
Transaction creation error example
{
"errorCategory": "businessRule",
"errorCode": "PAYMENT_METHOD_NOT_FOUND",
"errorDateTime": "2022-08-30T18:19:17Z",
"errorDescription": "Payment Method not found",
"errorParameters": []
}
Updated over 1 year ago