Activate Schedule

Brazil

import ResponseCodes from './codigos-de-resposta.md';
import ApiDoc from '../../../../../src/components/api-doc/ApiDoc';

After creating a schedule without immediate payment and obtaining a SID, it’s possible to proceed to the next step of the flow: calling the schedule activation service. For schedules with immediate payment, use the payment effectuation service instead.

Call details

  • Resource: /v1/schedules/{sid}
  • HTTP Method: POST
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
merchant_idMerchant code on Carat Portal. The production and certification codes will be different.< 15 ANYES
merchant_keyMerchant authentication key on Carat Portal. The production and certification keys will be different.< 80 ANYES
Content-TypeIt must be sent with the value application/json.= 15 ANYES

Examples

Below is an example of the schedule activation service call using the cURL tool.

Request:

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

curl 
--request POST "https://{{url}}/e-sitef/api/v1/schedules/qwertyuiopasdfghjklzxcvbnm0123456789qwertyuiopasdfghjklzxcvbnm01"
--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":"qwertyuiopasdfghjklzxcvbnm0123456789qwertyuiopasdfghjklzxcvbnm01",
      "schedule_usn":"170713000000040",
      "amount":"900",
      "initial_date":"03/08/2017",
      "next_date":"03/08/2017",
      "number_of_times":"3",
      "soft_descriptor":"Assinatura",
      "show_times_invoice":"false"
   }
}

Request parameters

The table below describes the request parameters of the schedule activation service:

ParameterDescriptionFormatMandatory
authorizer_idCode of the authorizer on Carat Portal. Learn more.
If this field wasn’t sent during the transaction creation phase, it will become mandatory when consuming the schedule activation service.
< 3 NCOND.
card Card data.
numberCustomer's card number (PAN).< 19 NYES
expiry_dateCard expiry date in MMYY format. Its requirement depends on the selected acquirer. In most cases, this field is mandatory.= 4 NCOND.
holderCard holder name. Only mandatory for payments with e-Rede, GetNet WS and VR (SmartNet).< 30 ANCOND.
tokenHASH of a card stored on Carat Portal. It's not allowed to send an ‘open' card number (number field) and a stored card (token field) on the same request.= 88 ANNO
wallet_transaction_idDigital wallet transaction ID. Currently, this functionality is only available to the Visa Checkout authorizer.
It isn't allowed to send an ‘open' card number (number field), a stored card (token field) and a wallet_transaction_id on the same request.
< 25 ANNO

Response parameters

If successful, the response code will be 201. Any other code must be interpreted as an error. The below describes the response parameters of the schedule activation service:

ParameterDescriptionFormat
codeCarat Portal response code. Any code different from 0(zero) means failure. Learn more.< 4 N
messageCarat Portal response message.< 500 AN
schedule
statusStatus of the schedule on Carat Portal. Learn more.= 3 AN
sidSchedule transaction identifier on Carat Portal.= 64 AN
schedule_usnUnique sequential number of the schedule on Carat Portal.= 15 N
authorizer_idCode of the authorizer to be used on the scheduled payments.= 4 N
amountAmount of the scheduled payments specified by the merchant (in cents) on the creation of the transaction.< 12 N
order_idOrder code sent by the merchant on the creation of the transaction.< 40 AN
merchant_usnUnique sequential number sent by the merchant on the creation of the transaction.< 12 N
initial_dateExecution date of the first scheduled payment in DD/MM/YYYY format.= 10 D
next_dateExecution date of the next scheduled payment in DD/MM/YYYY format.= 10 D
number_of_timesTotal quantity of scheduled payments.< 3 N
installmentsNumber of installments to be used on the scheduled payments.< 2 N
installment_typeFinancing type to be used on the scheduled payments.< 2 N
soft_descriptorAdditional text that will be presented alongside the name of the establishment in the credit card invoice. Learn more< 30 AN
show_times_invoiceFor finite time schedules, send this field with value true if you want to add at the end of the soft_descriptor field the current times/number of times (e.g. Subscription 3/12).< 5 T/F