POST
/api/rpa/estornarReverse RPA
Logical reversal — there is no cancellation, because the RPA is not transmitted anywhere. The receipt stays in the listing flagged as reversed, drops out of every closing total, and the number does not return to the sequence. Later receipts in the same period are not recalculated.
Required headers
tokenstring | string | Issuing company token |
signstring | string | MD5 signature: MD5(token + path + body + timestamp) |
timestampstring | string | Unix timestamp in seconds |
Body
id*string | string | Receipt ID |
motivo*string | string | Reversal reason (minimum 5 characters) |
* Required field.
Common errors
| Message | Cause |
|---|---|
| id inválido / id无效 | id is not a valid ObjectId |
| motivo deve ter pelo menos 5 caracteres / motivo至少需5个字符 | motivo has fewer than 5 characters after trimming |
| RPA não encontrado / 未找到该RPA | The receipt does not exist or does not belong to the company |
| RPA já está estornado / 该RPA已冲销 | The receipt is already reversed |
Examples
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X POST "https://api.tffiscal.com/api/rpa/estornar" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"id": "66c1f4b7e4b0a1c2d3e4f5b1",
"motivo": "Pagamento cancelado pelo cliente"
}
{
"success": true,
"message": "成功",
"rpaId": "66c1f4b7e4b0a1c2d3e4f5b1",
"competencia": 202608
}