Ticto - Subscription
Eventos da família subscription.* na integração Ticto.
Eventos Disponíveis
subscription.completedsubscription.past_duesubscription.canceled
Estrutura do Payload
{ "event": "subscription.completed", "customer": { "id": "CUST-001", "name": "João Silva", "document": "12345678900", "phone_numbers": [ { "formatted_phone": "11999999999", "type": null, "raw_number": "11999999999", "area_code": null, "international_dialing_code": null } ], "address": { "street": "Rua Example", "number": "123", "complement": "Apto 1", "neighborhood": "Bairro", "city": "São Paulo", "state": "SP", "country": "BR", "postal_code": "01234567" } }, "subscription": { "id": "SUB-001", "name": null, "status": "completed", "created_at": 1705319000, "updated_at": 1705319000, "canceled_at": null, "charged_times": 12, "cancellation_reason": null, "current_cycle": null, "current_cycle_start": null, "current_cycle_end": null }, "product": { "id": "PROD-001", "name": "Plano Mensal", "quantity": 1, "unit_value": 4900, "total_value": 4900, "image_url": null, "type": "subscription_plan", "offer_type": "main" }, "lead_tracking": { "src": "facebook", "sck": null, "utm_source": "facebook", "utm_campaign": "campanha", "utm_medium": "social", "utm_content": "ads", "utm_term": "termo", "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 | Descrição |
|---|---|---|
id | string | null | Código do cliente |
name | string | null | Nome do cliente |
document | string | null | Número do documento (CPF/CNPJ) |
email | string | null | Email do cliente |
phoneNumbers | Collection | Coleção de telefones |
address | Address | Endereço do cliente |
Subcomponentes
| Campo | Tipo | Descrição |
|---|---|---|
street | string | null | Nome da rua |
number | string | null | Número |
complement | string | null | Complemento |
neighborhood | string | null | Bairro |
city | string | null | Cidade |
state | string | null | Estado (UF) |
country | string | null | País |
postalCode | string | null | CEP |
Telefones
| Campo | Tipo | Descrição |
|---|---|---|
formattedPhone | PhoneFactory | null | Telefone formatado |
type | null | Sempre null |
rawNumber | string | null | Número bruto |
areaCode | string | null | Código de área (DDD) |
internationalDialingCode | string | null | Código DDI |
Subscription
| Campo | Tipo | Descrição |
|---|---|---|
id | string | null | ID da assinatura |
name | null | Sempre null |
status | SubscriptionStatus | null | Status normalizado da assinatura |
createdAt | Carbon | null | Data de criação |
updatedAt | Carbon | null | Data de atualização |
canceledAt | Carbon | null | Data do cancelamento |
chargedTimes | int | null | Número de cobranças realizadas |
cancellationReason | null | Sempre null |
currentCycle | null | Sempre null |
currentCycleStart | null | Sempre null |
currentCycleEnd | null | Sempre null |
Status Normalizados (SubscriptionStatus)
A Ticto retorna os seguintes valores normalizados para o status da assinatura:
| Valor | Descrição |
|---|---|
completed | Concluída |
past_due | Atrasada |
canceled | Cancelada |
Product
| Campo | Tipo | Descrição |
|---|---|---|
id | string | null | ID do produto |
name | string | null | Nome do produto |
quantity | int | null | Quantidade |
unitValue | int | null | Valor unitário em centavos |
totalValue | int | null | Valor total |
imageUrl | null | Sempre null |
type | string | Sempre product |
offerType | string | Sempre main |
LeadTracking
| Campo | Tipo | Descrição |
|---|---|---|
src | string | null | Fonte do tráfego |
sck | string | null | SCK |
utmSource | string | null | Fonte UTM |
utmCampaign | string | null | Campanha UTM |
utmMedium | string | null | Meio UTM |
utmContent | string | null | Conteúdo UTM |
utmTerm | string | null | Termo UTM |
utmId | null | Sempre null |
metaFbp | string | null | Meta FBP |
googleGaId | null | Sempre null |
googleGclid | string | null | Google GCLID |
googleGclsrc | null | Sempre null |
googleDclid | null | Sempre null |
googleGbraid | null | Sempre null |
googleWbraid | null | Sempre null |
tiktokTtlid | null | Sempre null |
ip | null | Sempre null |