Consultar evento
curl --request GET \
--url https://api.pagstack.com/v1/events/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pagstack.com/v1/events/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/events/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"object": "event",
"type": "transaction.paid",
"livemode": true,
"created_at": "<string>",
"data": {}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Eventos
Consultar evento
Devolve um evento pelo ID, igual ao corpo que o webhook recebeu.
Consultar evento
curl --request GET \
--url https://api.pagstack.com/v1/events/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pagstack.com/v1/events/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/events/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"object": "event",
"type": "transaction.paid",
"livemode": true,
"created_at": "<string>",
"data": {}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Autorizações
Resposta
Sucesso.
Evento. É exatamente o corpo que o webhook recebe.
Opções disponíveis:
transaction.paid, transaction.expired, transaction.canceled, transaction.refunded, transaction.disputed, transaction.dispute_released, checkout.completed, checkout.expired, withdrawal.completed, withdrawal.failed, transfer.completed, bill_payment.completed, conversion.completed, subscription.created, subscription.renewed, subscription.past_due, subscription.canceled, webhook.test