Webhook Events
Plan updated
Aira sends this event after a field of a plan changes: its name, its description, the product that it belongs to or its active plan version. A change of the plan charges of the plan and the restore of one of its earlier plan versions each create a plan version, which becomes the active plan version.
WEBHOOK
plan.updated
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "plan.updated",
"payload": {
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Plano Essencial",
"description": "Assinatura mensal com entrega diária de pães.",
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Platform subscription"
},
"activePlanVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versionNumber": 2,
"isActive": true,
"planCharges": [
{
"category": "fixed",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 1,
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Mensalidade",
"isCustomNameEnabled": true,
"billingFrequency": {
"count": 2
},
"pricing": {
"model": "fixed",
"amount": 1,
"quantity": 2
}
}
]
}
},
"previousValues": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Plano Essencial",
"description": "Assinatura mensal com entrega diária de pães."
}
}
}Headers
Body
application/json
The event, with its identifier, its name and its payload.
Response
2XX
Answer with a 2XX status to confirm the delivery. Aira retries a delivery that gets another status, a redirect or no answer.
⌘I
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "plan.updated",
"payload": {
"plan": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Plano Essencial",
"description": "Assinatura mensal com entrega diária de pães.",
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Platform subscription"
},
"activePlanVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versionNumber": 2,
"isActive": true,
"planCharges": [
{
"category": "fixed",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 1,
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Mensalidade",
"isCustomNameEnabled": true,
"billingFrequency": {
"count": 2
},
"pricing": {
"model": "fixed",
"amount": 1,
"quantity": 2
}
}
]
}
},
"previousValues": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Plano Essencial",
"description": "Assinatura mensal com entrega diária de pães."
}
}
}