Quick Start

Brazil

This guide show the process of scheduling recurrent payments, 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:///e-sitef/api/v1/transactions

Headers:

  • Content-Type: application/json
  • merchant_id: {your merchant id}
  • merchant_key: {your merchant key}

Request:

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

{
  "merchant_usn": "12055523043",
  "order_id": "12055523043",
  "authorizer_id": "2",
  "schedule": {
    "amount": "1",
    "do_payment_now": "false",
    "initial_date": "03/08/2025",
    "number_of_times": "3",
    "interval": "1",
    "soft_descriptor": "Assinatura",
    "show_times_invoice": "false"
  },
  "additional_data": {
    "payer": {
      "store_identification": "98253053045"
    }
  }
}
curl
--request POST "https://{{url}}/api/v1/transactions"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxxxxxxxxx"
--data-binary
{
   "merchant_usn":"12055523043",
   "order_id":"12055523043",
   "authorizer_id":"2",
   "schedule":{
      "amount":"1",
      "do_payment_now":"false",
      "initial_date":"03/08/2025",
      "number_of_times":"3",
      "interval":"1",
      "soft_descriptor":"Assinatura",
      "show_times_invoice":"false"
   },
   "additional_data":{
      "payer":{
         "store_identification":"98253053045"
      }
   }
}
--verbose

Response:

{
  "code": "0",
  "message": "OK. Transaction successful.",
  "schedule": {
    "status": "NOV",
    "sid": "<sid>",
    "amount": "1",
    "order_id": "12055523043",
    "merchant_usn": "12055523043"
  }
}

Learn more about this service.

Activating the schedule

HTTP method: POST

URL: https:///e-sitef/api/v1/schedules/<sid>

Replace the field <sid> in the URL above with the SID obtained in the transaction creation step.

Headers:

  • Content-Type: application/json
  • merchant_id: {your merchant id}
  • merchant_key: {your merchant key}

Request:

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

{
  "card": {
    "number": "5555555555555555",
    "expiry_date": "1222"
  }
}
curl
--request POST "https://{{url}}/e-sitef/api/v1/schedules/<sid>"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--header "Content-Type: application/json"
--data-binary
{
   "card":{
      "number":"5555555555555555",
      "expiry_date":"1222"
   }
}
--verbose

Response:

{
  "code": "0",
  "message": "OK. Transaction successful.",
  "schedule": {
    "status": "ATV",
    "sid": "<sid>",
    "schedule_usn": "170713000000040",
    "amount": "1",
    "initial_date": "03/08/2025",
    "next_date": "03/08/2025",
    "number_of_times": "3",
    "soft_descriptor": "Assinatura",
    "show_times_invoice": "false"
  }
}

Learn more about this service.

Checking the schedule status

HTTP method: GET

URL: https:///e-sitef/api/v1/schedules/<sid>

Replace the field <sid> in the URL above with the SID obtained in the transaction creation step.

Headers:

  • Content-Type: application/json
  • merchant_id: {your merchant id}
  • merchant_key: {your merchant key}

Request:

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

curl
--request GET "https://{{url}}/e-sitef/api/v1/schedules/<sid>"
--header "merchant_id: xxxxxxxxxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--verbose

Response:

{
  "code": "0",
  "message": "OK. Transaction successful.",
  "schedule": {
    "status": "ATV",
    "sid": "<sid>",
    "schedule_usn": "170713000000050",
    "authorizerId": "2",
    "amount": "1",
    "initial_date": "03/08/2025",
    "next_date": "03/08/2025",
    "number_of_times": "3",
    "current_times": "0",
    "soft_descriptor": "Assinatura",
    "show_times_invoice": "false"
  }
}

Learn more about this service.