Pular para o conteúdo

Hotmart - Subscription Transaction

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

Veja também Estrutura geral dos eventos Subscription Transaction para referência completa.

Eventos Disponíveis

  • subscription_transaction.waiting_payment
  • subscription_transaction.waiting_payment.pix
  • subscription_transaction.waiting_payment.credit_card
  • subscription_transaction.waiting_payment.boleto
  • subscription_transaction.paid
  • subscription_transaction.refunded
  • subscription_transaction.disputed
  • subscription_transaction.expired
  • subscription_transaction.updated

Estrutura do Payload

{
"customer": {
"id": null,
"name": "João Silva",
"email": "[email protected]",
"document": "12345678900",
"phone_numbers": [
{
"formatted_phone": "+5511999999999",
"type": null,
"raw_number": "11999999999",
"area_code": "11",
"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": "ord_123456",
"status": "paid",
"raw_status": "PAID",
"created_at": 1705319000,
"updated_at": 1705319100,
"paid_at": 1705319200,
"canceled_at": null,
"refunded_at": null,
"warranty_until": null
},
"subscription": {
"id": "sub_123456",
"name": "Plano Mensal",
"status": "active",
"created_at": null,
"updated_at": null,
"canceled_at": null,
"charged_times": null,
"cancellation_reason": null,
"current_cycle": null,
"current_cycle_start": null,
"current_cycle_end": null
},
"charge": {
"id": null,
"created_at": null,
"status": null,
"type": null,
"value": null
},
"checkout": {
"id": null,
"url": null
},
"payment": {
"currency": "BRL",
"total": 29990,
"discount_value": null,
"shipping_value": null,
"total_products_value": 29990,
"payment_method": {
"type": "credit_card",
"brand": null,
"last_digits": null,
"expiration_month": null,
"expiration_year": null
},
"coupons": []
},
"shipping": {
"carrier": null,
"total_value": 0,
"tracking_url": null,
"tracking_code": null,
"method": null,
"delivery_address": null,
"estimated_delivery_date": null,
"estimated_delivery_time_in_days": null,
"raw_status": null,
"status": null
},
"products": [
{
"id": "prod_789",
"name": "Assinatura Mensal",
"type": "subscription_plan",
"offer_type": "main",
"quantity": 1,
"unit_value": 29990,
"total_value": 29990,
"image_url": null
}
],
"lead_tracking": {
"src": "facebook",
"sck": "campaign123",
"utm_source": null,
"utm_campaign": null,
"utm_medium": null,
"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

Informações do cliente.

CampoTipoDescricao
idnullSempre null - Hotmart nao fornece ID do cliente
namestring | nullNome completo do cliente
emailstring | nullE-mail do cliente
documentstring | nullCPF ou CNPJ do cliente
phone_numbersPhone[] | nullColecao de telefones do cliente
addressAddressEndereco do cliente

Address

Endereco do cliente.

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

Phone

Telefone do cliente. Hotmart pode enviar ate dois telefones (phone_number e phone_checkout_number).

CampoTipoDescrição
formatted_phonestring | nullTelefone formatado em E.164
typenullSempre null
raw_numberstring | nullNúmero sem formatação
area_codestring | nullCódigo de área (DDD)
international_dialing_codenullSempre null

Subscription

Dados da assinatura.

CampoTipoDescrição
idstring | nullCódigo do assinante (subscriber_code)
namestring | nullNome do plano de assinatura
statusstringStatus normalizado
created_atnullSempre null
updated_atnullSempre null
canceled_atinteger | nullTimestamp do cancelamento
charged_timesnullSempre null
cancellation_reasonnullSempre null
current_cyclenullSempre null
current_cycle_startnullSempre null
current_cycle_endnullSempre null

Status Normalizados (SubscriptionStatus)

A Hotmart retorna os seguintes valores normalizados para o status da assinatura:

ValorDescrição
activeAssinatura ativa
trialEm período de teste
pausedAssinatura pausada
past_dueAssinatura com pagamento em atraso
canceledAssinatura cancelada
completedAssinatura concluída

Charge

Dados da cobrança da assinatura.

Dados da cobrança da assinatura.

CampoTipoDescrição
idnullSempre null
subscription_cyclenullSempre null
typenullSempre null
statusnullSempre null
valuenullSempre null
created_atnullSempre null
cycle_startnullSempre null
cycle_endnullSempre null

Checkout

Informações do checkout.

Informações do checkout.

CampoTipoDescrição
idnullSempre null
urlnullSempre null

Payment

Dados financeiros.

CampoTipoDescrição
currencystring | nullMoeda em formato ISO 4217
totalinteger | nullValor total em centavos
discount_valuenullSempre null
shipping_valuenullSempre null
total_products_valueinteger | nullValor total dos produtos em centavos
payment_methodobject | nullMétodo de Pagamento
couponsarrayArray vazio (não suportado)

Product

Plano de assinatura.

CampoTipoDescrição
idstring | nullID do produto
namestring | nullNome do produto
typestringTipo: product
offer_typestringTipo de oferta: main, order_bump
quantityinteger | nullQuantidade
unit_valueinteger | nullValor unitário em centavos
total_valueinteger | nullValor total em centavos
image_urlstring | nullURL da imagem

Shipping

Dados de envio.

Informações de envio. Como a Hotmart é focada em produtos digitais, a maioria dos campos será null.

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

Delivery Address

Endereço de entrega.

CampoTipoDescrição
streetstring | nullLogradouro
numberstring | nullNúmero
complementstring | nullComplemento
citystring | nullCidade
statestring | nullEstado/UF
postal_codestring | nullCEP

LeadTracking

Dados de rastreamento de marketing.

CampoTipoDescrição
srcstring | nullFonte genérica
sckstring | nullCódigo de rastreamento interno
utm_sourcenullSempre null
utm_campaignnullSempre null
utm_mediumnullSempre null
utm_contentnullSempre null
utm_termnullSempre null
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
ipnullSempre null

Voltar para visão geral da integração