Recharge

Brazil

Quick Start

Brazil

This guide shows the process of performing a recharge, using Carat Portal's REST web service interface.

What you'll need

  • Active account on Carat Portal's homologation environment (obtained with our support team)
  • A tool capable of performing HTTP calls, such as Postman, REST Client or cURL

Creating the transaction

HTTP method: POST

URL: https://esitef-homologacao.softwareexpress.com.br/e-sitef/v3/recharge

Headers:

  • Content-Type: application/json

Request:

To use this example, don't forget to define the variable {{url}} to the value

JSON
{
  "begin_recharge_request": {
    "merchant_key": "XXXXXXXX"
  }
}
cURL
curl
--request POST "https://{{url}}/e-sitef/v3/recharge"
--header "Content-Type: application/json"
--data-binary
{
   "begin_recharge_request":{
      "merchant_key":"XXXXXXXX"
   }
}
--verbose

Receiving the authenticity POST:

Java
@RestController
public class MyAuthenticityController {

}

Response:

JSON
{
  "begin_recharge_response": {
    "esitef": {
      "message": "OK. Transaction successful.",
      "code": "0"
    }
  }
}

Learn more about this service.

Listing dealers

HTTP method: GET

URL: https://esitef-homologacao.softwareexpress.com.br/e-sitef/v3/rechargedealers

Request:

To use this example, don't forget to define the variable {{url}} to the value

cURL
curl
--request GET "https://{{url}}/e-sitef/v3/rechargedealers?nit=asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678&generalhash=0000000000000000"
--verbose

Response:

JSON
{
  "list_dealers_response": {
    "status": "NOV",
    "esitef": {
      "message": "OK. Transaction successful.",
      "code": "0"
    },
    "authorizer": {
      "message": "",
      "code": "000"
    },
    "hashes": {
      "general": "09A9681D09A9681D"
    },
    "dealers": [
      {
        "name": "Vivo",
        "code": "001"
      },
      {
        "name": "Claro",
        "code": "002"
      },
      {
        "name": "Oi",
        "code": "003"
      },
      {
        "name": "Tim",
        "code": "004"
      }
    ]
  }
}

Learn more about this service.

Listing branch data

HTTP method: GET

URL: https://esitef-homologacao.softwareexpress.com.br/e-sitef/v3/rechargebranches

Request:

To use this example, don't forget to define the variable {{url}} to the value

cURL
curl
--request GET "https://{{url}}/e-sitef/v3/rechargebranches?nit=asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678&ddd=00&dealercode=1&generalhash=0000000000000000"
--verbose

Response:

JSON
{
  "list_branch_data_response": {
    "status": "NOV",
    "esitef": {
      "message": "OK. Transaction successful.",
      "code": "0"
    },
    "sitef": {
      "code": "000"
    },
    "hashes": {
      "general": "09A9681D09A9681D"
    },
    "questions": [
      {
        "id": "5",
        "display": "Qual o nome do seu pai?",
        "rule": "3",
        "min": "5",
        "max": "30",
        "type": "i"
      }
    ],
    "general": [
      {
        "message": "MENSAGEM DE TESTE"
      }
    ],
    "categories": [
      {
        "code": "01",
        "description": "RECARGA",
        "amount_ranges": [
          {
            "message": "MSG_FAIXA_1",
            "amount_key": "7",
            "bonus_in_percentage": "100",
            "bonus": "50",
            "payment_amount": "700",
            "bonus_category": "1",
            "expiry_date": "30",
            "bonus_expiry_date": "15",
            "min_amount": "500",
            "max_amount": "10000"
          },
          {
            "message": "MSG_FAIXA_2",
            "amount_key": "8",
            "bonus_in_percentage": "500",
            "bonus_category": "2",
            "min_amount": "1000",
            "max_amount": "50000"
          }
        ],
        "fixed_amounts": [
          {
            "bonus": "50",
            "message": "MSG_FIXO_1",
            "amount": "300",
            "amount_key": "1",
            "bonus_category": "2",
            "bonus_in_percentage": "200",
            "payment_amount": "10",
            "expiry_date": "60",
            "bonus_expiry_date": "15"
          },
          {
            "message": "MSG_FIXO_2",
            "amount": "1500",
            "amount_key": "2",
            "payment_amount": "30"
          },
          {
            "message": "MSG_FIXO_3",
            "amount": "2000",
            "amount_key": "3"
          },
          {
            "amount": "2200",
            "amount_key": "4",
            "expiry_date": "90"
          },
          {
            "message": "MSG_FIXO_4",
            "amount": "5000",
            "amount_key": "6",
            "expiry_date": "120"
          }
        ]
      },
      {
        "code": "02",
        "description": "SMS",
        "amount_ranges": [],
        "fixed_amounts": []
      },
      {
        "code": "03",
        "description": "PRIMEIRA_RECARGA",
        "amount_ranges": [],
        "fixed_amounts": []
      }
    ],
    "payment_methods": {
      "max": "4",
      "available": ["00", "01", "02:10", "03:10", "04:10", "05:10", "06:10"]
    }
  }
}

Learn more about this service.

Effecting the recharge

Recharge with payment

HTTP method: PUT

URL: https://esitef-homologacao.softwareexpress.com.br/e-sitef/v3/recharge/<nit>

Headers:

  • Content-Type: application/json

Request:

To use this example, don't forget to define the variable {{url}} to the value

JSON
{
  "do_recharge_request": {
    "hashes": {
      "general": "0000000000000000"
    },
    "dealer": {
      "code": "1",
      "type_code": "03",
      "branch": {
        "code": "98006000000"
      }
    },
    "phone": {
      "ddd": "11",
      "number": "123456789"
    },
    "amount": "3000",
    "amount_key": "3",
    "used_payment_methods": ["11", "12"],
    "answers": [
      {
        "code": "1",
        "description": "response"
      },
      {
        "code": "2",
        "description": "response2"
      }
    ],
    "terminal_type": "03",
    "cpf": "8298374982374",
    "cnpj": "123121333000123",
    "zip_code": "01310100",
    "payment": {
      "amount": "12",
      "authorizer_id": "1",
      "customer_id": "12341234",
      "merchant_key": "OIAUSWHFN012375901J23047FNN00UYWHN0R871Y2ND87",
      "installment": {
        "number": "2",
        "type": "4"
      },
      "card": {
        "number": "1111111111111111",
        "token": "",
        "security_code": "123",
        "expiry_date": "1222"
      },
      "extra_param": [
        {
          "key": "CRIPTO",
          "value": "1"
        }
      ]
    }
  }
}
cURL
curl
--request PUT "https://{{url}}/e-sitef/v3/recharge/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--header "Content-Type: application/json"
--data-binary
{
   "do_recharge_request":{
      "hashes":{
         "general":"0000000000000000"
      },
      "dealer":{
         "code":"1",
         "type_code":"03",
         "branch":{
            "code":"98006000000"
         }
      },
      "phone":{
         "ddd":"11",
         "number":"123456789"
      },
      "amount":"3000",
      "amount_key":"3",
      "used_payment_methods":[
         "11",
         "12"
      ],
      "answers":[
         {
            "code":"1",
            "description":"response"
         },
         {
            "code":"2",
            "description":"response2"
         }
      ],
      "terminal_type":"03",
      "cpf":"8298374982374",
      "cnpj":"123121333000123",
      "zip_code":"01310100",
      "payment":{
         "amount":"12",
         "authorizer_id":"1",
         "customer_id":"12341234",
         "merchant_key":"OIAUSWHFN012375901J23047FNN00UYWHN0R871Y2ND87",
         "installment":{
            "number":"2",
            "type":"4"
         },
         "card":{
            "number":"1111111111111111",
            "token":"",
            "security_code":"123",
            "expiry_date":"1222"
         },
         "extra_param":[
            {
               "key":"CRIPTO",
               "value":"1"
            }
         ]
      }
   }
}
--verbose

Response:

JSON
{
  "do_recharge_response": {
    "status": "PPC",
    "order_id": "12344231",
    "merchant_usn": "5123",
    "esitef": {
      "message": "OK",
      "code": "0",
      "usn": "123456789012345"
    },
    "sitef": {
      "message": "OK",
      "code": "0"
    },
    "host": {
      "message": "OK",
      "code": "0"
    },
    "acquirer": {
      "branch_code": "cod filial",
      "merchant_code": "codigoEstab"
    },
    "authorization": {
      "confirmation_data": "000033333",
      "authorizer_date": "20150514",
      "authorizer_time": "1100",
      "host_usn": "11122",
      "sitef_usn": "333",
      "number": "332234"
    },
    "customer": {
      "total_copies": 3,
      "receipt": "COMPROVANTE DE RECARGA via do cliente"
    },
    "merchant": {
      "total_copies": 3,
      "receipt": "COMPROVANTE DE RECARGA via do estabelecimento"
    },
    "payment_methods": {
      "max": 4,
      "available": [
        {
          "name": "dinheiro"
        },
        {
          "name": "cheque"
        }
      ]
    },
    "payment": {
      "status": "PPC",
      "amount": "12",
      "type": "C",
      "esitef": {
        "usn": "098765432109876",
        "date": "12/12/2012 12:12"
      },
      "customer": {
        "receipt": "nwiugrnboinb APROVADO via do cliente"
      },
      "merchant": {
        "receipt": "nwiugrnboinb APROVADO via do estabelecimento "
      },
      "authorizer_id": "1",
      "acquirer": "CIELO",
      "authorization": {
        "number": "163457212",
        "sitef_usn": "456456",
        "host_usn": "654654",
        "tid": "7334312a2",
        "eci": "fr3u214wf71",
        "sitef_date": "12122012"
      },
      "analysis": {
        "status": "PEN",
        "code": "0",
        "message": "aprovado"
      },
      "extra_param": [
        {
          "key": "CRIPTO",
          "value": "1"
        }
      ],
      "sitef": {
        "code": "000"
      }
    }
  }
}

Recharge without payment

Request:

To use this example, don't forget to define the variable {{url}} to the value

JSON
{
  "do_recharge_request": {
    "dealer": {
      "code": "1"
    },
    "phone": {
      "ddd": "11",
      "number": "123456789"
    },
    "amount": "3000"
  }
}
--request PUT "https://{{url}}/e-sitef/v3/recharge/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678" --header "Content-Type: application/json" --data-binary { "do_recharge_request":{ "dealer":{ "code":"1" }, "phone":{ "ddd":"11", "number":"123456789" }, "amount":"3000" } } --verbose

Response:

JSON
{
  "do_recharge_response": {
    "status": "PPC",
    "order_id": "12344231",
    "merchant_usn": "5123",
    "esitef": {
      "message": "OK",
      "code": "0",
      "usn": "123456789012345"
    },
    "sitef": {
      "message": "OK",
      "code": "0"
    },
    "host": {
      "message": "OK",
      "code": "0"
    },
    "acquirer": {
      "branch_code": "cod filial",
      "merchant_code": "codigoEstab"
    },
    "authorization": {
      "confirmation_data": "000033333",
      "authorizer_date": "20150514",
      "authorizer_time": "1100",
      "host_usn": "11122",
      "sitef_usn": "333",
      "number": "332234"
    },
    "customer": {
      "total_copies": 3,
      "receipt": "COMPROVANTE DE RECARGA via do cliente"
    },
    "merchant": {
      "total_copies": 3,
      "receipt": "COMPROVANTE DE RECARGA via do estabelecimento"
    },
    "payment_methods": {
      "max": 4,
      "available": [
        {
          "name": "dinheiro"
        },
        {
          "name": "cheque"
        }
      ]
    }
  }
}

Learn more about this service.

Confirming the recharge

HTTP method: PUT

URL: https://esitef-homologacao.softwareexpress.com.br/e-sitef/v3/recharge/<nit>

Headers:

  • Content-Type: application/json

Request:

To use this example, don't forget to define the variable {{url}} to the value

JSON
{
  "confirm_recharge_request": {
    "confirm": "true",
    "merchant_key": "AOSDJF210349H3R0374H874H3T7AHG90SF"
  }
}
cURL
curl
--request PUT "https://{{url}}/e-sitef/v3/recharge/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--header "Content-Type: application/json"
--data-binary
{
   "confirm_recharge_request":{
      "confirm":"true",
      "merchant_key":"AOSDJF210349H3R0374H874H3T7AHG90SF"
   }
}
--verbose

Response:

JSON
{
  "confirm_recharge_response": {
    "esitef": {
      "message": "OK",
      "code": "0"
    },
    "status": "CON",
    "payment": {
      "status": "CON"
    }
  }
}

Learn more about this service.

Checking the recharge status

HTTP method: PUT

URL: https://esitef-homologacao.softwareexpress.com.br/e-sitef/v3/recharge/<nit>

Replace the field <nit> in the URL above with the NIT obtained in the transaction creation step.

Headers:

  • Content-Type: application/json

Request:

To use this example, don't forget to define the variable {{url}} to the value

cURL
curl
--request GET "https://{{url}}/e-sitef/v3/recharge/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678/?merchantkey=ASDFGHJK12345678ASDFGHJK12345678"
--verbose

Response:

JSON
{
  "get_status_recharge_response": {
    "status": "CON",
    "esitef": {
      "message": "OK",
      "code": "0"
    },
    "authorizers": [
      {
        "name": "sitef",
        "message": "textoExibicao",
        "code": "codigoRespSitef"
      },
      {
        "name": "nome operadora (186)",
        "message": "OK",
        "code": "196"
      }
    ],
    "acquirer": {
      "branch_code": "cod filial",
      "merchant_code": "codigoEstab"
    },
    "authorization": {
      "confirmation_data": "000033333",
      "authorizer_date": "20150514",
      "authorizer_time": "1100",
      "host_usn": "11122",
      "sitef_usn": "333",
      "number": "332234"
    },
    "customer": {
      "total_copies": 3,
      "receipt": "COMPROVANTE DE RECARGA mimimim cliente whiskas sache"
    },
    "merchant": {
      "total_copies": 3,
      "receipt": "COMPROVANTE DE RECARGA mimimim estabelecimento lorem ipsum"
    },
    "payment_methods": {
      "max": 2,
      "available": [
        {
          "name": "dinheiro"
        },
        {
          "name": "cheque"
        }
      ]
    },
    "payment": {
      "status": "PPC",
      "amount": "12",
      "type": "C",
      "esitef": {
        "usn": "098765432109876",
        "date": "12/12/2012 12:12"
      },
      "customer": {
        "receipt": "nwiugrnboinbAPROVADOaoisuerhn"
      },
      "merchant": {
        "receipt": "nwiugrnboinbAPROVADOaoisuerhn"
      },
      "authorizer_id": "1",
      "acquirer": "CIELO",
      "authorization": {
        "number": "163457212",
        "sitef_usn": "456456",
        "host_usn": "654654",
        "tid": "7334312a2",
        "eci": "fr3u214wf71",
        "sitef_date": "12122012"
      },
      "analysis": {
        "status": "PEN",
        "code": "0",
        "message": "hahaha"
      },
      "extra_param": [
        {
          "key": "CRIPTO",
          "value": "1"
        }
      ],
      "sitef": {
        "code": "000"
      }
    }
  }
}

Learn more about this service.

---

Recharge Creation

Brazil

Authenticity POST x signature

Carat Portal has two methods of merchant authentication on the REST recharge interface: authenticity POST or signature.

In the authenticity POST method, Carat Portal will send the data of the newly created recharge transaction to the registered authenticity URL of the merchant.

In the signature method, the merchant must have a public RSA encryption key registered on Carat Portal and prepare a JWT signature (JSON Web Tokens) to be sent in the Authorization header. In this case, the recharge transaction information will be returned directly in the response. Learn more.

Call details

  • Resource: /v3/recharge
  • HTTP Method: POST
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
Content-TypeIt must be sent with the value application/json.= 15 ANYES
AuthorizationMerchant's signature in the Bearer {signature} format. Example: Bearer JHVGytfdgauygdauiw78264284527852897hagdg.< 2000 ANNO

Examples

Below are some examples of the recharge creation service call using the cURL tool.

Creating a recharge transaction sending all parameters

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
curl
--request POST "https://{{url}}/e-sitef/v3/recharge"
--header "Content-Type: application/json"
--data-binary
{
   "begin_recharge_request":{
      "merchant_key":"XXXXXXXX",
      "merchant_usn":"2398",
      "order_id":"023748",
      "general_hash":"0000000000000000",
      "recharge_type":"normal"
   }
}
--verbose

Response:

{
   "begin_recharge_response":{
      "esitef":{
         "message":"OK. Transaction successful.",
         "code":"0"
      }
   }
}

Authenticity POST:

To use this example, don't forget to define the variable {{url}} with the value

Bash
curl  -X POST \
  https://dominiodaloja.com.br \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'cache-control: no-cache' \
  -d 'merchantUSN=987654321&merchantId=LOJAFATURAT&orderId=123456789&nit=e009886843920c5173104557c9f6cd66b1481557fb3f4d88daca072eb8a50c97&generalHash=85E791AD85E791AD'

Creating a recharge transaction sending only the required parameters

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
curl
--request POST "https://{{url}}/e-sitef/v3/recharge"
--header "Content-Type: application/json"
--data-binary
{
   "begin_recharge_request":{
      "merchant_key":"XXXXXXXX"
   }
}
--verbose

Response:

{
   "begin_recharge_response":{
      "esitef":{
         "message":"OK. Transaction successful.",
         "code":"0"
      }
   }
}

Creating a recharge transaction with signature

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
curl 
--request POST "https://{{url}}/e-sitef/v3/recharge"
--header "Content-Type: application/json"
--header "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudF9pZCI6IkxPFGFURVNURSIsIm1lcmNoYW50X2tleSI6IkYxOURFMDAxNzdDMzAxREYyNEE4NjVGMTFBQTlCMjU2N0Y2MDQ4OTFGMEY0NEREQUVGRDY5RTMzOTlFMEI3RTEiLCJvcmRlcl9pZCI6IjEzMDE0ODU4NjYzIiwibWVyY2hhbnRfdXNuIjoiMTQ0NjY4MTAxNiIsInRpbWVzdGFtcCI6IjE2MDUzMDM1ODA5MzEifQ.JoYz8mQ8PZ8MCr5QXygbivAy2x9fvdUEGu_jSeOYF-BtSGm7ZSYWFVokyowabk1FM2NCklubb5eEB_-g9lCi1ntRQ9iqKhdldm-U8pl0V98u7Mv_hR-pcp6MHfqql0T-mhkOv1WkfYO1igck4N6EfsNu9iO126BwgvJQC456WjAUW5jgjRHboc6htvaak9NBs6yRVLNZY03cR9gKtQXMoHeXiCGeNU55_2W1SOeRJPk-OsyBzvVlZBX5RdfUjB2BOdRI7H2TDBBS-GZaMV3b2eS5_84JTySFnriCTXJ-Y1FzBnH60e4fTfAiYy1P_J-j9hyXjLYgtRu8jQd8ITfiFG3h4ZIysb4CA_lJNg_d4YuCqhBiZcpculcbfXlcrcfPV-CpDytfiLz34FDWH0Q7Vlna1YuSNOKPzDIUx1MOMZO9bpwaE6Q3kClkqri92-42yeLoUKH6PUrlMpE3JrfuBelALE4ce7QzCrNjcvoqR_KVmCm6ozBjPn9qY0s7x7qe6ZLur7hNUoX79JdWGZy1-bx8dSqqpLrU0SXbMBqtvch5FvdUkktbkJpZAr7q6e0nR13_mK3RTV7adOEw03E_ocUk__rEmjGDAHMSWGmiPowu14jD1-VZ2Yf8FeoKzHYcXmIbEReTVHshk9faBICMQzMS3SXaqow4WXqULZiLTwc"
--data-binary
{
   "begin_recharge_request":{
      "merchant_key":"XXXXXXXX",
      "merchant_usn":"1446681016",
      "order_id":"13014858663",
      "general_hash":"0000000000000000"
   }
}
--verbose

Response:

{
   "begin_recharge_response":{
      "esitef":{
         "message":"OK. Transaction successful.",
         "code":"0"
      },
      "nit": "jhadafsafhjhasdfghiyuw43u8785345jksjknsmnnsjkfkiu34u98ynksnn3535",
      "merchant_id": "XXXXXXXX",
      "order_id": "13014858663",
      "merchant_usn": "1446681016",
      "general_hash": "AF32810AAF32810A"
   }
}

Request parameters

The table below describes the request parameters of the recharge creation service:

ParameterDescriptionFormatMandatory
merchant_keyMerchant key registered on Carat Portal< 80 AYES
merchant_usnUnique sequential number generated by the merchant< 12 NNO
order_idOrder identification code generated by the merchant< 20 ANNO
general_hashIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).

If the store hadn't performed a recharge previously or hadn't saved a previously received value from Carat Portal, the value: 0000000000000000 can be passed to Carat Portal. If the general_hash is not sent, the store will be obliged to make all queries to obtain the data necessary for the next steps of the recharge.
= 16 ANO
recharge_typeType of the recharge to be performed.

Values:
  • normal – Cell phone top-up
  • others – Recharge for other types of products, such as games PIN, donations, iUSNrance or even cell phone recharge by other modalities.
  • invoice – Signature invoice payment
Default value: normal
= 6 ANO

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 creation service:

ParameterDescriptionFormat
nitIdentification of the recharge transaction on Carat Portal= 64 AN
merchant_idMerchant ID on Carat Portal< 15 AN
order_idOrder code generated by the merchant< 20 AN
merchant_usnUnique sequential number generated by the merchant< 12 N
general_hashIdentification code of the table with the data related to the recharges (carriers, subsidiaries, ranges of values, validity of credits, among others).= 16 AN
esitef Element that describes Carat Portal's response.
codeCarat Portal response code. Any code different from 0(zero) means failure. Learn more.< 4 N
messageCarat Portal response message.< 500 AN

Authenticity POST parameters

The table below describes the parameters sent by Carat Portal on the authenticity POST:

ParameterDescriptionFormat
nitIdentifier of the cancel transaction to be used in the next step of the flow.= 64 AN
merchantIdMerchant code on Carat Portal.< 15 AN
orderIdOrder ID of the payment created by merchant< 20 AN
merchantUSNUSN generated by the merchant for the payment< 12 N
generalHashIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).= 16 AN

Carat Portal can also send new parameters without previous warning, which means that the merchant’s application must be prepared to receive extra fields and just ignore them.

Parameters sent by Carat Portal on HTTPS POST

Important:

Carat Portal uses the x-www-form-urlencoded media type to send the HTTPS POST. Therefore, the server must accept this type of media on the merchant's registered URL to receive POST HTTPS.

ParameterDescriptionFormat
nitIdentification of the recharge transaction on Carat Portal= 64 AN
merchantIdMerchant ID on Carat Portal< 15 AN
orderIdOrder code generated by the merchant< 20 AN
merchantUSNUnique sequential number generated by the merchant< 12 N
generalHashIdentification code of the table with the data related to the recharges (carriers, subsidiaries, ranges of values, validity of credits, among others).= 16 AN

List Dealers

Brazil

Call details

  • Resource: /v3/rechargedealers
  • HTTP Method: GET
  • Request format: query string
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
AuthorizationAuthenticity signature in Bearer {signature} format. Learn more.

Example: Bearer hh39458f73hf45324765ft349h5f73t4h95f34.

This field is mandatory if the transaction was created with the signature process.
< 2000 ANCOND.

Examples

Below are some examples of the list dealers service call using the cURL tool.

List dealers of normal recharge

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request GET "https://{{url}}/e-sitef/v3/rechargedealers?nit=asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678&generalhash=0000000000000000"
--verbose

Response:

 {
   "list_dealers_response":{
      "status":"NOV",
      "esitef":{
         "message":"OK. Transaction successful.",
         "code":"0"
      },
      "authorizer":{
         "message":"",
         "code":"000"
      },
      "hashes":{
         "general":"09A9681D09A9681D"
      },
      "dealers":[
         {
            "name":"Vivo",
            "code":"001"
         },
         {
            "name":"Claro",
            "code":"002"
         },
         {
            "name":"Oi",
            "code":"003"
         },
         {
            "name":"Tim",
            "code":"004"
         }
      ]
   }
}

List dealers of other products recharge

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request GET "https://{{url}}/e-sitef/v3/rechargedealers?nit=asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--verbose

Response:

 {
   "list_dealers_response":{
      "status":"NOV",
      "esitef":{
         "message":"OK. Transaction successful.",
         "code":"0"
      },
      "authorizer":{
         "message":"",
         "code":"000"
      },
      "hashes":{
         "general":"09A9681D09A9681D"
      },
      "dealers":[
         {
            "name":"Vex-PIN",
            "code":"905",
            "branches":[
               {
                  "name":"Vex-PIN",
                  "code":"97200000000"
               }
            ],
            "type_name":"PIN TELEFONE",
            "type_code":"02"
         },
         {
            "name":"TIM-Leste-PIN",
            "code":"902",
            "branches":[
               {
                  "name":"TIM-Leste-PIN",
                  "code":"97001000000"
               }
            ],
            "type_name":"PIN TELEFONE",
            "type_code":"02"
         },
         {
            "name":"E-Prepag",
            "code":"901",
            "branches":[
               {
                  "name":"Brancaleone-Migux",
                  "code":"98000000000"
               },
               {
                  "name":"HABBO HOTEL-Habbo Hotel",
                  "code":"98001000000"
               },
               {
                  "name":"ONGAME-Metin2",
                  "code":"98006000000"
               }
            ],
            "type_name":"PIN GAMES",
            "type_code":"03"
         },
         {
            "name":"Prepag",
            "code":"900",
            "branches":[
               {
                  "name":"Level Up!",
                  "code":"99000000000"
               },
               {
                  "name":"OnGame",
                  "code":"99100000000"
               },
               {
                  "name":"Acclaim",
                  "code":"99300000000"
               }
            ],
            "type_name":"PIN GAMES",
            "type_code":"03"
         },
         {
            "name":"Crianca Esperanca",
            "code":"908",
            "branches":[
               {
                  "name":"Crianca Esperanca",
                  "code":"97299000000"
               }
            ],
            "type_name":"DOACAO",
            "type_code":"04"
         },
         {
            "name":"Sorte Mania",
            "code":"909",
            "branches":[
               {
                  "name":"Sorte Mania",
                  "code":"97298000000"
               }
            ],
            "type_name":"SEGURO",
            "type_code":"05"
         }
      ]
   }
}

List dealers of signature invoice payment (invoice)

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request GET "https://{{url}}/e-sitef/v3/rechargedealers?nit=asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--verbose

Response:

 {
    "list_dealers_response": {
        "status": "NOV",
        "esitef": {
            "message": "OK. Transaction successful.",
            "code": "0"
        },
        "authorizer": {
            "message": "",
            "code": "000"
        },
        "hashes": {
            "general": "85E791AD85E791AD"
        },
        "dealers": [
            {
                "name": "Vivo SP Pos",
                "code": "800",
                "branches": [
                    {
                        "name": "Vivo SP Pos",
                        "code": "80019000000"
                    }
                ]
            }
        ],
        "questions": [
            {
                "id": "LPERG:126",
                "display": "Identificação do cliente ou Número de contrato",
                "rule": "0",
                "min": "1",
                "max": "11",
                "type": "N"
            }
        ]
    }
}

List dealers with sent signature

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request GET "https://{{url}}/e-sitef/v3/rechargedealers?nit=asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678&generalhash=0000000000000000"
--header "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudF9pZCI6IkxPFGFURVNURSIsIm1lcmNoYW50X2tleSI6IkYxOURFMDAxNzdDMzAxREYyNEE4NjVGMTFBQTlCMjU2N0Y2MDQ4OTFGMEY0NEREQUVGRDY5RTMzOTlFMEI3RTEiLCJvcmRlcl9pZCI6IjEzMDE0ODU4NjYzIiwibWVyY2hhbnRfdXNuIjoiMTQ0NjY4MTAxNiIsInRpbWVzdGFtcCI6IjE2MDUzMDM1ODA5MzEifQ.JoYz8mQ8PZ8MCr5QXygbivAy2x9fvdUEGu_jSeOYF-BtSGm7ZSYWFVokyowabk1FM2NCklubb5eEB_-g9lCi1ntRQ9iqKhdldm-U8pl0V98u7Mv_hR-pcp6MHfqql0T-mhkOv1WkfYO1igck4N6EfsNu9iO126BwgvJQC456WjAUW5jgjRHboc6htvaak9NBs6yRVLNZY03cR9gKtQXMoHeXiCGeNU55_2W1SOeRJPk-OsyBzvVlZBX5RdfUjB2BOdRI7H2TDBBS-GZaMV3b2eS5_84JTySFnriCTXJ-Y1FzBnH60e4fTfAiYy1P_J-j9hyXjLYgtRu8jQd8ITfiFG3h4ZIysb4CA_lJNg_d4YuCqhBiZcpculcbfXlcrcfPV-CpDytfiLz34FDWH0Q7Vlna1YuSNOKPzDIUx1MOMZO9bpwaE6Q3kClkqri92-42yeLoUKH6PUrlMpE3JrfuBelALE4ce7QzCrNjcvoqR_KVmCm6ozBjPn9qY0s7x7qe6ZLur7hNUoX79JdWGZy1-bx8dSqqpLrU0SXbMBqtvch5FvdUkktbkJpZAr7q6e0nR13_mK3RTV7adOEw03E_ocUk__rEmjGDAHMSWGmiPowu14jD1-VZ2Yf8FeoKzHYcXmIbEReTVHshk9faBICMQzMS3SXaqow4WXqULZiLTwc"
--verbose

Response:

 {
   "list_dealers_response":{
      "status":"NOV",
      "esitef":{
         "message":"OK. Transaction successful.",
         "code":"0"
      },
      "authorizer":{
         "message":"",
         "code":"000"
      },
      "hashes":{
         "general":"09A9681D09A9681D"
      },
      "dealers":[
         {
            "name":"Vivo",
            "code":"001"
         },
         {
            "name":"Claro",
            "code":"002"
         },
         {
            "name":"Oi",
            "code":"003"
         },
         {
            "name":"Tim",
            "code":"004"
         }
      ]
   }
}

Request parameters

The table below describes the request parameters of the list dealers service:

ParameterDescriptionFormatMandatory
nitIdentification of the recharge transaction on Carat Portal= 64 ASIM
generalhashIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).= 16 ANÃO

Response parameters

If successful, the HTTP response code will be 200. Any other code must be interpreted as an error. The table below describes the response parameters of the list dealers service:

ParameterDescriptionFormat
statusStatus of the recharge transaction on Carat Portal. Learn more.= 3 AN
esitef
codeCarat Portal response code. Any code different from 0(zero) means failure. Learn more.< 4 N
messageCarat Portal response message.< 500 AN
authorizer
codeResponse code returned by the authorizer< 4 AN
messageMessage returned by the authorizer< 64 AN
hashes
generalIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).= 16 AN
dealers[]
codeDealer code= 3 N
nameDealer name< 100 AN
dealers[].branches[]
codeBranch code= 11 N
nameBranch name< 100 AN
questions[]
This field adds a list of questions for positive confirmation. The returned questions must, necessarily, be answered by the user and have their answers sent to Carat Portal in the next step (list branch data).
idQuestion identification code< 20 AN
displayText of the question to be presented< 180 AN
ruleIndicates where the data must be collected. Learn more.< 2 AN
minIndicates the minimum response size< 4 N
maxIndicates the maximum response size< 5 N
typeIndicates the data type of the response to be collected. Learn more.< 3 AN
min_valueIndicates the minimum response value< 3 N
max_valueIndicates the maximum response value< 3 N

Return of the questions.rule field

RuleDescription
0Operator keyboard
1PinPad (Not applicable)
2Magnetic track reading on PIN PAD (Not applicable)
3Automation (The question should not be presented to the operator / customer to collect the response. In this case, the automation itself must answer the question without operator / customer intervention).
4Supervisor password (not PINPAD)
5Operator keyboard with double typing.
The <Display> must contain two texts, the first one refers to the request for the input of the data and the second, refers to the confirmation of the input of the data, which must be the same as the first.

The texts must be separated by ; as informed below.

<Display> = Text for 1st collection; Text for 2nd collection (confirmation)
6Barcode reader
7Typing with confirmation (In this case, a screen must be displayed for confirmation of the collected data).

Return of the questions.type field

TypeDescription
AAlphabetical.
ANSpecial alphanumeric (ans).
LNLetters (not accented) and numbers.
NxNumeric where x is the number of decimal digits supported.
VxValue with x decimal digits.
SMenu type Yes / No.
ScMenu type Yes / No conditional. If the input is "No", the transaction must be aborted.
MFree menu.
In this case, the field will have the following format: the menu text must be separated by a | character from the options. The options, in turn, should consist of index and text separated by :, while one option is separated by the other by ^. That is:
= |<option 1>^<option 2>^...^
At where,
= Menu header text (Ex: Choose the banner of the card)
= : (Ex: 1:Visa)
McFree menu with confirmation.
Here is the Free Menu rule, where:
= |
M0Free menu type 0 (zero). (Not applicable)
It follows the rule of the Free Menu with confirmation, however, the selection indexes of the menu in the display must be suppressed and only selected with the POS arrows.
Free Menu Display Example:
1 – Yes
2 – No
Sample Free Menu Display Type 0:
Yes
No

List Branch Data

Brazil

Call details for recharge type normal

  • Resource: /v3/rechargebranches
  • HTTP Method: GET
  • Request format: query string
  • Response format: JSON

Call details for recharge type others

  • Resource: /v3/rechargebranches/{nit}
  • HTTP Method: PUT
  • Request format: JSON
  • Response format: JSON

Call details for recharge type invoice

  • Resource: /v3/rechargebranches/{nit}
  • HTTP Method: PUT
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
Content-TypeIt must be sent with the value application/json.= 15 ANYES
AuthorizationAuthenticity signature in Bearer {signature} format. Learn more.

Example: Bearer hh39458f73hf45324765ft349h5f73t4h95f34.

This field is mandatory if the transaction was created with the signature process.
< 2000 ANCOND.

Examples

Below are some examples of the list branch data service call using the cURL tool.

List branch data for recharge type normal

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request GET "https://{{url}}/e-sitef/v3/rechargebranches?nit=asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678&ddd=00&dealercode=1&generalhash=0000000000000000"
--verbose

Response:

 {
   "list_branch_data_response":{
      "status":"NOV",
      "esitef":{
         "message":"OK. Transaction successful.",
         "code":"0"
      },
      "sitef":{
         "code":"000"
      },
      "hashes":{
         "general":"09A9681D09A9681D"
      },
      "questions":[
         {
            "id":"5",
            "display":"Qual o nome do seu pai?",
            "rule":"3",
            "min":"5",
            "max":"30",
            "type":"i"
         }
      ],
      "general":[
         {
            "message":"MENSAGEM DE TESTE"
         }
      ],
      "categories":[
         {
            "code":"01",
            "description":"RECARGA",
            "amount_ranges":[
               {
                  "message":"MSG_FAIXA_1",
                  "amount_key":"7",
                  "bonus_in_percentage":"100",
                  "bonus":"50",
                  "payment_amount":"700",
                  "bonus_category":"1",
                  "expiry_date":"30",
                  "bonus_expiry_date":"15",
                  "min_amount":"500",
                  "max_amount":"10000"
               },
               {
                  "message":"MSG_FAIXA_2",
                  "amount_key":"8",
                  "bonus_in_percentage":"500",
                  "bonus_category":"2",
                  "min_amount":"1000",
                  "max_amount":"50000"
               }
            ],
            "fixed_amounts":[
               {
                  "bonus":"50",
                  "message":"MSG_FIXO_1",
                  "amount":"300",
                  "amount_key":"1",
                  "bonus_category":"2",
                  "bonus_in_percentage":"200",
                  "payment_amount":"10",
                  "expiry_date":"60",
                  "bonus_expiry_date":"15"
               },
               {
                  "message":"MSG_FIXO_2",
                  "amount":"1500",
                  "amount_key":"2",
                  "payment_amount":"30"
               },
               {
                  "message":"MSG_FIXO_3",
                  "amount":"2000",
                  "amount_key":"3"
               },
               {
                  "amount":"2200",
                  "amount_key":"4",
                  "expiry_date":"90"
               },
               {
                  "message":"MSG_FIXO_4",
                  "amount":"5000",
                  "amount_key":"6",
                  "expiry_date":"120"
               }
            ]
         },
         {
            "code":"02",
            "description":"SMS",
            "amount_ranges":[

}

List branch data for recharge type others

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request PUT "https://{{url}}/e-sitef/v3/rechargebranches/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--header "Content-Type: application/json"
--data-binary
{
   "list_branch_data_request":{
      "general_hash":"0000000000000000",
      "dealer":{
         "code":"901",
         "type_code":"03",
         "branch":{
            "code":"98006000000"
         }
      }
   }
}
--verbose

Response:

 {
   "list_branch_data_response":{
      "status":"NOV",
      "esitef":{
         "message":"OK. Transaction successful.",
         "code":"0"
      },
      "sitef":{
         "code":"000"
      },
      "hashes":{
         "general":"09A9681D09A9681D"
      },
      "questions":[

}

List branch data for recharge type invoice

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request PUT "https://{{url}}/e-sitef/v3/rechargebranches/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--header "Content-Type: application/json"
--data-binary
{
   "list_branch_data_request":{

}

Response:

 {
    "list_branch_data_response": {
        "status": "NOV",
        "esitef": {
            "message": "OK. Transaction successful.",
            "code": "0"
        },
        "sitef": {
            "message": "Transacao Aprovada",
            "code": "000"
        },
        "host": {
            "message": "Vivo SP Pos",
            "code": "00"
        },
        "acquirer": {
            "merchant_code": "302800000000000"
        },
        "authorization": {
            "authorizer_date": "0831",
            "authorizer_time": "153738",
            "host_usn": "000310003",
            "sitef_usn": "310003",
            "number": "000000"
        },
        "hashes": {
            "general": ""
        },
        "questions": [],
        "payment_methods": {
            "max": "4",
            "available": [
                "00",
                "01",
                "02:03-07-08-09-10-14",
                "03:03-07-08-09-10-14",
                "04:10",
                "05:10",
                "06:10"
            ]
        },
        "general": [],
        "categories": [
            {
                "amount_ranges": [],
                "fixed_amounts": []
            }
        ],
        "invoices": [
            {
                "expiry_date": "21082007                                                                                                                                                                                                                                                      ",
                "consumption_reference": "082007                                                                                                                                                                                                                                                        ",
                "bar_code": "84600000000633900800011200241676508075070821                                                                                                                                                                                                                  ",
                "amount": "6339                                                                                                                                                                                                                                                          ",
                "message": "Boleto Parcial Credito Manual                                                                                                                                                                                                                                 "
            },
            {
                "expiry_date": "25072007                                                                                                                                                                                                                                                      ",
                "consumption_reference": "072007                                                                                                                                                                                                                                                        ",
                "bar_code": "84660000001866000800011200243533509074070925                                                                                                                                                                                                                  ",
                "amount": "18660                                                                                                                                                                                                                                                         ",
                "message": "Boleto Parcial Credito Manual                                                                                                                                                                                                                                 "
            },
            {
                "expiry_date": "25092007                                                                                                                                                                                                                                                      ",
                "consumption_reference": "092007                                                                                                                                                                                                                                                        ",
                "bar_code": "84650000000442500800011000217664609076070925                                                                                                                                                                                                                  ",
                "amount": "4425                                                                                                                                                                                                                                                          ",
                "message": "Boleto Parcial Credito Manual                                                                                                                                                                                                                                 "
            },
            {
                "expiry_date": "10092007                                                                                                                                                                                                                                                      ",
                "consumption_reference": "082007                                                                                                                                                                                                                                                        ",
                "bar_code": "84610000001385700800011200474416708073070910                                                                                                                                                                                                                  ",
                "amount": "13857                                                                                                                                                                                                                                                         ",
                "message": "Boleto Parcial Credito Manual                                                                                                                                                                                                                                 "
            },
            {
                "expiry_date": "25082007                                                                                                                                                                                                                                                      ",
                "consumption_reference": "082007                                                                                                                                                                                                                                                        ",
                "bar_code": "84650000001165200800011200243533508078070825                                                                                                                                                                                                                  ",
                "amount": "11652                                                                                                                                                                                                                                                         ",
                "message": "Boleto Parcial Credito Manual                                                                                                                                                                                                                                 "
            },
            {
                "expiry_date": "21092007                                                                                                                                                                                                                                                      ",
                "consumption_reference": "092007                                                                                                                                                                                                                                                        ",
                "bar_code": "84690000019276900800011200245374209078070921                                                                                                                                                                                                                  ",
                "amount": "192769                                                                                                                                                                                                                                                        ",
                "message": "Boleto Parcial Credito Manual                                                                                                                                                                                                                                 "
            }
        ],
        "tv_package_subscription_codes": [],
        "invoice_holder_name": "",
        "echo": "12340000000"
    }
}

Request parameters for recharge type normal

The table below describes the request parameters of the list branch data service for recharge type normal:

ParameterDescriptionFormatMandatory
nitIdentification of the recharge transaction on Carat Portal= 64 ANYES
dddPhone area code= 2 NYES
dealercodeDealer code< 3 NYES
generalhashIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).= 16 ANNO

Request parameters for recharge type others

The table below describes the request parameters of the list branch data service for recharge type others:

ParameterDescriptionFormatMandatory
nitIdentification of the recharge transaction on Carat Portal. Attention: This field goes in the URL of the request, not in the body.= 64 ANYES
dddPhone area code (DDD)= 2 NNO
general_hashIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).= 16 ANNO
dealer
Dealer information. This information is returned on the list dealers call.
codeDealer code< 3 NYES
type_codeDealer type code< 3 NYES
dealer.branch
Information about the dealer's affiliate
codeDealer branch code< 11 NYES
answers[]
This field adds a list of answers. Mandatory if questions were received on the list dealers service.
codeQuestion code to be answered ( questions.id of the list dealers service response)< 20 ANCOND.
descriptionAnswer of the question< 200 ANCOND.

Request parameters for recharge type invoice

The table below describes the request parameters of the list branch data service for recharge type invoice:

ParameterDescriptionFormatMandatory
nitIdentification of the recharge transaction on Carat Portal. Attention: This field goes in the URL of the request, not in the body.= 64 ANYES
general_hashIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).= 16 ANNO
dealer
Dealer information. This information is returned on the list dealers call.
codeDealer code< 3 NYES
dealer.branch
Information about the dealer's affiliate
codeDealer branch code< 11 NYES
answers[]
This field adds a list of answers. Mandatory if questions were received on the list dealers service.
codeQuestion code to be answered ( questions.id of the list dealers service response)< 20 ANCOND.
descriptionAnswer of the question< 200 ANCOND.

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 list branch data service:

ParameterDescriptionFormat
statusStatus of the recharge transaction on Carat Portal. Learn more.= 3 AN
invoice_holder_nameInvoice holder name< 70 AN
echoField to be resent for recharge of the type invoice< 128 AN
resubmit_transactionIndicates that this transaction should be resent with the selected TV subscription code.< 5 AN
esitef
codeCarat Portal response code. Any code different from 0(zero) means failure. Learn more.< 4 N
messageCarat Portal response message.< 500 AN
sitef
codeResponse code returned by the authorizer< 4 AN
hashes
generalIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).= 16 AN
questions[]
This field adds a list of questions for positive confirmation. The returned questions must be answered by the user and have their answers sent to Carat Portal in the next step (recharge)
idQuestion identification code< 20 AN
displayText of the question to be presented< 180 AN
ruleIndicates where the data must be collected. Learn more.< 2 AN
minIndicates the minimum response size< 4 N
maxIndicates the maximum response size< 5 N
typeIndicates the data type of the response to be collected. Learn more.< 3 AN
min_valueIndicates the minimum response value< 3 N
max_valueIndicates the maximum response value< 3 N
general
This field adds a list of general characteristics among the branches.
messageGeneral message.< 101 AN
categories
This field adds a list of categories.
codeCategory code< 5 AN
descriptionDescriptive text of the category< 100 AN
categories.amount_ranges
This field adds a list of amount ranges.
messageRecharge information message< 100 AN
amount_keyRecharge amount key (to be sent when performing the recharge).< 5 AN
bonus_in_percentageRecharge bonus in percentage of face value (to 2 decimal places: eg 1% = 100).< 5 N
bonusRecharge bonus.< 12 N
payment_amountRecharge cost.< 12 N
bonus_categoryBonus category (must be one of the values of categories.code).< 5 AN
expiry_dateExpiration period (in days).< 4 N
bonus_expiry_dateExpiration period of the bonus (in days).< 4 N
min_amountMinimum value of the range, in cents.< 12 N
max_amountMaximum value of the range, in cents.< 12 N
categories.fixed_amounts
This field adds a list of fixed amounts.
messageRecharge information message< 100 AN
amount_keyRecharge amount key (to be sent when performing the recharge).< 5 AN
bonus_in_percentageRecharge bonus in percentage of face value (to 2 decimal places: eg 1% = 100).< 5 N
bonusRecharge bonus.< 12 N
payment_amountRecharge cost.< 12 N
bonus_categoryBonus category (must be one of the values of categories.code).< 5 AN
expiry_dateExpiration period (in days).< 4 N
bonus_expiry_dateExpiration period of the bonus (in days).< 4 N
amountRecharge amount, in cents.< 12 N
payment_methods
maxMaximum number of payment methods< 2 N
availableThis field adds a list of available payment methods and their details. Learn more.< 200 AN
host
messageInstitution name< 16 AN
codeInstitution response code< 12 AN
acquirer
merchant_codeEstablishment code< 15 N
authorization
numberAuthorization number< 6 AN
sitef_usnSitef usn< 6 N
host_usnHost usn< 12 N
authorizer_timeAuthorizer response time HHMMSS= 6 N
authorizer_dateAuthorizer response date MMDD= 4 N
invoices
This object contains fields returned on recharge transactions of type invoice
expiry_dateInvoice expiration date in format AAAAMMDD= 8 N
consumption_referenceInvoice reference date in format MMAAAA= 6 N
bar_codeInvoice bar code< 44 N
amountInvoice amount< 12 N
messageGeneral message< 64 AN

Return of the payment_methods.available field

The payment_methods.available field may contain one or more data for reading. Each read data has the following format:

TypeN:IDCollectionN1-IDCollectionN2-IDCollectionN3-...-IDCollectionNn

Where:

TypeN: indicates the allowed payment method.

TypeDescription
00Money
01Check
02EFT Debit
03EFT Credit
10Electronic Ticket
11Paper Ticket
12Digital Wallet
13PIX
50EFT Cards
99Other Forms

Notes:

  • If there are no fields to be collected, only the TypeN field is returned.
  • In the future, new payment methods can be added to this table. If the POS does not know one of these new methods, it should be prepared to "skip" only this method, without affecting its processing.
  • The "EFT Card" payment method (type 50) is used to group all payment methods involving cards (types 02 and 03) into a single type.

IDCollectionNn: Indicates the field ID that the POS must collect and send to SiTef.

IDDescriptionMeaning and Format
01Cheque input type 0: CMC-7 input
1: typing the first line of the cheque
2: typing the CMC-7
02Cheque data- CMC-7 read or typed
- Enter the first line of the cheque, in the following format: Compensation (3), Bank (3), Agency (4), C1 (1), Current Account (10), C2 (1), Cheque Number (6) and C3 (1), in this order.
03Destination NetworkIdentification of the authorization of the EFT transaction (according to the Destination Network table from the SiTef specification).
04SiTef USN of the EFT TransactionIdentification of the EFT transaction on SiTef.
05SiTef date of the EFT Transaction
(currently, not used)
Date of the EFT transaction on SiTef in DDMMYYYY format.
06EFT Transaction Company CodeSiTef code for the Company used on the EFT transaction.
07EFT Transaction Host USNIdentification of the EFT transaction on the Host.
08EFT Transaction Host DateDate of the EFT transaction on the Host, in DDMMYYYY format.
09EFT Transaction Source CodeEstablishment Code of the EFT transaction.
10Confirmation data of the EFT transaction.Field 9 returned when performing the EFT transaction.
11EFT Transaction Authorization CodeHost Authorization Code for the EFT transaction.
12Cheque AmountTotal Cheque Amount. A same cheque can be used to pay more than one account.
13Destination Network - ComplementComplement of ID 03 (See note 1 below)
14Card IssuerIssuer of the card used on the EFT transaction.
15Payment Type 00 - spot sale
01 - Pre-dated
02 - Installments without interest
03 - Installments with interest

Notes:

The field with ID 13, different from the others, does not indicate a field to be collected. This field works as a complement to field ID 03, sending a list of allowed destination networks in the following format:

13 (Network1, Network2, ..., NetworkN)

That is, if only the field ID 03 is present, it must be a destination network, without any restriction of access to networks that can pay a particular transaction (Example: recharge). However, if the indicators ID 03 and 13 are present, the first indicates that the destination network must be collected, while the second indicates which destination networks are allowed to pay the recharge.

In addition, as the collection was indicated by ID 03, the POS must send the destination network to SiTef also via this ID (and not via ID 13).

In the future, new fields can be added to this table. If the POS does not recognize one of the new fields, it must be prepared to "skip" only this field, without affecting its process.

---

Recharge Effectuation

Brazil

Call details

  • Resource: /v3/recharge/{nit}
  • HTTP Method: PUT
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
Content-TypeIt must be sent with the value application/json.= 15 ANYES
AuthorizationAuthenticity signature in Bearer {signature} format. Learn more.

Example: Bearer hh39458f73hf45324765ft349h5f73t4h95f34.

This field is mandatory if the transaction was created with the signature process.
< 2000 ANCOND.

Examples

Below are some examples of the recharge effectuation service call using the cURL tool.

Recharge type normal with payment

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
curl 
--request PUT "https://{{url}}/e-sitef/v3/recharge/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--header "Content-Type: application/json"
--data-binary
{
   "do_recharge_request":{
      "hashes":{
         "general":"0000000000000000"
      },
      "dealer":{
         "code":"1",
         "type_code":"03",
         "branch":{
            "code":"98006000000"
         }
      },
      "phone":{
         "ddd":"11",
         "number":"123456789"
      },
      "amount":"3000",
      "amount_key":"3",
      "used_payment_methods":[
         "11",
         "12"
      ],
      "answers":[
         {
            "code":"1",
            "description":"resposta"
         },
         {
            "code":"2",
            "description":"resposta2"
         }
      ],
      "terminal_type":"03",
      "cpf":"8298374982374",
      "cnpj":"123121333000123",
      "zip_code":"01310100",
      "payment":{
         "amount":"12",
         "authorizer_id":"1",
         "customer_id":"12341234",
         "merchant_key":"OIAUSWHFN012375901J23047FNN00UYWHN0R871Y2ND87",
         "installment":{
            "number":"2",
            "type":"4"
         },
         "card":{
            "number":"1111111111111111",
            "token":"",
            "security_code":"123",
            "expiry_date":"1222"
         },
         "extra_param":[
            {
               "key":"CRIPTO",
               "value":"1"
            }
         ]
      }
   }
}
--verbose

Response:

{
   "do_recharge_response":{
      "status":"PPC",
      "order_id":"12344231",
      "merchant_usn":"5123",
      "esitef":{
         "message":"OK",
         "code":"0",
         "usn":"123456789012345"
      },
      "sitef":{
         "message":"OK",
         "code":"0"
      },
      "host":{
         "message":"OK",
         "code":"0"
      },
      "acquirer":{
         "branch_code":"cod filial",
         "merchant_code":"codigoEstab"
      },
      "authorization":{
         "confirmation_data":"000033333",
         "authorizer_date":"20150514",
         "authorizer_time":"1100",
         "host_usn":"11122",
         "sitef_usn":"333",
         "number":"332234"
      },
      "customer":{
         "total_copies":3,
         "receipt":"COMPROVANTE DE RECARGA via do cliente"
      },
      "merchant":{
         "total_copies":3,
         "receipt":"COMPROVANTE DE RECARGA via do estabelecimento"
      },
      "payment_methods":{
         "max":4,
         "available":[
            {
               "name":"dinheiro"
            },
            {
               "name":"cheque"
            }
         ]
      },
      "payment":{
         "status":"PPC",
         "amount":"12",
         "type":"C",
         "esitef":{
            "usn":"098765432109876",
            "date":"12/12/2012 12:12"
         },
         "customer":{
            "receipt":"nwiugrnboinb APROVADO via do cliente"
         },
         "merchant":{
            "receipt":"nwiugrnboinb APROVADO via do estabelecimento "
         },
         "authorizer_id":"1",
         "acquirer":"CIELO",
         "authorization":{
            "number":"163457212",
            "sitef_usn":"456456",
            "host_usn":"654654",
            "tid":"7334312a2",
            "eci":"fr3u214wf71",
            "sitef_date":"12122012"
         },
         "analysis":{
            "status":"PEN",
            "code":"0",
            "message":"aprovado"
         },
         "extra_param":[
            {
               "key":"CRIPTO",
               "value":"1"
            }
         ],
         "sitef":{
            "code":"000"
         }
      }
   }
}

Recharge type normal without payment

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request PUT "https://{{url}}/e-sitef/v3/recharge/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--header "Content-Type: application/json"
--data-binary
{
   "do_recharge_request":{
      "dealer":{
         "code":"1"
      },
      "phone":{
         "ddd":"11",
         "number":"123456789"
      },
      "amount":"3000"
   }
}
--verbose

Response:

 {
   "do_recharge_response":{
      "status":"PPC",
      "order_id":"12344231",
      "merchant_usn":"5123",
      "esitef":{
         "message":"OK",
         "code":"0",
         "usn":"123456789012345"
      },
      "sitef":{
         "message":"OK",
         "code":"0"
      },
      "host":{
         "message":"OK",
         "code":"0"
      },
      "acquirer":{
         "branch_code":"cod filial",
         "merchant_code":"codigoEstab"
      },
      "authorization":{
         "confirmation_data":"000033333",
         "authorizer_date":"20150514",
         "authorizer_time":"1100",
         "host_usn":"11122",
         "sitef_usn":"333",
         "number":"332234"
      },
      "customer":{
         "total_copies":3,
         "receipt":"COMPROVANTE DE RECARGA via do cliente"
      },
      "merchant":{
         "total_copies":3,
         "receipt":"COMPROVANTE DE RECARGA via do estabelecimento"
      },
      "payment_methods":{
         "max":4,
         "available":[
            {
               "name":"dinheiro"
            },
            {
               "name":"cheque"
            }
         ]
      }
   }
}

Recharge type others

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request PUT "https://{{url}}/e-sitef/v3/recharge/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--header "Content-Type: application/json"
--data-binary
{
   "do_recharge_request":{
      "dealer":{
         "code":"901",
         "type_code":"03",
         "branch":{
            "code":"98006000000"
         }
      },
      "amount":"3000"
   }
}
--verbose

Response:

 {
   "do_recharge_response":{
      "status":"PPC",
      "order_id":"12344231",
      "merchant_usn":"5123",
      "esitef":{
         "message":"OK",
         "code":"0",
         "usn":"123456789012345"
      },
      "sitef":{
         "message":"OK",
         "code":"0"
      },
      "host":{
         "message":"OK",
         "code":"0"
      },
      "acquirer":{
         "branch_code":"cod filial",
         "merchant_code":"codigoEstab"
      },
      "authorization":{
         "confirmation_data":"000033333",
         "authorizer_date":"20150514",
         "authorizer_time":"1100",
         "host_usn":"11122",
         "sitef_usn":"333",
         "number":"332234"
      },
      "customer":{
         "total_copies":3,
         "receipt":"COMPROVANTE DE RECARGA via do cliente"
      },
      "merchant":{
         "total_copies":3,
         "receipt":"COMPROVANTE DE RECARGA via do estabelecimento"
      }
   }
}

Recharge type invoice

Request:

To use this example, don't forget to define the variable {{url}} with the value

Bash
 curl 
--request PUT "https://{{url}}/e-sitef/v3/recharge/asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678"
--header "Content-Type: application/json"
--data-binary
{
   "do_recharge_request":{
      "hashes":{
         "general":"85E791AD85E791AD"
      },
      "dealer":{
         "code":"800",
         "branch":{
            "code":"80019000000"
         }
      },
      "amount":"6339",
      "terminal_type":"04",
      "cpf":"12312312312",
      "cnpj":"11110110000101",
      "zip_code":"12345678",
      "invoice":{
         "bar_code":"88888888888888888888888888888888888888888888",
         "description":"Boleto Parcial Credito Manual",
         "expiry_date":"21082007",
         "reference_data":"082007",
         "echo":"12340000000"
      }
   }
}
--verbose

Response:

 {
   "do_recharge_response":{
      "status":"PPC",
      "order_id":"31045431771",
      "merchant_usn":"2047986911",
      "esitef":{
         "message":"OK. Transaction successful.",
         "code":"0",
         "usn":"200831056294572"
      },
      "sitef":{
         "message":"Transacao Aprovada",
         "code":"000"
      },
      "acquirer":{
         "merchant_code":"302800000000000"
      },
      "authorization":{
         "confirmation_data":"0831310011A6",
         "authorizer_date":"0831",
         "authorizer_time":"165459",
         "host_usn":"000310011",
         "sitef_usn":"310011",
         "number":"000000"
      },
      "customer":{
         "receipt":"----- RECEIPT -----"
      },
      "merchant":{
         "receipt":"----- RECEIPT -----"
      },
      "payment_methods":{
         "max":"4",
         "available":[
            {
               "name":"00"
            },
            {
               "name":"01"
            },
            {
               "name":"02:03-07-08-09-10-14"
            },
            {
               "name":"03:03-07-08-09-10-14"
            },
            {
               "name":"04:10"
            },
            {
               "name":"05:10"
            },
            {
               "name":"06:10"
            }
         ]
      },
      "hashes":{
         "general":"85E791AD85E791AD",
         "wallet":""
      },
      "send_payment_methods":"true"
   }
}

Request parameters

The table below describes the request parameters of the recharge effectuation service:

ParameterDescriptionFormatMandatory
nitIdentification of the recharge transaction on Carat Portal= 64 ANYES
amountRecharge amount in cents< 12 NYES
amount_keyRecharge amount key< 10 ANNO
terminal_type 01 - POS
02 - TU
03 - TAS
04 - Internet
05 - POS-Sitef/POS
= 2 NNO
cpfCustomer CPF< 20 ANNO
cnpjCustomer CNPJ< 20 ANNO
zip_codeCustomer zip code< 9 ANNO
hashes
generalIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).= 16 ANNO
dealer
codeDealer code< 3 NYES
type_codeDealer type code< 2 NYES
dealer.branch
codeDealer branch code. Only mandatory for recharge type others.11 NCOND.
phone
phone.dddPhone area code (DDD). Only mandatory for recharge type normal.= 2 NCOND.
phone.numberPhone number. Only mandatory for recharge type normal.< 9 NCOND.
answers[]
This field adds a list of answers. Mandatory if questions were received on the list branch data service.
codeCode of the question to be answered< 20 ANCOND.
descriptionAnswer of the question< 200 ANCOND.
invoice
This object contains mandatory fields for invoice payment (recharge type invoice).
bar_codeBar code of the chosen invoice.= 48 NYES for invoice type
descriptionDescription of the chosen invoice.< 64 ANYES for invoice type
expiry_dateExpiry date of the chosen invoice in DDMMYYYY format.= 8 NYES for invoice type
reference_dataReference data of the chosen invoice.< 32 ANYES for invoice type
echo echo field value as received on the list branch data call.< 11 NYES for invoice type
payment
This element should only be sent if you want to make a payment linked to the recharge.*

Attention: Payment is only allowed in the normal recharge type. For the others recharge type the transaction will be invalidated.
amountPayment amount in cents< 12 NYES*
authorizer_idAuthorizer ID on Carat Portal. Learn more.< 5 NYES*
customer_idIdentity document of the customer. Use alphanumeric characters only< 20 ANNO
merchant_keyMerchant key registered on Carat Portal. Must be the same merchant used to do the recharge.< 80 ANYES*
payment.installment
numberNumber of installments< 2 NYES*
typeInstallment financing type:
3 - installments with interest
4 - installments without interest (use this value as default for spot sales)
6 - installments with interest (IATA)
7 - installments without interest (IATA)
= 1 NYES*
payment.card
numberCard number.< 19 NYES*
tokenCard token stored on Carat Portal.= 88 ANYES*
security_codeOptional field, if sent, the main SiTef merchant code will be used instead of the recurrence code (which does not require a security code). It's mandatory depending on the agreement signed with the Card Administrators.< 5 NCOND.
expiry_dateExpiry date in MMYY format= 4 NYES*
payment.extra_param[]
This field adds a list of extra parameters.
keyExtra parameter keyN/ANO
valueExtra parameter valueN/ANO
used_payment_methods[]
Used payment methods. This field adds a list of values that must be sent as described below.

Sending the used_payment_methods field

The store must use the used_payment_methods field itself to indicate to Carat Portal which payment methods were used to pay for a particular transaction, such as a recharge.

The amount of data to be written to the used_payment_methods field is limited by the payment_methods.max field. If, for example, the value 3 has been received in the payment_methods.max field, then the store can only store 3 information in the used_payment_methods field.

For each used payment method, an element (given) must be saved in the used_payment_methods field. The data to be saved in the used_payment_methods field has the following format:

TypeN:AmountN:IDCollectionN1:CollectionDataN1-IDCollectionN2:CollectionDataN2-...-IDCollectionNn:CollectionDataNn

Where:

  • TypeN: indicates the used payment method (as shown in the table above).
  • AmountN: indicates the amount used with this payment method, with two decimal digits, without the comma.
  • IDCollectionNn: indicates the field ID that was collected by the store (as shown in the table above).
  • CollectionDataNn: Indicates the content collected by the store for this field.

Notes:

If for a given payment method no field must be collected by the store, the used_payment_methods field must be valued with the following data: TypeN:AmountN.

The consistency of the values (sum of the various used payment methods, totaling the value of the transaction made) must be done by the store, and Carat Portal will only use the values the same way they were sent.

Example

Let's assume that in the execution of a recharge transaction, the store got the value 2 in the payment_methods.max field and the following values of the used_payment_methods field:

 00
02:03-07-10-13(5,125)
03:10

The value 2 received in the payment_methods.max field indicates to the store that the payment of the recharge can only be done with a maximum of 2 different payment methods.

Assuming that the payment of the recharge was done as follows: R$ 30.00 in cash and R$ 20.00 with debit card processed by the acquirer Rede (Destination Network = 5; Host USN = 123456789; Confirmation data = 0520200001A6). In this case, the used_payment_methods field should be valued with the following data:

 00:3000
02:2000:03:5-07:123456789-10:0520200001A6

Sending card data for payment

If it's desired to send the card token stored on Carat Portal, the other card data ( card.number, card.expiry_date) will not be considered. If you want to send the open card data, the token should not be sent.

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 effectuation service:

ParameterDescriptionFormat
statusStatus of the recharge transaction on Carat Portal. Learn more.= 3 AN
order_idOrder code generated by the store.< 20 AN
merchant_usnUSN of the transaction generated by the store.< 12 N
tv_package_subscription_codes[]TV package subscription codes.< 32 AN
resubmit_transactionIf this field receives the value true, the merchant must resend the recharge effectuation request with the answers field filled in as follows:

"answers":[{"code":"126","description":"<one the codes returned in the tv_package_subscription_codes field>"}]

In this case, the transaction status will be returned as AGU.

This flow is only possible on a TV Recharge.
T/F
send_payment_methodsFlag that indicates that the payment methods must be sent on the next transaction. It will have the value true when positive.< 5 AN
esitef
codeCarat Portal response code. Any code different from 0(zero) means failure. Learn more.< 4 N
messageCarat Portal response message.< 500 AN
usnUSN of the recharge transaction on Carat Portal= 15 N
sitef
codeSiTef response code= 3 AN
messageSiTef response message< 500 AN
host
codeResponse code returned by the authorizer< 4 AN
messageMessage returned by the authorizer< 64 AN
acquirer
branch_codeRecharge branch code< 5 N
merchant_codeMerchant code registered on the acquirer< 15 N
authorization
confirmation_dataConfirmation code< 128 AN
authorizer_dateAuthorization date on the authorizer in MMDD format= 4 N
authorizer_timeAuthorization time on the authorizer in HHmmSS format= 6 N
host_usnHost USN< 20 N
sitef_usnSiTef USN< 10 N
numberAuthorization number< 6 N
customer
total_copiesNumber of copies of the customer receipt< 2 N
receiptCustomer receipt< 4000 AN
merchant
total_copiesNumber of copies of the merchant receipt< 2 N
receiptMerchant receipt< 4000 AN
hashes
generalIdentification code of the table with the data related to the recharges (dealers, branches, amount ranges, expiration periods, among others).= 16 AN
walletWallet hash.< 32 AN
payment_methods
maxMaximum number of payment methods< 2 N
payment_methods.available[]
This field adds a list of available payment methods.
nameName of the available payment method. Learn more.< 200 AN
payment
This element is only returned if a payment related to a recharged was sent.
statusStatus of the payment transaction on Carat Portal. Learn more.= 3 AN
amountAmount of the payment, the same sent on the creation of the payment transaction.< 12 AN
typePayment type of the chosen authorizer:
  • B = boleto
  • C = credit
  • D = debit
  • P = credit card Private Label
  • T = bank transfer
  • G = gift card
  • O = other payment methods
= 1A
authorizer_idAuthorizer ID on Carat Portal< 5 N
acquirerPayment type< 50 AN
payment.esitef
usnCarat Portal USN< 15 AN
datePayment date on Carat Portal in DD/MM/YYYY hh:mm format.< 19A
payment.sitef
codeResponse code returned by SiTef= 3 AN
payment.customer
receiptPayment customer receipt< 4000 AN
payment.merchant
receiptPayment merchant receipt< 4000 AN
payment.authorization
numberPayment authorization number< 6 AN
sitef_usnSiTef USN< 15 AN
host_usnAuthorizer USN< 15 AN
tidID of the transaction on the authorizer, returned by some payment types.< 40 AN
eciEletronic commerce indicator returned by some payment types.< 3 AN
sitef_datePayment date on SiTef in DD/MM/YYYY hh:mm format.< 19 AN
payment.analysis
statusStatus of the transaction on the analysis institution.= 3 AN
codeResponse code of the risk analysis.< 4 AN
messageResponse message of the risk analysis.< 100 AN
payment.extra_param[]
keyExtra parameter keyN/A
valueExtra parameter valueN/A

Important:

In the case of recharges of other products (pins, games), the pin will be returned only once as part of the payment.customer.receipt field. Because it is a sensitive field, Carat Portal does not store it, so subsequent status queries will not return the pin. If a problem occurs after the return of the pin by Carat Portal, the pin can't be recovered and it will be necessary to generate another pin.

---

Recharge Confirmation

Brazil

Call details

  • Resource: /v3/recharge/{nit}
  • HTTP Method: PUT
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
Content-TypeIt must be sent with the value application/json.= 15 ANYES
AuthorizationAuthenticity signature in Bearer {signature} format. Learn more.

Example: Bearer hh39458f73hf45324765ft349h5f73t4h95f34.

This field is mandatory if the transaction was created with the signature process.
< 2000 ANCOND.

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:

ParameterDescriptionFormatMandatory
confirmIt 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).
< 5 ANYES
merchant_keyMerchant key on Carat Portal used on the recharge transaction.< 80 ANYES
used_payment_methods[]Payment methods used to recharge. The user must follow the same rules described in Recharge effectuation service corresponding chapter 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.COND.

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:

ParameterDescriptionFormat
statusStatus of the recharge transaction on Carat Portal. Learn more.= 3 AN
esitef
codeCarat Portal response code. Any code different from 0(zero) means failure. Learn more.< 4 N
messageCarat Portal response message.< 500 AN
payment
statusStatus of the payment transaction on Carat Portal, if it exists. Learn more.= 3 AN
---

Did this page help you?