Visão Geral

Contrato unificado para recebimento de webhooks, sincronização de vendas e recuperação de checkout.

Esta página descreve o padrão de ingestão de eventos, segurança, mapeamento por provedor e os endpoints básicos que suportam recuperação de vendas.

Contrato Global

{
  "externalId": "string",
  "status": "approved|pending|cancelled|refunded|abandoned|failed",
  "amount": "number",
  "customer": {
    "name": "string",
    "email": "string",
    "phone": "string"
  },
  "checkoutUrl": "string",
  "orderUrl": "string",
  "event": "string",
  "isAbandoned": "boolean",
  "raw": "object"
}
externalId
status
customer.name
customer.phone OR customer.email
amount

Segurança

x-rekuplead-signaturex-rekuplead-timestampx-rekuplead-nonce

Algoritmo: HMAC-SHA256

Padrão: {timestamp}.{nonce}.{sha256(rawBody)}

Anti replay: nonce único por provider

Plataformas e Eventos

CartPanda

cartpanda

WebhookPull syncAbandono

webhook: /api/v1/webhooks/cartpanda

pull_orders: GET https://accounts.cartpanda.com/api/v3/{shop-slug}/orders

pull_abandoned: GET https://accounts.cartpanda.com/api/v3/{shop-slug}/abandoned

Sem mapeamento explícito neste contrato.

Yampi

yampi

WebhookPull syncAbandono

webhook: /api/v1/webhooks/yampi

pull_orders: config.base_url + config.orders_path

pull_abandoned: config.base_url + config.abandoned_path (opcional)

Sem mapeamento explícito neste contrato.

Shopify

shopify

WebhookPull syncSem abandono

webhook: /api/v1/webhooks/shopify

pull_orders: GET https://{shop_domain}/admin/api/{api_version}/orders.json

Sem mapeamento explícito neste contrato.

Vega Checkout

vega

WebhookEvent onlyAbandono

webhook: /api/v1/webhooks/vega

Sem mapeamento explícito neste contrato.

Luna Checkout

luna

WebhookEvent onlySem abandono

webhook: /api/v1/webhooks/luna

Sem mapeamento explícito neste contrato.

Zedy

zedy

WebhookEvent onlySem abandono

webhook: /api/v1/webhooks/zedy

Sem mapeamento explícito neste contrato.

Adorei

adorei

WebhookEvent onlySem abandono

webhook: /api/v1/webhooks/adorei

Sem mapeamento explícito neste contrato.

Endpoints Genéricos

POST /api/v1/webhooks/:provider

Entrada webhook genérica com assinatura HMAC ou token por provider

POST /api/v1/integrations

Cria ou atualiza integração ativa por slug

GET /api/v1/integrations/health

Health em tempo real: validação estrutural + probe de conectividade

POST /api/v1/integrations/sync

Sincronização ativa via API para providers com pull

Blueprint para Novos Provedores

Definir slug e autenticação do provedor.

Mapear eventos externos para status normalizados.

Implementar validação de assinatura/token.

Persistir payload normalizado no contrato global.

Eventos mínimos

sale.createdsale.updated