Pular para o conteúdo

Kiwify - Subscription Transaction

Eventos da família subscription_transaction.* na integração Kiwify.

Eventos Disponíveis

  • subscription_transaction.paid
  • subscription_transaction.failed
  • subscription_transaction.refunded
  • subscription_transaction.waiting_payment

Estrutura do Payload

{
"customer": {
"id": null,
"name": "João Silva",
"email": "[email protected]",
"document": "12345678900",
"phone_numbers": [
{
"formatted_phone": "+5511999999999",
"type": null,
"raw_number": "5511999999999",
"area_code": null,
"international_dialing_code": null
}
],
"address": {
"street": "Rua Principal",
"number": "123",
"complement": "Apto 45",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"postal_code": "01000-000"
}
},
"transaction": {
"id": "ORDER-789",
"status": "paid",
"raw_status": "paid",
"created_at": 1705319000,
"updated_at": 1705319100,
"paid_at": 1705319100,
"warranty_until": null,
"canceled_at": null,
"refunded_at": null
},
"subscription": {
"id": "SUB-456",
"name": "Plano Mensal",
"status": "active",
"created_at": 1704067200,
"updated_at": null,
"canceled_at": null,
"cancellation_reason": null,
"charged_times": null,
"current_cycle": null,
"current_cycle_start": null,
"current_cycle_end": null
},
"products": [
{
"id": "PROD-001",
"name": "Plano Mensal",
"type": "subscription_plan",
"offer_type": "main",
"quantity": 1,
"unit_value": 4970,
"total_value": 4970,
"image_url": null
}
],
"charge": {
"id": null,
"created_at": null,
"status": null,
"type": null,
"value": null
},
"payment": {
"currency": "BRL",
"total": 4970,
"discount_value": null,
"shipping_value": null,
"total_products_value": 4970,
"payment_method": {
"type": "pix",
"brand": null,
"last_digits": null,
"expiration_month": null,
"expiration_year": null,
"qrcode_url": null,
"qrcode_signature": null,
"expiration_date": null,
"pix_key": null,
"pix_key_type": null,
"digitable_line": null,
"url": null
},
"coupons": []
},
"checkout": {
"id": null,
"url": null
},
"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
},
"lead_tracking": {
"src": "facebook",
"sck": null,
"utm_source": "facebook",
"utm_campaign": "campanha_01",
"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": "192.168.1.1"
}
}

Componentes do Payload

Customer

CampoTipoDescrição
idnullSempre null
namestring | nullNome completo do cliente
emailstring | nullE-mail do cliente
documentstring | nullCPF ou CNPJ
phone_numbersCollectionColeção de telefones
addressAddressEndereço do cliente

Telefone

CampoTipoDescrição
formatted_phonestring | nullTelefone formatado
typenullSempre null
raw_numberstring | nullNúmero bruto
area_codenullSempre null
international_dialing_codenullSempre null

Endereço

CampoTipoDescrição
streetstring | nullRua
numberstring | nullNúmero
complementstring | nullComplemento
neighborhoodstring | nullBairro
citystring | nullCidade
statestring | nullEstado
countrystring | nullPaís
postal_codestring | nullCEP

Order

CampoTipoDescrição
idstring | nullID do pedido
statusOrderStatus | nullStatus normalizado do pedido
created_atinteger | nullTimestamp de criação
updated_atinteger | nullTimestamp de atualização
paid_atinteger | nullTimestamp do pagamento aprovado
warranty_untilnullSempre null
canceled_atnullSempre null
refunded_atinteger | nullTimestamp do reembolso
raw_statusstring | nullStatus original do provider

Status Normalizados (OrderStatus)

A Kiwify retorna os seguintes valores normalizados para o status do pedido:

ValorDescrição
paidPago
refundedReembolsado
disputedEm disputa (chargedback)
failedFalhou
waiting_paymentAguardando pagamento

Payment

CampoTipoDescrição
currencystringMoeda (BRL)
totalintegerValor total (em centavos)
discount_valuenullSempre null
shipping_valuenullSempre null
total_products_valueintegerValor base dos produtos (em centavos)
payment_methodPaymentMethodMétodo de pagamento
couponsCollectionColeção de cupons (vazia)

Métodos de Pagamento (PaymentMethod)

A Kiwify retorna os seguintes métodos de pagamento:

ValorDescrição
credit_cardCartão de Crédito
pixPIX
boletoBoleto Bancário

Product

CampoTipoDescrição
idstring | nullID do produto
namestring | nullNome do produto
quantityintegerSempre 1
unit_valueintegerValor unitário (em centavos)
total_valueintegerValor total (em centavos)
image_urlnullSempre null
typestringTipo do produto (product ou subscription_plan)
offer_typestringSempre main

Checkout

CampoTipoDescrição
idnullSempre null
urlnullSempre null

Lead Tracking

CampoTipoDescrição
srcstring | nullFonte do tracking
sckstring | nullSCK
utm_sourcestring | nullUTM Source
utm_campaignstring | nullUTM Campaign
utm_mediumstring | nullUTM Medium
utm_contentstring | nullUTM Content
utm_termstring | nullUTM Term
utm_idnullSempre null
meta_fbpnullSempre null
google_ga_idnullSempre null
google_gclidnullSempre null
google_gclsrcnullSempre null
google_dclidnullSempre null
google_gbraidnullSempre null
google_wbraidnullSempre null
tiktok_ttlidnullSempre null
ipstring | nullEndereço IP do cliente

Shipping

CampoTipoDescrição
carriernullSempre null
total_valuenullSempre null
tracking_urlnullSempre null
tracking_codenullSempre null
methodnullSempre null
delivery_addressAddressEndereço de entrega
estimated_delivery_datenullSempre null
estimated_delivery_time_in_daysnullSempre null
raw_statusnullSempre null
statusnullSempre null

Endereço de Entrega

CampoTipoDescrição
streetstring | nullRua
numberstring | nullNúmero
complementstring | nullComplemento
neighborhoodstring | nullBairro
citystring | nullCidade
statestring | nullEstado
countrystring | nullPaís
postal_codestring | nullCEP

Charge (vazio)

CampoTipoDescrição
idnullSempre null
created_atnullSempre null
statusnullSempre null
typenullSempre null
valuenullSempre null

[!NOTE] Essa integração não disponibiliza informações de cobrança.


Voltar para visão geral da integração