Boleto Simples
Passo a passo para gerar boleto bancário na API AgilSpot Pay
Atualmente disponibilizamos dois procedimentos para a criação de uma transação do tipo Boleto bancário, na primeira delas o titulo é criado em um passo único, assim fora convencionado como One Step. A segunda opção de criação da transação se da em dois passos, sendo assim convencionada como Two Steps.
Endpoint para gerar Token de acesso
https://sandbox.agilspotpay.com.br/api/boletos/createboleto
Exemplo com as principais linguagem
Cria boleto simples com link a um clinete(Maestro) de cobrança, apenas código de barra e QRCode
Retorno em JSON com os dados do cadastro.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sandbox.agilspotpay.com.br/api/boletos/createboleto',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'autorizacao=Z%C3%A9%20Felipe&emissao=2022-04-06&vencimento=2022-04-24&valor=500&cpf=426.368.090-15&cnpj=00.179.815%2F0001-80&company_name=Casa%20Dos%20Doces%20Itapolis&company_email=ze.felipe%40email.com&maestro_id=4024',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location --request POST 'https://sandbox.agilspotpay.com.br/api/boletos/createboleto' \
--data-urlencode 'autorizacao=Zé Felipe' \
--data-urlencode 'emissao=2022-04-06' \
--data-urlencode 'vencimento=2022-04-24' \
--data-urlencode 'valor=500' \
--data-urlencode 'cpf=426.368.090-15' \
--data-urlencode 'cnpj=00.179.815/0001-80' \
--data-urlencode 'company_name=Casa Dos Doces Itapolis' \
--data-urlencode 'company_email=ze.felipe@email.com' \
--data-urlencode 'maestro_id=4024'
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'autorizacao': 'Zé Felipe',
'emissao': '2022-04-06',
'vencimento': '2022-04-24',
'valor': '500',
'cpf': '426.368.090-15',
'cnpj': '00.179.815/0001-80',
'company_name': 'Casa Dos Doces Itapolis',
'company_email': 'ze.felipe@email.com',
'maestro_id': '4024'
});
var config = {
method: 'post',
url: 'https://sandbox.agilspotpay.com.br/api/boletos/createboleto',
headers: { },
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Modelo de retorno 200 OK
{
"user_id": "50003",
"fornecedor_id": 1,
"fatura_id": 10392,
"nosso_numero": "00036692600000000001",
"organization_id": 1,
"active": 1,
"boleto_gerado": 1,
"state": 0,
"boleto_id": 766,
"bar_code": "00000.00000 00000.000000 00000.000000 0 00000000000000",
"boleto_status": "waiting",
"pix": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMyAzMyIgc2hhcGUtcmVuZGVyaW5nPSJjcmlzcEVkZ2VzIj48cGF0aCBmaWxsPSIjZmZmZmZmIiBkPSJNMCAwaDMzdjMzSDB6Ii8+PHBhdGggc3Ryb2tlPSIjMDAwMDAwIiBkPSJNMCAwLjVoN200IDBoMm0xIDBoMW00IDBoMW0yIDBoMW0xIDBoMW0xIDBoN00wIDEuNWgxbTUgMGgxbTUgMGgxbTMgMGgzbTEgMGgxbTMgMGgxbTEgMGgxbTUgMGgxTTAgMi41aDFtMSAwaDNtMSAwaDFtMSAwaDJtMSAwaDJtMiAwaDJtMSAwaDRtMSAwaDJtMSAwaDFtMSAwaDNtMSAwaDFNMCAzLjVoMW0xIDBoM20xIDBoMW0xIDBoMW00IDBoMW0zIDBoMW0zIDBoMW0xIDBoMW0yIDBoMW0xIDBoM20xIDBoMU0wIDQuNWgxbTEgMGgzbTEgMGgxbTQgMGgxbTEgMGgxbTMgMGgybTEgMGgxbTIgMGgybTEgMGgxbTEgMGgzbTEgMGgxTTAgNS41aDFtNSAwaDFtMiAwaDFtMiAwaDZtMyAwaDFtMSAwaDFtMiAwaDFtNSAwaD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DBoMW0xIDBoMm0xIDBoM201IDBoMW00IDBoMm0xIDBoMW0xIDBoMW0xIDBoMU0wIDIxLjVoMm0xIDBoMm0yIDBoMm0xIDBoMW0yIDBoMW0xIDBoMm0xIDBoM20xIDBoMW0yIDBoNk0wIDIyLjVoMW0xIDBoMW0xIDBoM20yIDBoNm0yIDBoMW0xIDBoMm0zIDBoMW0xIDBoM20xIDBoM00wIDIzLjVoMW0yIDBoMW0xIDBoMW02IDBoMm0yIDBoMW0xIDBoMW0xIDBoMW0xIDBoMW01IDBoMW0xIDBoMW0xIDBoMU0wIDI0LjVoMm00IDBoMW02IDBoMW0xIDBoMW0xIDBoNG0zIDBoNU04IDI1LjVoM20xIDBoMm0xIDBoMW0xIDBoMW0xIDBoMm0xIDBoMW0xIDBoMW0zIDBoNE0wIDI2LjVoN20xIDBoNG0xIDBoMm0xIDBoMW0xIDBoMW0yIDBoNG0xIDBoMW0xIDBoMW0xIDBoMU0wIDI3LjVoMW01IDBoMW0yIDBoMW02IDBoM20xIDBoMW0yIDBoMm0zIDBoMW0xIDBoMk0wIDI4LjVoMW0xIDBoM20xIDBoMW0xIDBoMW0zIDBoMW0zIDBoMm0zIDBoMW0xIDBoN20xIDBoMU0wIDI5LjVoMW0xIDBoM20xIDBoMW0xIDBoMW0yIDBoMW0zIDBoMW0zIDBoM20zIDBoMW0xIDBoMW0xIDBoM00wIDMwLjVoMW0xIDBoM20xIDBoMW0zIDBoMW0xIDBoM20yIDBoMm0xIDBoMW03IDBoMW0xIDBoM00wIDMxLjVoMW01IDBoMW0zIDBoM20yIDBoM20zIDBoMW04IDBoM00wIDMyLjVoN20yIDBoMW0yIDBoMW0yIDBoMm0yIDBoMW0xIDBoMW0xIDBoNG0xIDBoMyIvPjwvc3ZnPg==",
"autorizado_por": "Zé Felipe",
"data_vencimento": "2022-04-24",
"data_emissao": "2022-04-06",
"valor_conta": 5,
"created_at": "2023-01-25",
"updated_at": "2023-01-25",
"month": "2023-01",
"email": "ze.felipe@email.com",
"cliente_razao": "Empresa Feliz Ltda",
"id": 236
}
Modelo de retorno 404 Not Found
{
"status": 404,
"error": 404,
"messages": {
"error": "Ops, não encontramos o Maestro informado"
}
}
Last updated