EadPlataforma - Subscription
Eventos da família subscription.* na integração EadPlataforma.
Eventos Disponíveis
subscription.activesubscription.canceled
Estrutura do Payload
{ "customer": { "id": "CUST-123456", "name": "Joao Silva", "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": "Sao Paulo", "state": "SP", "country": "BR", "postal_code": "01000-000" } }, "subscription": { "id": "SUB-123", "name": "Plano Mensal", "created_at": 1705319000, "updated_at": null, "canceled_at": null, "cancellation_reason": null, "charged_times": 5, "current_cycle": null, "current_cycle_start": null, "current_cycle_end": null, "status": "active" }, "payment": { "currency": "BRL", "total": 9970, "discount_value": null, "shipping_value": null, "total_products_value": null, "payment_method": { "qrcode_url": null, "qrcode_signature": "1234567890abcdef", "expiration_date": null, "pix_key": null, "pix_key_type": null, "digitable_line": null, "url": null, "type": "pix" }, "coupons": [] }, "product": { "id": "PROD-456", "name": "Curso Online", "quantity": null, "unit_value": 9970, "total_value": 9970, "image_url": null, "type": "product", "offer_type": "main" }, "charge": { "id": null, "created_at": null, "status": null, "type": null, "value": null }, "products": [ { "id": "PROD-456", "name": "Curso Online", "quantity": null, "unit_value": 9970, "total_value": 9970, "image_url": null, "type": "product", "offer_type": "main" } ]}Componentes do Payload
Customer
| Campo | Tipo | Descrição |
|---|---|---|
id | string | null | ID do cliente |
name | string | null | Nome completo do cliente |
email | string | null | E-mail do cliente |
document | string | null | CPF ou CNPJ do cliente |
phone_numbers | Phone[] | null | Coleção de telefones do cliente |
address | Address | Endereço do cliente |
Address
Endereço do cliente.
| Campo | Tipo | Descricao |
|---|---|---|
street | string | null | Nome da rua |
number | string | null | Numero |
complement | string | null | Complemento |
neighborhood | string | null | Bairro |
city | string | null | Cidade |
state | string | null | Estado (sigla) |
country | string | null | Codigo ISO 3166-1 alpha-2 |
postal_code | string | null | CEP |
Phone
Telefone do cliente.
| Campo | Tipo | Descricao |
|---|---|---|
formatted_phone | string | null | Telefone formatado |
type | null | Sempre null |
raw_number | string | null | Numero bruto |
area_code | null | Sempre null |
international_dialing_code | null | Sempre null |
Subscription
| Campo | Tipo | Descrição |
|---|---|---|
id | string | null | ID da assinatura |
name | string | null | Nome do plano de assinatura |
created_at | integer | null | Timestamp de criação |
updated_at | null | Sempre null |
canceled_at | null | Sempre null |
cancellation_reason | null | Sempre null |
charged_times | integer | null | Número de cobranças realizadas |
current_cycle | null | Sempre null |
current_cycle_start | null | Sempre null |
current_cycle_end | null | Sempre null |
status | string | null | Status normalizado da assinatura |
Status Normalizados (SubscriptionStatus)
A EadPlataforma retorna os seguintes valores normalizados para o status da assinatura:
| Valor | Descrição |
|---|---|
active | Assinatura ativa |
canceled | Cancelada |
Payment
| Campo | Tipo | Descrição |
|---|---|---|
currency | string | null | Moeda em formato ISO 4217 |
total | integer | null | Valor total em centavos |
discount_value | null | Sempre null |
shipping_value | null | Sempre null |
total_products_value | null | Sempre null |
payment_method | object | null | Método de pagamento (Boleto ou Pix) |
coupons | array | Array vazio (EadPlataforma não suporta cupons) |
Métodos de Pagamento
Boleto
| Campo | Tipo | Descricao |
|---|---|---|
type | string | Sempre boleto |
digitable_line | string | null | Linha digitavel do boleto |
url | string | null | URL do boleto |
expiration_date | null | Sempre null |
Pix
| Campo | Tipo | Descricao |
|---|---|---|
type | string | Sempre pix |
qrcode_url | null | Sempre null |
qrcode_signature | string | null | Assinatura do QR Code Pix |
expiration_date | null | Sempre null |
pix_key | null | Sempre null |
pix_key_type | null | Sempre null |
Product
| Campo | Tipo | Descrição |
|---|---|---|
id | string | null | ID do produto |
name | string | null | Nome do produto |
quantity | null | Sempre null |
unit_value | integer | null | Valor unitário em centavos |
total_value | integer | null | Valor total em centavos |
image_url | null | Sempre null |
type | string | Tipo do produto (product) |
offer_type | string | Tipo da oferta (main) |
Charge (vazio)
| Campo | Tipo | Descrição |
|---|---|---|
id | null | Sempre null |
created_at | null | Sempre null |
status | null | Sempre null |
type | null | Sempre null |
value | null | Sempre null |
[!NOTE] Essa integração não disponibiliza informações de cobrança.