Integre pagamentos PIX (BRL) via BSPAY/PIXUP e AUGE Coin via blockchain Augecoin. Autenticação por client_id / client_secret + HMAC-SHA256 nos webhooks.
POST https://www.consigdata.digital/v3/pix/qrcode.php
| Parâmetro | Tipo | Descrição |
|---|---|---|
| client_id | string | ID da integração (/keys.php) |
| client_secret | string | Segredo |
| nome | string | Nome do pagador |
| cpf | string | CPF (só números) |
| valor | float | Valor em R$ |
| descricao | string | Descrição |
| urlnoty | string | Webhook (ex: https://seusite.com/webhook) |
$apiUrl = 'https://www.consigdata.digital/v3/pix/qrcode.php'; $postData = [ 'client_id' => 'seu_client_id', 'client_secret' => 'seu_client_secret', 'nome' => 'João Silva', 'cpf' => '12345678901', 'valor' => 150.99, 'descricao' => 'Pagamento de serviço', 'urlnoty' => 'https://seusite.com/webhook' ]; $ch = curl_init($apiUrl); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query($postData), ]); $response = curl_exec($ch); $data = json_decode($response, true); // $data['qrcode'], $data['transactionId']
POST https://www.consigdata.digital/v3/pix/payment.php
$apiUrl = 'https://www.consigdata.digital/v3/pix/payment.php'; $postData = [ 'client_id' => 'seu_client_id', 'client_secret' => 'seu_client_secret', 'nome' => 'Maria Souza', 'cpf' => '98765432100', 'valor' => 250.75, 'chave_pix' => '11970142332', 'descricao' => 'Pagamento', 'urlnoty' => 'https://seusite.com/webhook' ]; $ch = curl_init($apiUrl); curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER=>true, CURLOPT_POST=>true, CURLOPT_POSTFIELDS=>http_build_query($postData)]); $response = curl_exec($ch);
POST https://www.consigdata.digital/v3/auge/deposit Headers: Content-Type: application/x-www-form-urlencoded Body: client_id, client_secret, amount (opcional, 8 dec), partner_user (opcional, ex: augeco_16965)
Use client_id/secret de users_integration_keys (status=active) + verificação de domain e IP whitelist. Alternativamente, sessão $_SESSION[user_id] + X-CSRF-Token.
Não derive endereço localmente. O gateway gera um endereço único por pedido via HD flatIndex=user_id*2^32+idx.
// 1. Criar pedido (merchant jordao → gateway)
POST /v3/auge/deposit
client_id=user_6152734532&client_secret=***&amount=1200&partner_user=augeco_16965
// 2. Resposta 200
{
"statusCode": 200,
"data": {
"deposit_request_id": "drc7e411d8ec2cf81fff71bd38cd95dc16",
"address": "e63WsK1zzobaYpCcquJyqrGmV2v6iq7JCpssb8NQaKajPpqnx",
"currency": "AUGE",
"confirmations": 2,
"cashin_tax_percent": 1.0,
"qrcode": "data:image/png;base64,...",
"explorer": "https://explorer.augeco.in/address/e63WsK1...",
"expires_at": "2026-09-23 11:00:03",
"expiry_hours": 4
}
}
// 3. Cliente gold envia 1200 AUGE para o address (on-chain block 150842, hash d7c0cd63...)
// 4. Monitor (cron a cada 15s) detecta via getBalance → DETECTED (webhook deposit.detected)
// 5. Após 2 blocos (~20s) → CONFIRMED → credita users.balance (jordao +1188 após 1% taxa)
// + dispara webhook deposit.confirmed para augeco.in
$creds = ['client_id'=>'user_6152734532','client_secret'=>'***'];
$partnerUser = 'augeco_'.$memberId; // 16965 = gold
$postFields = http_build_query([
'client_id' => $creds['client_id'],
'client_secret'=> $creds['client_secret'],
'partner_user' => $partnerUser,
'amount' => number_format(1200, 8, '.', '')
]);
$ch = curl_init('https://www.consigdata.digital/v3/auge/deposit');
curl_setopt_array($ch, [
CURLOPT_POST=>true, CURLOPT_POSTFIELDS=>$postFields,
CURLOPT_RETURNTRANSFER=>true, CURLOPT_SSL_VERIFYPEER=>true, CURLOPT_TIMEOUT=>30
]);
$resp = json_decode(curl_exec($ch), true);
// Salvar: $resp['data']['address'] em consigdata_orders.address_admin
// $resp['data']['deposit_request_id'] em external_id
// Aguardar webhook CONFIRMED para creditar purchase_balance
GET https://www.consigdata.digital/v3/auge/deposit?client_id=...&client_secret=...
→ { pending_requests: [...], primary_wallet: {address, balance_augesat} }
Ou direto na blockchain via RPC:
POST https://rpc.augeco.in/augex/v1/rpc
Headers: Content-Type: application/json, x-api-key: auge_live_...
Body: {"jsonrpc":"2.0","method":"getaccount","params":[null,"e63WsK1..."],"id":1}
→ {"result":{"balance":120000000000,"account_number":16,"updated_on_block_active_mode":150842}}
POST https://www.consigdata.digital/v3/auge/withdraw
Headers: Content-Type: application/json
Body: {"client_id","client_secret","to_address","amount","pin"}
users.balance atomicamente (valida PIN bcrypt)sendoperation RPC via hot_wallet qyXhY... — sem retry (idempotente)cashout_tax (1%) descontada; mínimo auge_min_withdraw=1.0estimated_confirmations: 2 (~30s para o destinatário)POST /v3/auge/withdraw
{
"client_id": "user_6152734532",
"client_secret": "***",
"to_address": "2Pn2578T5ibQVbdHxLYMVrbPiPsWpsDM4ufCZSuXDrffsooyhs",
"amount": "29.5",
"pin": "1234"
}
→ 200 {
"transaction_id": "tx_balance_...",
"status": "SENT",
"amount": "29.5",
"fee": "0.295",
"estimated_confirmations": 2
}
Cadastre em partner_platforms.callback_url (ex: https://augeco.in/webhook_auge.php — não use www) ou ?view=postbacks&page=consigdata com gateways.option5 = webhook_secret (ex: cc72c03f8018cdec0f98eeedafb88c3d...). O segredo deve ser idêntico nos dois lados.
Regras de URL: use https:// (não http://), sem redirect www→non-www. O gateway agora segue redirect, mas evite para não perder o POST.
{
"transactionType": "RECEIVEPIX",
"transactionId": "c327ce8bee2a18565ec2m1zdu6px2keu",
"amount": 150.99,
"status": "PAID",
"dateApproval": "2024-05-20 14:30:45",
"creditParty": {"name": "João Silva", "taxId": "12345678901"},
"debitParty": {"bank": "BANCO EXEMPLO", "taxId": "46872831000154"}
}
O gateway envia {event, timestamp, data}. Seu handler deve desembrulhar data e validar HMAC sobre o JSON completo.
POST https://augeco.in/webhook_auge.php
Headers:
Content-Type: application/json
X-Consigdata-Signature: sha256=<hmac_sha256(body, secret)>
X-AUGE-Signature: <hmac>
X-AUGE-Event: deposit.confirmed
X-Consigdata-Event: deposit.confirmed
Body:
{
"event": "deposit.confirmed",
"timestamp": 1727070003,
"data": {
"deposit_request_id": "drc7e411d8ec2cf81fff71bd38cd95dc16",
"deposit_id": "dfbfe429f6f9759293134e238edc5a85d",
"address": "e63WsK1zzobaYpCcquJyqrGmV2v6iq7JCpssb8NQaKajPpqnx",
"amount_augesat": "120000000000",
"amount_auge": 1200,
"fee_augesat": "1200000000",
"fee_auge": 12,
"credit_amount": 1188,
"block_height": 150842,
"operation_id": "op_balance_drc7e411...",
"confirmations": 2
}
}
→ Seu handler deve responder 200 {"status":"success"}
| Evento | Quando | Ação |
|---|---|---|
deposit.detected / DEPOSIT.DETECTED | Saldo >0 detectado (0 conf) | Apenas logar, aguardar |
deposit.confirmed / CONFIRMED | 2 blocos confirmados | Creditar purchase_balance + responder 200 |
deposit.expired | 4h sem pagamento | Cancelar pedido |
withdrawal.confirmed | Saque on-chain confirmado | Atualizar status |
// augeco.in — Sources/postbacks/consigdata.php + webhook_auge.php
$inputRaw = file_get_contents("php://input");
$sigHeader = $_SERVER['HTTP_X_CONSIGDATA_SIGNATURE'] ?? $_SERVER['HTTP_X_AUGE_SIGNATURE'] ?? '';
$provided = preg_replace('/^sha256=/','', trim($sigHeader));
$expected = hash_hmac('sha256', $inputRaw, $webhookSecret); // gateways.option5
if (!hash_equals($expected, $provided)) { http_response_code(401); exit; }
// Desembrulhar wrapper
$payload = json_decode($inputRaw, true);
if (isset($payload['data']) && isset($payload['event'])) {
$payload = array_merge($payload['data'], ['event'=>$payload['event']]);
}
// Buscar pedido por address (fallback, pois transactionId pode estar vazio)
$order = $db->where("external_id", $payload['address'])->get("consigdata_orders")->row()
?: $db->where("address_admin", $payload['address'])->get("consigdata_orders")->row();
Para testar localmente, use /opt/sites/softwork/soft/exemplo_webhook_consigdata.php (envia X-Consigdata-Signature: sha256=<hmac> para https://augeco.in/webhook_auge.php).
https://www.consigdata.digital/keys.php
Crie integração, copie client_id (ex: user_6152734532) e client_secret. Configure domain e IP whitelist — origens não autorizadas retornam 403.
12 → 2 (~30s) via .env AUGE_CONFIRMATIONS. Saque instantâneo (<10s). monitor_interval 2 min → cron a cada 15s (4×/min).X-Consigdata-Signature + X-AUGE-Signature, segue 302, retry a cada 1 min (antes 5 min) com backoff 60/300/1800/7200/21600s. partner_platforms.callback_url corrigido para https://augeco.in/webhook_auge.php (standalone, sem templating EvolutionScript).Sources/postbacks/consigdata.php aceita ambos headers, desembrulha {data}, busca pedido por address fallback (pois consigdata_txn_id vinha vazio). Novo webhook_auge.php responde JSON 200 sem HTML.processWebhook aceita DEPOSIT.CONFIRMED + CONFIRMED, busca por address_admin.ReadCache invalidate_all + CheckpointSync clear para evitar “depósito criado” travado por cache stale (5s TTL) ou mempool desatualizado.gold@augeco.in → address e63WsK... bloco 150842 hash d7c0cd63d6be6d683b7055c3594cd3... → jordao creditado 1188 (1% taxa) + gold purchase_balance 2620.4450 após correções.| Método | URL | Descrição |
|---|---|---|
| POST | /v3/pix/qrcode.php | PIX cash-in |
| POST | /v3/pix/payment.php | PIX cash-out |
| POST | /v3/auge/deposit | AUGE cash-in (novo) |
| GET | /v3/auge/deposit | Listar pendentes + primary wallet |
| POST | /v3/auge/withdraw | AUGE cash-out |
| POST | /v3/auge/webhooks | Cadastrar webhook HMAC |
| POST | /webhook_auge.php (augeco.in) | Handler standalone 30s |