cURL
curl --request GET \
--url https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}', 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.cloud.pepperpay.com.br/public/v1/transactions/{hash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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.cloud.pepperpay.com.br/public/v1/transactions/{hash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <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.cloud.pepperpay.com.br/public/v1/transactions/{hash}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"event": "transaction",
"hash": "abc123def456",
"payment_method": "credit_card",
"payment_status": "paid",
"installments": 1,
"pix": null,
"billet": null,
"amount": 10000,
"amount_liquid": 9500,
"transaction": "txn_123456",
"utm_source": "google",
"utm_campaign": null,
"utm_content": null,
"utm_term": "pagamento",
"utm_medium": "cpc",
"customer": {
"hash": "cust_123",
"name": "João Silva",
"email": "joao@email.com",
"phone_number": "11999999999",
"document": "12345678901"
},
"producer": {
"hash": "prod_123",
"name": "Produtor XYZ",
"email": "produtor@email.com"
},
"affiliate": null,
"split_recipients": [
{
"recipient_type": "producer",
"amount": "8000"
},
{
"recipient_type": "platform",
"amount": "1500"
}
],
"offer": {
"hash": "off_123",
"title": "Curso Completo",
"price": 10000,
"installments": 1
},
"product": {
"hash": "prod_123",
"title": "Curso de Marketing Digital",
"cover": "https://example.com/cover.jpg",
"status": "active"
},
"items": [
{
"hash": "item_123",
"product_id": 1,
"operation_type": 1
}
],
"balance": {
"amount": 9500,
"status": "available"
},
"postback_url": "https://webhook.example.com",
"created_at": "2024",
"updated_at": "2024"
}Transações
Obter transação específica
Obtenha dados de uma transação específica.
GET
/
transactions
/
{hash}
cURL
curl --request GET \
--url https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}', 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.cloud.pepperpay.com.br/public/v1/transactions/{hash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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.cloud.pepperpay.com.br/public/v1/transactions/{hash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <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.cloud.pepperpay.com.br/public/v1/transactions/{hash}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"event": "transaction",
"hash": "abc123def456",
"payment_method": "credit_card",
"payment_status": "paid",
"installments": 1,
"pix": null,
"billet": null,
"amount": 10000,
"amount_liquid": 9500,
"transaction": "txn_123456",
"utm_source": "google",
"utm_campaign": null,
"utm_content": null,
"utm_term": "pagamento",
"utm_medium": "cpc",
"customer": {
"hash": "cust_123",
"name": "João Silva",
"email": "joao@email.com",
"phone_number": "11999999999",
"document": "12345678901"
},
"producer": {
"hash": "prod_123",
"name": "Produtor XYZ",
"email": "produtor@email.com"
},
"affiliate": null,
"split_recipients": [
{
"recipient_type": "producer",
"amount": "8000"
},
{
"recipient_type": "platform",
"amount": "1500"
}
],
"offer": {
"hash": "off_123",
"title": "Curso Completo",
"price": 10000,
"installments": 1
},
"product": {
"hash": "prod_123",
"title": "Curso de Marketing Digital",
"cover": "https://example.com/cover.jpg",
"status": "active"
},
"items": [
{
"hash": "item_123",
"product_id": 1,
"operation_type": 1
}
],
"balance": {
"amount": 9500,
"status": "available"
},
"postback_url": "https://webhook.example.com",
"created_at": "2024",
"updated_at": "2024"
}Autorizações
Use o token da Pepper API no formato: Bearer {seu_token_aqui}
Parâmetros de caminho
Hash ID da transação
Resposta
200 - application/json
Dados da transação retornados com sucesso
Tipo do evento
Hash ID da transação
Método de pagamento utilizado
Status do pagamento
Número de parcelas se a transação foi no cartão de crédito
Dados específicos do PIX
Dados específicos do boleto
Valor total em centavos
Valor líquido em centavos
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
URL do webhook
Data de criação
Data de atualização
⌘I