# Recharge Confirmation import ApiDoc from '../../../../../src/components/api-doc/ApiDoc'; ## Call details - **Resource:** `/v3/recharge/{nit}` - **HTTP Method:** `PUT` - **Request format:** `JSON` - **Response format:** `JSON` - **Header parameters:** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Format", "h-3": "Mandatory", "0-0": "`Content-Type`", "0-1": "It must be sent with the value `application/json`.", "0-2": "= 15 AN", "0-3": "YES", "1-0": "`Authorization`", "1-1": "Authenticity signature in `Bearer {signature}` format. [Learn more.](autenticacao-assinatura.md)

Example: `Bearer hh39458f73hf45324765ft349h5f73t4h95f34`.

This field is mandatory if the transaction was created with the signature process.", "1-2": "\\< 2000 AN", "1-3": "COND." }, "cols": 4, "rows": 2, "align": [ null, null, null, null ] } [/block] ## Examples Below is an example of the recharge confirmation service call using the **cURL** tool. **Request:** To use this example, don't forget to define the variable `{{url}}` with the value
**** ```bash curl --request PUT "https://e{{url}}/e-sitef/v3/recharge/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678" --header "Content-Type: application/json" --data-binary { "confirm_recharge_request":{ "confirm":"true", "merchant_key":"AOSDJF210349H3R0374H874H3T7AHG90SF" } } --verbose ``` **Response:** ``` { "confirm_recharge_response":{ "esitef":{ "message":"OK", "code":"0" }, "status":"CON", "payment":{ "status":"CON" } } } ``` ## Request parameters The table below describes the request parameters of the recharge confirmation service: [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Format", "h-3": "Mandatory", "0-0": "`confirm`", "0-1": "It must receive the value `true` if it’s desired to confirm the recharge and its associated payment (if it exists).
It must be set to `false` to undo the recharge and its associated payment (if any).", "0-2": "\\< 5 AN", "0-3": "YES", "1-0": "`merchant_key`", "1-1": "Merchant key on Carat Portal used on the recharge transaction.", "1-2": "\\< 80 AN", "1-3": "YES", "2-0": "**used_payment_methods\\[]**", "2-1": "Payment methods used to recharge. The user must follow the same rules described in [Recharge effectuation service corresponding chapter](recarga-rest-doRecharge.md#envio-do-campo-used_payment_methods) to fill this field. In the case of TIM recharge, it is mandatory to send this field if you do not want the “Other forms” payment type (code 99) to be assumed.", "2-2": "", "2-3": "COND." }, "cols": 4, "rows": 3, "align": [ null, null, "center", "center" ] } [/block] ## Response parameters In case of success, the HTTP response code will be `200`. Any other code must be interpreted as an error. The table below describes de response parameters of the recharge confirmation service: [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Format", "0-0": "`status`", "0-1": "Status of the recharge transaction on Carat Portal. [Learn more.](codigos-da-api.md#transaction-status)", "0-2": "= 3 AN", "1-0": "**esitef**", "1-1": "", "1-2": "", "2-0": "`code`", "2-1": "Carat Portal response code. Any code different from `0`(zero) means failure. [Learn more.](codigos-da-api.md#response-codes)", "2-2": "\\< 4 N", "3-0": "`message`", "3-1": "Carat Portal response message.", "3-2": "\\< 500 AN", "4-0": "**payment**
", "4-1": "", "4-2": "", "5-0": "`status`", "5-1": "Status of the payment transaction on Carat Portal, if it exists. [Learn more.](codigos-da-api.md#transaction-status)", "5-2": "= 3 AN" }, "cols": 3, "rows": 6, "align": [ null, null, "center" ] } [/block]