Cakto - Order
Eventos da família order.* na integração Cakto.
Eventos Disponíveis
| Evento | Descrição |
|---|---|
order.paid | Pagamento aprovado |
order.waiting_payment.pix | Aguardando pagamento PIX |
order.waiting_payment.boleto | Aguardando pagamento Boleto |
order.waiting_payment.credit_card | Aguardando pagamento Cartão |
order.refunded | Pedido reembolsado |
order.disputed | Em disputa (chargeback) |
order.failed | Pagamento recusado |
Estrutura do Payload
{ "customer": { "id": "cust_123456", "name": "João Silva", "document": "12345678900", "phone_numbers": [ { "formatted_phone": "+5511999999999", "type": null, "raw_number": "999999999", "area_code": null, "international_dialing_code": null } ], "address": { "street": null, "number": null, "complement": null, "neighborhood": null, "city": null, "state": null, "country": null, "postal_code": null } }, "order": { "id": "ord_789012", "status": "paid", "raw_status": "paid", "created_at": 1705319000, "updated_at": null, "paid_at": 1705319100, "warranty_until": null, "canceled_at": null, "refunded_at": null }, "checkout": { "id": null, "url": null }, "payment": { "currency": "BRL", "total": 29900, "total_products_value": 27900, "discount_value": 0, "shipping_value": null, "payment_method": { "type": "pix", "qrcode_url": null, "qrcode_signature": null, "expiration_date": null, "pix_key": null, "pix_key_type": null }, "coupons": [] }, "shipping": { "carrier": null, "total_value": null, "tracking_url": null, "tracking_code": null, "method": null, "delivery_address": null, "estimated_delivery_date": null, "estimated_delivery_time_in_days": null, "status": null, "raw_status": null }, "products": [ { "id": "prod_456", "name": "Produto Exemplo", "type": "product", "quantity": null, "unit_value": 29900, "total_value": 29900, "image_url": null, "offer_type": "main" } ], "lead_tracking": { "src": null, "sck": "campaign123", "utm_source": "facebook", "utm_campaign": "black_friday", "utm_medium": "cpc", "utm_content": null, "utm_term": null, "utm_id": null, "meta_fbp": null, "google_ga_id": null, "google_gclid": null, "google_gclsrc": null, "google_dclid": null, "google_gbraid": null, "google_wbraid": null, "tiktok_ttlid": null, "ip": null }}Componentes do Payload
Customer
| Campo | Tipo | Descricao |
|---|---|---|
id | string | null | ID do cliente |
name | string | null | Nome do cliente |
email | string | null | E-mail do cliente |
document | string | null | CPF ou CNPJ (docNumber) |
phone_numbers | Phone[] | null | Colecao de telefones do cliente |
address | null | Sempre null - Cakto nao fornece endereco |
Phone
Telefone do cliente.
| Campo | Tipo | Descrição |
|---|---|---|
formatted_phone | string | null | Telefone formatado em E.164 |
type | null | Sempre null |
raw_number | string | null | Número sem formatação |
area_code | null | Sempre null |
international_dialing_code | null | Sempre null |
Order
| Campo | Tipo | Descricao |
|---|---|---|
id | string | null | ID do pedido |
status | string | null | Status normalizado do pedido |
raw_status | string | null | Status original da Cakto |
created_at | Carbon | null | Data de criacao |
updated_at | null | Sempre null |
paid_at | Carbon | null | Data de pagamento |
warranty_until | null | Sempre null |
canceled_at | Carbon | null | Data de cancelamento |
refunded_at | Carbon | null | Data de reembolso |
Status Normalizados (OrderStatus)
A Cakto retorna os seguintes valores normalizados para o status do pedido:
| Valor | Descricao |
|---|---|
paid | Pagamento aprovado |
waiting_payment | Aguardando pagamento |
refunded | Pedido reembolsado |
disputed | Em disputa (chargeback) |
failed | Pagamento recusado |
Checkout
| Campo | Tipo | Descrição |
|---|---|---|
id | string | null | ID do checkout |
url | string | null | URL do checkout |
Payment
| Campo | Tipo | Descrição |
|---|---|---|
currency | BRL | Moeda (sempre BRL) |
total | int | null | Valor total |
total_products_value | int | null | Valor base (baseAmount) |
discount_value | int | null | Valor do desconto |
shipping_value | null | Sempre null |
payment_method | PaymentMethod | null | Método de pagamento utilizado |
coupons | Collection | Coleção vazia (não há suporte a cupons) |
PaymentMethod
O tipo de pagamento é identificado pelo campo data.paymentMethod:
| paymentMethod | Classe |
|---|---|
credit_card | CreditCard |
pix | Pix |
boleto | Boleto |
Pix
import Pix from ”../../../../events/components/subcomponents/payment-methods/pix.md”;
Boleto
import Boleto from ”../../../../events/components/subcomponents/payment-methods/boleto.md”;
CreditCard
import CreditCard from ”../../../../events/components/subcomponents/payment-methods/credit-card.md”;
Shipping (Vazio)
| Campo | Tipo | Descrição |
|---|---|---|
carrier | null | Sempre null |
total_value | null | Sempre null |
tracking_url | null | Sempre null |
tracking_code | null | Sempre null |
method | null | Sempre null |
delivery_address | [EmptyAddress] | Endereço vazio |
estimated_delivery_date | null | Sempre null |
estimated_delivery_time_in_days | null | Sempre null |
status | null | Sempre null |
raw_status | null | Sempre null |
Delivery Address (Vazio)
| Campo | Tipo | Descrição |
|---|---|---|
street | null | Sempre null |
number | null | Sempre null |
complement | null | Sempre null |
neighborhood | null | Sempre null |
city | null | Sempre null |
state | null | Sempre null |
country | null | Sempre null |
postal_code | null | Sempre null |
[!NOTE] Essa integração não disponibiliza informações de endereço.
[!NOTE] Essa integração não disponibiliza informações de envio.
Product
| Campo | Tipo | Descricao |
|---|---|---|
id | string | null | ID do produto |
name | string | null | Nome do produto ou oferta |
quantity | null | Sempre null |
unit_value | int | null | Valor unitario (preco da oferta) |
total_value | int | null | Valor total |
image_url | null | Sempre null |
type | string | Tipo do produto (product ou subscription_plan) |
offer_type | string | Sempre main |
LeadTracking
| Campo | Tipo | Descricao |
|---|---|---|
src | null | Sempre null |
sck | string | null | SCK (data.sck) |
utm_source | string | null | UTM source (data.utm_source) |
utm_campaign | string | null | UTM campaign (data.utm_campaign) |
utm_medium | string | null | UTM medium (data.utm_medium) |
utm_content | string | null | UTM content (data.utm_content) |
utm_term | string | null | UTM term (data.utm_term) |
utm_id | null | Sempre null |
meta_fbp | null | Sempre null |
google_ga_id | null | Sempre null |
google_gclid | null | Sempre null |
google_gclsrc | null | Sempre null |
google_dclid | null | Sempre null |
google_gbraid | null | Sempre null |
google_wbraid | null | Sempre null |
tiktok_ttlid | null | Sempre null |
ip | null | Sempre null |