Efetivar Pagamento de Débitos Veiculares

Essa funcionalidade possibilita aos clientes da Celcoin realizar a consulta completa dos débitos veiculares vinculados a um veículo, incluindo taxas, multas e pendências, de forma prática e simples.

Passos para Integrar

  1. Realizar autenticação na API - [API Reference]
  2. Efetivar pagamento de débitos veiculares - [API Reference]
    1. Receber o webhook com a confirmação do pagamento. (entity -> vehicledebts)
    2. Receber o webhook com os dados do comprovante de pagamento. (entity -> vehicledebts-receipt)
  3. Consultar o status de pagamento do débitos auto na API - [API Reference]


Fluxo de integração






Solicitar realização de pagamento.

cURL da chamada

curl --location 'https://sandbox.openfinance.celcoin.dev/baas/v2/vehicledebts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
  "account": "30023646056263",
  "clientRequestId": "58d6faf2-98f5-4cd5-b855-2adac6e2b985",
  "idConsult": "1ae8a57d-b15d-4b4b-b943-4cf76ebabca1",
  "debtIdList": [
    "string"
  ],
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}'

Exemplo de retorno

👍

Sucesso 200

{
  "version": "1.0.0",
  "status": "SUCCESS",
  "body": {
    "id": "58d6faf2-98f5-4cd5-b855-2adac6e2b985",
    "account": "30023646056263",
    "clientRequestId": "58d6faf2-98f5-4cd5-b855-2adac6e2b985",
    "idConsult": "string",
    "documentNumber": "11111111111",
    "totalAmount": 0,
    "vehicle": {
      "document": "11111111111",
      "licensePlate": "JFI8753",
      "renavam": "56387604559",
      "uf": "SP",
      "year": 0
    },
    "debtIdList": [
      {
        "debitId": "string",
        "id": "string",
        "clientRequestIdDebit": "string"
      }
    ],
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ]
  }
}

Error 400

{
  "version": "1.0.0",
  "status": "ERROR",
  "error": {
    "errorCode": "IVDBE002",
    "message": "É obrigatório informar o clientRequestId."
  }
}

Tabela de errorCode

CodeMessage
IVDBE002É obrigatório informar o clientRequestId.
IVDBE005O campo clientRequestId não pode conter mais de 200 caracteres.
IVDBE019O campo idConsult não pode conter mais de 200 caracteres.
IVDBE028necessario informar pelo menos 1 debtId.
IVDBE029Existem tags com keys duplicadas.
IVDBE030A quantidade maxima de tags é 20.
IVDBE031Existem tags com keys nulas ou vazias.
IVDBE032Existem tags com values nulos ou vazios.
IVDBE033É obrigatório informar o campo account.
IVDBE034O campo account ultrapassou os 20 caracteres permitidos.


Receber o retorno da consulta via Webhook

entity -> vehicledebts

{
	"entity": "vehicledebts",
	"createTimestamp": "2024-01-25T12:09:39.6491225",
	"status": "CONFIRMED",
	"body": {
		"account": "",
		"clientRequestId": "00003",
		"createDate": "2024-01-25T12:09:39.6491225",
		"debtId": "E6D1E0E0-AD5E-4A1C-9E3C-91E02174A485",
		"documentNumber": "",
		"id": "34fee7bc-4d40-4605-9af8-398ed7d0d6b5",
		"lastUpdateDate": "2024-01-25T12:09:39.6491225",
		"metaDetran": {
			"amount": "134.20",
			"debitType": "ticket",
			"debtDescription": "Transitar velocidade superior a maxima permitida em ate 20%",
			"document": "39268450828",
			"dueDate": "2023-10-27T00:00:00",
			"licensePlate": "DIS9865",
			"nsuDetran": "000220114622",
			"renavam": "01203988813",
			"settlementBank": "BRADESCO",
			"settlementDateTime": "2023-10-27T19:05:12",
			"uf": "DF",
			"year": "2023"
		},
		"tags": [
			{
				"key": "string",
				"value": "string"
			}
		]
	}
}

entity -> vehicledebts-receipt

{
	"entity": "vehicledebts-receipt",
	"createTimestamp": "2024-01-25T12:09:39.6491225",
	"status": "SUCCESS",
	"body": {
		"account": "",
		"amount": 1009.36,
		"clientRequestId": "00003",
		"createDate": "2024-01-25T12:09:39.6491225",
		"debtId": "312D6A5F-2B5A-4694-84DA-F640FC01CC74",
		"documentNumber": "",
		"id": "34fee7bc-4d40-4605-9af8-398ed7d0d6b5",
		"lastUpdateDate": "2024-01-25T12:09:39.6491225",
		"movementId": "debtId",
		"receipt": {
			"authentication": "F2.2D.2C.32.74.24.11.59.81.C1.FD.C2.91.A3.BF.93",
			"description": "Licenciamento 2022",
			"dueDate": "2022-12-28T00:00:00",
			"licensePlate": "DIS9865",
			"payDate": "2022-12-28T00:00:00",
			"renavam": "01203988813",
			"state": "DF",
			"year": 2022
		},
		"tags": [
			{
				"key": "string",
				"value": "string"
			}
		]
	}
}


Consultar solicitação de pagamento de débitos.

cURL da chamada

curl --location 'https://sandbox.openfinance.celcoin.dev/baas/v2/vehicledebts/consult?IdConsult=1ae8a57d-b15d-4b4b-b943-4cf76ebabca1&ClientRequestId=58d6faf2-98f5-4cd5-b855-2adac6e2b985&Identificador%20do%20d%C3%A9bito.=cbff1676-1af2-41cd-9169-f1ea58fe59cc' \
--header 'Authorization: Bearer {token}'

Exemplo de retorno

👍

Sucesso 200

{
  "version": "1.0.0",
  "status": "SUCCESS",
  "body": {
    "account": "300539061667",
    "clientRequestId": "f689db74-c550-4c38-8aa5-c928029dd489",
    "debtList": [
      {
        "debtId": "9D1ABE7C-8D80-4D5E-AF9E-D27722825D83",
        "metaDetran": {
          "amount": 130.32,
          "debitType": "ticket",
          "debtDescription": "Infracao de transito",
          "document": "06249862846",
          "dueDate": "2022-05-02T00:00:00.000+00:00",
          "licensePlate": "DEP0001",
          "nsuDetran": "000220114622",
          "renavam": "66219318720",
          "settlementBank": "BRADESCO",
          "settlementDateTime": "2023-10-27T19:05:12",
          "uf": "SP",
          "year": 2024
        },
        "receipt": {
          "authentication": "F2.2D.2C.32.74.24.11.59.81.C1.FD.C2.91.A3.BF.93",
          "description": "Pagamento da Infração de Transito",
          "dueDate": "2024-10-27T19:05:12",
          "licensePlate": "DEP0001",
          "payDate": "2024-08-27T19:05:12",
          "renavam": "66219318720",
          "state": "SP",
          "year": 2024
        }
      }
    ],
    "documentNumber": "string",
    "id": "f689db74-c550-4c38-8aa5-c928029dd489",
    "tags": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "vehicle": {
      "document": "06249862846",
      "licensePlate": "string",
      "renavam": "66219318720",
      "uf": "SP",
      "year": 2024
    }
  }
}

Error 400

{
  "version": "1.0.0",
  "status": "ERROR",
  "error": {
    "errorCode": "IVDBE005",
    "message": "O campo clientRequestId não pode conter mais de 200 caracteres."
  }
}

Tabela de errorCode

CodeMessage
IVDBE005O campo clientRequestId não pode conter mais de 200 caracteres.
IVDBE019O campo idConsult não pode conter mais de 200 caracteres.
IVDBE020Necessário informar o idConsult ou o clientRequestId.
IVDBE022O campo debitId não pode conter mais de 200 caracteres.