Webhooks and Callbacks
Query webhook requests
Returns every webhook attempt associated with the specified transaction. Optional query parameters let you filter by endpoint, event type, status, or HTTP response code.
GET
/
v1.1
/
transactions
/
{transactionUUID}
/
webhook
Query webhook requests
curl --request GET \
--url https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-token: <x-api-token>'import requests
url = "https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook"
headers = {
"x-api-key": "<x-api-key>",
"x-api-token": "<x-api-token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-api-token': '<x-api-token>'}
};
fetch('https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-api-token: <x-api-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-token", "<x-api-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook")
.header("x-api-key", "<x-api-key>")
.header("x-api-token", "<x-api-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-token"] = '<x-api-token>'
response = http.request(request)
puts response.read_body{
"status": 0,
"message": "success",
"notifications": [
{
"date": "2019-02-12 16:59:12",
"endpoint": "https://foo.bar/paymeeListener",
"eventType": "PAYMENT_CONFIRMATION",
"status": "SUCCESS",
"responseCode": 200,
"request": {
"headers": {
"Content-type": "application/json"
},
"payload": "{\"saleToken\":\"{transactionUUID}\",\"referenceCode\":\"01992211212782433139\",\"currency\":\"BRL\",\"amount\":11.00,\"shopper\":{\"fullName\":\"JOHN DOE\",\"firstName\":\"JHON\",\"lastName\":\"DOE\",\"email\":\"foo@bar.com\",\"cpf\":\"00000000000\"},\"date\":\"2019-02-12 17:29:33\",\"newStatus\":\"PAID\"}"
},
"response": {
"headers": {
"Content-Length": "0"
},
"body": "ok"
}
}
]
}{
"status": -1,
"message": "field validation failure",
"errorCount": 1,
"errors": [
{
"field": "eventType",
"message": "invalid value"
}
]
}{
"errorCount": 1,
"errors": [
{
"error": "Forbidden",
"message": "Access Denied"
}
],
"message": "field validation failure",
"status": -1
}{
"status": 998,
"message": "transaction not found",
"errorCount": 1,
"errors": [
{
"field": "transactionUUID",
"message": "A transação informada não existe."
}
]
}Headers
Query Parameters
⌘I
Query webhook requests
curl --request GET \
--url https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-token: <x-api-token>'import requests
url = "https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook"
headers = {
"x-api-key": "<x-api-key>",
"x-api-token": "<x-api-token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-api-token': '<x-api-token>'}
};
fetch('https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-api-token: <x-api-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-token", "<x-api-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook")
.header("x-api-key", "<x-api-key>")
.header("x-api-token", "<x-api-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paymee.com.br/v1.1/transactions/{transactionUUID}/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-token"] = '<x-api-token>'
response = http.request(request)
puts response.read_body{
"status": 0,
"message": "success",
"notifications": [
{
"date": "2019-02-12 16:59:12",
"endpoint": "https://foo.bar/paymeeListener",
"eventType": "PAYMENT_CONFIRMATION",
"status": "SUCCESS",
"responseCode": 200,
"request": {
"headers": {
"Content-type": "application/json"
},
"payload": "{\"saleToken\":\"{transactionUUID}\",\"referenceCode\":\"01992211212782433139\",\"currency\":\"BRL\",\"amount\":11.00,\"shopper\":{\"fullName\":\"JOHN DOE\",\"firstName\":\"JHON\",\"lastName\":\"DOE\",\"email\":\"foo@bar.com\",\"cpf\":\"00000000000\"},\"date\":\"2019-02-12 17:29:33\",\"newStatus\":\"PAID\"}"
},
"response": {
"headers": {
"Content-Length": "0"
},
"body": "ok"
}
}
]
}{
"status": -1,
"message": "field validation failure",
"errorCount": 1,
"errors": [
{
"field": "eventType",
"message": "invalid value"
}
]
}{
"errorCount": 1,
"errors": [
{
"error": "Forbidden",
"message": "Access Denied"
}
],
"message": "field validation failure",
"status": -1
}{
"status": 998,
"message": "transaction not found",
"errorCount": 1,
"errors": [
{
"field": "transactionUUID",
"message": "A transação informada não existe."
}
]
}
