Skip to content

Product Redemption

The main purpose of this webhook is to provide a real-time notification when a user redeems a product from the gamification shop.

ParameterTypeDescription
namestringName of the event: “Resgate do Produto”
slugstringUnique identifier: shop.product.redemption
send_atstringDate and time of the event (format: “yyyy-MM-dd HH:mm:ss”)

ParameterTypeDescription
idstringNumerical identifier of the user.
namestringName of the user.
emailstringEmail address of the user.
addressobjectAddress information for the user.
address.cepstringZIP code.
address.ufstringState.
address.cidadestringCity.
address.bairrostringNeighborhood.
address.logradourostringStreet address.
address.numerostringAddress number.
address.complementostringAddress complement.
address.referenciastringReference point for the address.
ParameterTypeDescription
idstringUnique identifier for the redemption.
exchange_datestringDate and time of the redemption (format: “yyyy-MM-dd HH:mm:ss”).
quantitystringQuantity of the product redeemed.
total_paymentstringTotal payment amount.
institutionobjectInstitution related to the redemption.
institution.idstringInstitution identifier.
institution.namestringInstitution name.
schoolobjectSchool related to the redemption.
school.idstringSchool identifier.
school.namestringSchool name.
productobjectRedeemed product details.
product.idstringProduct identifier.
product.namestringProduct name.
product.typestringProduct type.
product.pricestringProduct price.
product.stock_leftstringRemaining quantity in stock.

The event will be triggered when a user redeems a product from the gamification shop.

{
"event": {
"name": "Resgate do Produto",
"slug": "shop.product.redemption",
"send_at": "2023-06-20 14:53:00"
},
"data": {
"user": {
"id": "123",
"name": "Student",
"email": "student@toolzz.me",
"address": {
"cep": "12345-123",
"uf": "SP",
"cidade": "City Name",
"bairro": "Neighborhood Name",
"logradouro": "Address",
"numero": "01",
"complemento": "Next to house X",
"referencia": "Ref"
}
},
"exchange": {
"id": "321",
"exchange_date": "2023-06-20 14:52:59",
"quantity": "1",
"total_payment": "39",
"institution": {
"id": "123456",
"name": "Institution Name"
},
"school": {
"id": "654",
"name": "School Name"
},
"product": {
"id": "213",
"name": "Product Name",
"type": "price",
"price": "39",
"stock_left": "49"
}
}
}
}

Ensure that the destination URL is correct before you start sending payloads. Verify that the parameters sent are correct and complete. Make sure that the webhook recipients are correct and valid. Log and monitor all webhook calls for auditing and troubleshooting purposes.