Webhooks
Payment account updated
Aira sends this event after a field of a payment account changes: its names, its tax id, its phone, its address, its invoice recipients, its archive, its restore, and whether it is the default payment account of its customer. A change of the default payment account sends one event for the old default and one for the new default, also when the archive of the default makes another payment account the default. Each change of the details of a payment account gives its legalEntity a new id, so previousValues carries the old legalEntity after each one.
WEBHOOK
payment-account.updated
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event": "payment-account.updated",
"payload": {
"paymentAccount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"isDefault": true,
"legalEntity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"businessName": "Padaria Central Ltda",
"taxId": "01234567000195",
"tradeName": "Padaria Central",
"emails": [],
"phone": "11987654321",
"zipCode": "01310100",
"street": "Avenida Paulista",
"number": "1000",
"neighborhood": "Bela Vista",
"city": "São Paulo",
"complement": "Sala 12"
}
},
"previousValues": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"isDefault": true
}
}
}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": "payment-account.updated",
"payload": {
"paymentAccount": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"isDefault": true,
"legalEntity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"businessName": "Padaria Central Ltda",
"taxId": "01234567000195",
"tradeName": "Padaria Central",
"emails": [],
"phone": "11987654321",
"zipCode": "01310100",
"street": "Avenida Paulista",
"number": "1000",
"neighborhood": "Bela Vista",
"city": "São Paulo",
"complement": "Sala 12"
}
},
"previousValues": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"isDefault": true
}
}
}