Gera uma solicitação de pagamento
curl --request POST \
--url https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento \
--header 'Content-Type: application/json' \
--header 'X-Ambiente: <api-key>' \
--header 'X-Authorization: <api-key>' \
--data '
{
"IdGateway": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Valor": 123,
"Descricao": "<string>",
"IdContato": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ClienteNome": "<string>",
"Vencimento": "2023-11-07T05:31:56Z",
"SolicitarDadosDoCliente": true,
"ClienteEmail": "<string>",
"ClienteCpfCnpj": "<string>",
"ClienteTelefone": "<string>",
"ClienteCEP": "<string>",
"ClienteEndereco": "<string>",
"ClienteNumero": "<string>",
"ClienteComplemento": "<string>",
"ClienteBairro": "<string>",
"ClienteCidade": "<string>",
"ClienteUF": "<string>"
}
'import requests
url = "https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento"
payload = {
"IdGateway": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Valor": 123,
"Descricao": "<string>",
"IdContato": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ClienteNome": "<string>",
"Vencimento": "2023-11-07T05:31:56Z",
"SolicitarDadosDoCliente": True,
"ClienteEmail": "<string>",
"ClienteCpfCnpj": "<string>",
"ClienteTelefone": "<string>",
"ClienteCEP": "<string>",
"ClienteEndereco": "<string>",
"ClienteNumero": "<string>",
"ClienteComplemento": "<string>",
"ClienteBairro": "<string>",
"ClienteCidade": "<string>",
"ClienteUF": "<string>"
}
headers = {
"X-Ambiente": "<api-key>",
"X-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Ambiente': '<api-key>',
'X-Authorization': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
IdGateway: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Valor: 123,
Descricao: '<string>',
IdContato: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ClienteNome: '<string>',
Vencimento: '2023-11-07T05:31:56Z',
SolicitarDadosDoCliente: true,
ClienteEmail: '<string>',
ClienteCpfCnpj: '<string>',
ClienteTelefone: '<string>',
ClienteCEP: '<string>',
ClienteEndereco: '<string>',
ClienteNumero: '<string>',
ClienteComplemento: '<string>',
ClienteBairro: '<string>',
ClienteCidade: '<string>',
ClienteUF: '<string>'
})
};
fetch('https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'IdGateway' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'Valor' => 123,
'Descricao' => '<string>',
'IdContato' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ClienteNome' => '<string>',
'Vencimento' => '2023-11-07T05:31:56Z',
'SolicitarDadosDoCliente' => true,
'ClienteEmail' => '<string>',
'ClienteCpfCnpj' => '<string>',
'ClienteTelefone' => '<string>',
'ClienteCEP' => '<string>',
'ClienteEndereco' => '<string>',
'ClienteNumero' => '<string>',
'ClienteComplemento' => '<string>',
'ClienteBairro' => '<string>',
'ClienteCidade' => '<string>',
'ClienteUF' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Ambiente: <api-key>",
"X-Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento"
payload := strings.NewReader("{\n \"IdGateway\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Valor\": 123,\n \"Descricao\": \"<string>\",\n \"IdContato\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ClienteNome\": \"<string>\",\n \"Vencimento\": \"2023-11-07T05:31:56Z\",\n \"SolicitarDadosDoCliente\": true,\n \"ClienteEmail\": \"<string>\",\n \"ClienteCpfCnpj\": \"<string>\",\n \"ClienteTelefone\": \"<string>\",\n \"ClienteCEP\": \"<string>\",\n \"ClienteEndereco\": \"<string>\",\n \"ClienteNumero\": \"<string>\",\n \"ClienteComplemento\": \"<string>\",\n \"ClienteBairro\": \"<string>\",\n \"ClienteCidade\": \"<string>\",\n \"ClienteUF\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Ambiente", "<api-key>")
req.Header.Add("X-Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento")
.header("X-Ambiente", "<api-key>")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"IdGateway\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Valor\": 123,\n \"Descricao\": \"<string>\",\n \"IdContato\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ClienteNome\": \"<string>\",\n \"Vencimento\": \"2023-11-07T05:31:56Z\",\n \"SolicitarDadosDoCliente\": true,\n \"ClienteEmail\": \"<string>\",\n \"ClienteCpfCnpj\": \"<string>\",\n \"ClienteTelefone\": \"<string>\",\n \"ClienteCEP\": \"<string>\",\n \"ClienteEndereco\": \"<string>\",\n \"ClienteNumero\": \"<string>\",\n \"ClienteComplemento\": \"<string>\",\n \"ClienteBairro\": \"<string>\",\n \"ClienteCidade\": \"<string>\",\n \"ClienteUF\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Ambiente"] = '<api-key>'
request["X-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"IdGateway\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Valor\": 123,\n \"Descricao\": \"<string>\",\n \"IdContato\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ClienteNome\": \"<string>\",\n \"Vencimento\": \"2023-11-07T05:31:56Z\",\n \"SolicitarDadosDoCliente\": true,\n \"ClienteEmail\": \"<string>\",\n \"ClienteCpfCnpj\": \"<string>\",\n \"ClienteTelefone\": \"<string>\",\n \"ClienteCEP\": \"<string>\",\n \"ClienteEndereco\": \"<string>\",\n \"ClienteNumero\": \"<string>\",\n \"ClienteComplemento\": \"<string>\",\n \"ClienteBairro\": \"<string>\",\n \"ClienteCidade\": \"<string>\",\n \"ClienteUF\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"IdTransacao": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"UrlCheckout": "<string>",
"Referencia": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}Pagamentos
Criar solicitação de pagamento
Cria uma cobrança no gateway configurado e devolve o link de checkout. A transação nasce como ‘Pendente’; o status é atualizado depois pelo webhook da plataforma.
POST
/
v1
/
solicitacoes-de-pagamento
Gera uma solicitação de pagamento
curl --request POST \
--url https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento \
--header 'Content-Type: application/json' \
--header 'X-Ambiente: <api-key>' \
--header 'X-Authorization: <api-key>' \
--data '
{
"IdGateway": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Valor": 123,
"Descricao": "<string>",
"IdContato": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ClienteNome": "<string>",
"Vencimento": "2023-11-07T05:31:56Z",
"SolicitarDadosDoCliente": true,
"ClienteEmail": "<string>",
"ClienteCpfCnpj": "<string>",
"ClienteTelefone": "<string>",
"ClienteCEP": "<string>",
"ClienteEndereco": "<string>",
"ClienteNumero": "<string>",
"ClienteComplemento": "<string>",
"ClienteBairro": "<string>",
"ClienteCidade": "<string>",
"ClienteUF": "<string>"
}
'import requests
url = "https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento"
payload = {
"IdGateway": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Valor": 123,
"Descricao": "<string>",
"IdContato": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ClienteNome": "<string>",
"Vencimento": "2023-11-07T05:31:56Z",
"SolicitarDadosDoCliente": True,
"ClienteEmail": "<string>",
"ClienteCpfCnpj": "<string>",
"ClienteTelefone": "<string>",
"ClienteCEP": "<string>",
"ClienteEndereco": "<string>",
"ClienteNumero": "<string>",
"ClienteComplemento": "<string>",
"ClienteBairro": "<string>",
"ClienteCidade": "<string>",
"ClienteUF": "<string>"
}
headers = {
"X-Ambiente": "<api-key>",
"X-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Ambiente': '<api-key>',
'X-Authorization': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
IdGateway: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Valor: 123,
Descricao: '<string>',
IdContato: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ClienteNome: '<string>',
Vencimento: '2023-11-07T05:31:56Z',
SolicitarDadosDoCliente: true,
ClienteEmail: '<string>',
ClienteCpfCnpj: '<string>',
ClienteTelefone: '<string>',
ClienteCEP: '<string>',
ClienteEndereco: '<string>',
ClienteNumero: '<string>',
ClienteComplemento: '<string>',
ClienteBairro: '<string>',
ClienteCidade: '<string>',
ClienteUF: '<string>'
})
};
fetch('https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'IdGateway' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'Valor' => 123,
'Descricao' => '<string>',
'IdContato' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'ClienteNome' => '<string>',
'Vencimento' => '2023-11-07T05:31:56Z',
'SolicitarDadosDoCliente' => true,
'ClienteEmail' => '<string>',
'ClienteCpfCnpj' => '<string>',
'ClienteTelefone' => '<string>',
'ClienteCEP' => '<string>',
'ClienteEndereco' => '<string>',
'ClienteNumero' => '<string>',
'ClienteComplemento' => '<string>',
'ClienteBairro' => '<string>',
'ClienteCidade' => '<string>',
'ClienteUF' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Ambiente: <api-key>",
"X-Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento"
payload := strings.NewReader("{\n \"IdGateway\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Valor\": 123,\n \"Descricao\": \"<string>\",\n \"IdContato\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ClienteNome\": \"<string>\",\n \"Vencimento\": \"2023-11-07T05:31:56Z\",\n \"SolicitarDadosDoCliente\": true,\n \"ClienteEmail\": \"<string>\",\n \"ClienteCpfCnpj\": \"<string>\",\n \"ClienteTelefone\": \"<string>\",\n \"ClienteCEP\": \"<string>\",\n \"ClienteEndereco\": \"<string>\",\n \"ClienteNumero\": \"<string>\",\n \"ClienteComplemento\": \"<string>\",\n \"ClienteBairro\": \"<string>\",\n \"ClienteCidade\": \"<string>\",\n \"ClienteUF\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Ambiente", "<api-key>")
req.Header.Add("X-Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento")
.header("X-Ambiente", "<api-key>")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"IdGateway\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Valor\": 123,\n \"Descricao\": \"<string>\",\n \"IdContato\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ClienteNome\": \"<string>\",\n \"Vencimento\": \"2023-11-07T05:31:56Z\",\n \"SolicitarDadosDoCliente\": true,\n \"ClienteEmail\": \"<string>\",\n \"ClienteCpfCnpj\": \"<string>\",\n \"ClienteTelefone\": \"<string>\",\n \"ClienteCEP\": \"<string>\",\n \"ClienteEndereco\": \"<string>\",\n \"ClienteNumero\": \"<string>\",\n \"ClienteComplemento\": \"<string>\",\n \"ClienteBairro\": \"<string>\",\n \"ClienteCidade\": \"<string>\",\n \"ClienteUF\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-publica.cpluschat.com.br/v1/solicitacoes-de-pagamento")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Ambiente"] = '<api-key>'
request["X-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"IdGateway\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Valor\": 123,\n \"Descricao\": \"<string>\",\n \"IdContato\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ClienteNome\": \"<string>\",\n \"Vencimento\": \"2023-11-07T05:31:56Z\",\n \"SolicitarDadosDoCliente\": true,\n \"ClienteEmail\": \"<string>\",\n \"ClienteCpfCnpj\": \"<string>\",\n \"ClienteTelefone\": \"<string>\",\n \"ClienteCEP\": \"<string>\",\n \"ClienteEndereco\": \"<string>\",\n \"ClienteNumero\": \"<string>\",\n \"ClienteComplemento\": \"<string>\",\n \"ClienteBairro\": \"<string>\",\n \"ClienteCidade\": \"<string>\",\n \"ClienteUF\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"IdTransacao": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"UrlCheckout": "<string>",
"Referencia": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}Authorizations
Número da sua conta no Novus CRM. Aceita também X-Canal com o ID de um canal, que resolve a conta a partir dele.
Chave de API no formato X-Chave-Api {chave}. O prefixo faz parte do valor. A chave fica em Minha conta › Integrações.
Body
application/json
⌘I