curl --request POST \
--url https://api.cloud.pepperpay.com.br/public/v1/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_token": "token_123",
"amount": 10000,
"payment_method": "pix",
"cart": [
{
"offer_hash": "off_123",
"price": 10000,
"quantity": 1,
"operation_type": 1,
"title": "oferta promocional",
"cover": "https://google.com/image"
}
],
"installments": 1,
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"phone_number": "11999999999",
"document": "12345678901"
},
"tracking": {
"src": "google",
"utm_source": "google",
"utm_campaign": "black_friday",
"utm_content": "banner_1",
"utm_term": "pagamento",
"utm_medium": "cpc"
},
"webhook_url": "https://meusite.com/webhook"
}
'import requests
url = "https://api.cloud.pepperpay.com.br/public/v1/transactions"
payload = {
"api_token": "token_123",
"amount": 10000,
"payment_method": "pix",
"cart": [
{
"offer_hash": "off_123",
"price": 10000,
"quantity": 1,
"operation_type": 1,
"title": "oferta promocional",
"cover": "https://google.com/image"
}
],
"installments": 1,
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"phone_number": "11999999999",
"document": "12345678901"
},
"tracking": {
"src": "google",
"utm_source": "google",
"utm_campaign": "black_friday",
"utm_content": "banner_1",
"utm_term": "pagamento",
"utm_medium": "cpc"
},
"webhook_url": "https://meusite.com/webhook"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_token: 'token_123',
amount: 10000,
payment_method: 'pix',
cart: [
{
offer_hash: 'off_123',
price: 10000,
quantity: 1,
operation_type: 1,
title: 'oferta promocional',
cover: 'https://google.com/image'
}
],
installments: 1,
customer: {
name: 'João Silva',
email: 'joao@email.com',
phone_number: '11999999999',
document: '12345678901'
},
tracking: {
src: 'google',
utm_source: 'google',
utm_campaign: 'black_friday',
utm_content: 'banner_1',
utm_term: 'pagamento',
utm_medium: 'cpc'
},
webhook_url: 'https://meusite.com/webhook'
})
};
fetch('https://api.cloud.pepperpay.com.br/public/v1/transactions', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'api_token' => 'token_123',
'amount' => 10000,
'payment_method' => 'pix',
'cart' => [
[
'offer_hash' => 'off_123',
'price' => 10000,
'quantity' => 1,
'operation_type' => 1,
'title' => 'oferta promocional',
'cover' => 'https://google.com/image'
]
],
'installments' => 1,
'customer' => [
'name' => 'João Silva',
'email' => 'joao@email.com',
'phone_number' => '11999999999',
'document' => '12345678901'
],
'tracking' => [
'src' => 'google',
'utm_source' => 'google',
'utm_campaign' => 'black_friday',
'utm_content' => 'banner_1',
'utm_term' => 'pagamento',
'utm_medium' => 'cpc'
],
'webhook_url' => 'https://meusite.com/webhook'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloud.pepperpay.com.br/public/v1/transactions"
payload := strings.NewReader("{\n \"api_token\": \"token_123\",\n \"amount\": 10000,\n \"payment_method\": \"pix\",\n \"cart\": [\n {\n \"offer_hash\": \"off_123\",\n \"price\": 10000,\n \"quantity\": 1,\n \"operation_type\": 1,\n \"title\": \"oferta promocional\",\n \"cover\": \"https://google.com/image\"\n }\n ],\n \"installments\": 1,\n \"customer\": {\n \"name\": \"João Silva\",\n \"email\": \"joao@email.com\",\n \"phone_number\": \"11999999999\",\n \"document\": \"12345678901\"\n },\n \"tracking\": {\n \"src\": \"google\",\n \"utm_source\": \"google\",\n \"utm_campaign\": \"black_friday\",\n \"utm_content\": \"banner_1\",\n \"utm_term\": \"pagamento\",\n \"utm_medium\": \"cpc\"\n },\n \"webhook_url\": \"https://meusite.com/webhook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloud.pepperpay.com.br/public/v1/transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_token\": \"token_123\",\n \"amount\": 10000,\n \"payment_method\": \"pix\",\n \"cart\": [\n {\n \"offer_hash\": \"off_123\",\n \"price\": 10000,\n \"quantity\": 1,\n \"operation_type\": 1,\n \"title\": \"oferta promocional\",\n \"cover\": \"https://google.com/image\"\n }\n ],\n \"installments\": 1,\n \"customer\": {\n \"name\": \"João Silva\",\n \"email\": \"joao@email.com\",\n \"phone_number\": \"11999999999\",\n \"document\": \"12345678901\"\n },\n \"tracking\": {\n \"src\": \"google\",\n \"utm_source\": \"google\",\n \"utm_campaign\": \"black_friday\",\n \"utm_content\": \"banner_1\",\n \"utm_term\": \"pagamento\",\n \"utm_medium\": \"cpc\"\n },\n \"webhook_url\": \"https://meusite.com/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.pepperpay.com.br/public/v1/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_token\": \"token_123\",\n \"amount\": 10000,\n \"payment_method\": \"pix\",\n \"cart\": [\n {\n \"offer_hash\": \"off_123\",\n \"price\": 10000,\n \"quantity\": 1,\n \"operation_type\": 1,\n \"title\": \"oferta promocional\",\n \"cover\": \"https://google.com/image\"\n }\n ],\n \"installments\": 1,\n \"customer\": {\n \"name\": \"João Silva\",\n \"email\": \"joao@email.com\",\n \"phone_number\": \"11999999999\",\n \"document\": \"12345678901\"\n },\n \"tracking\": {\n \"src\": \"google\",\n \"utm_source\": \"google\",\n \"utm_campaign\": \"black_friday\",\n \"utm_content\": \"banner_1\",\n \"utm_term\": \"pagamento\",\n \"utm_medium\": \"cpc\"\n },\n \"webhook_url\": \"https://meusite.com/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"event": "transaction",
"hash": "abc123def456",
"payment_method": "pix",
"payment_status": "waiting_payment",
"installments": 1,
"pix": {
"pix_url": "https://api.pagar.me/core/v5/transactions/tran_wMV0O5gC5Esx46qW/qrcode?payment_method=pix",
"pix_qr_code": "00020101021226820014br.gov.bcb.pix2560pix.stone.com.br/pix/v2/5dfc6ddb-dd19-45ce-a1fe-ea94fbe96acf520400005303986540567.005802BR5925Pagar Me Instituicao De P6014RIO DE JANEIRO622905251e89c398ad8f443503ffd810f6304E5DF",
"qr_code_base64": 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": {
"name": "Produtor XYZ"
},
"affiliate": null,
"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
}
],
"postback_url": "https://webhook.example.com",
"tracking_code": null,
"created_at": "2024-01-01 10:00:00",
"updated_at": "2024-01-01 10:00:00"
}{
"success": true,
"message": "<string>",
"errors": [
"<string>"
]
}Criar uma transação (PIX)
Cria uma nova transação PIX
curl --request POST \
--url https://api.cloud.pepperpay.com.br/public/v1/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"api_token": "token_123",
"amount": 10000,
"payment_method": "pix",
"cart": [
{
"offer_hash": "off_123",
"price": 10000,
"quantity": 1,
"operation_type": 1,
"title": "oferta promocional",
"cover": "https://google.com/image"
}
],
"installments": 1,
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"phone_number": "11999999999",
"document": "12345678901"
},
"tracking": {
"src": "google",
"utm_source": "google",
"utm_campaign": "black_friday",
"utm_content": "banner_1",
"utm_term": "pagamento",
"utm_medium": "cpc"
},
"webhook_url": "https://meusite.com/webhook"
}
'import requests
url = "https://api.cloud.pepperpay.com.br/public/v1/transactions"
payload = {
"api_token": "token_123",
"amount": 10000,
"payment_method": "pix",
"cart": [
{
"offer_hash": "off_123",
"price": 10000,
"quantity": 1,
"operation_type": 1,
"title": "oferta promocional",
"cover": "https://google.com/image"
}
],
"installments": 1,
"customer": {
"name": "João Silva",
"email": "joao@email.com",
"phone_number": "11999999999",
"document": "12345678901"
},
"tracking": {
"src": "google",
"utm_source": "google",
"utm_campaign": "black_friday",
"utm_content": "banner_1",
"utm_term": "pagamento",
"utm_medium": "cpc"
},
"webhook_url": "https://meusite.com/webhook"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
api_token: 'token_123',
amount: 10000,
payment_method: 'pix',
cart: [
{
offer_hash: 'off_123',
price: 10000,
quantity: 1,
operation_type: 1,
title: 'oferta promocional',
cover: 'https://google.com/image'
}
],
installments: 1,
customer: {
name: 'João Silva',
email: 'joao@email.com',
phone_number: '11999999999',
document: '12345678901'
},
tracking: {
src: 'google',
utm_source: 'google',
utm_campaign: 'black_friday',
utm_content: 'banner_1',
utm_term: 'pagamento',
utm_medium: 'cpc'
},
webhook_url: 'https://meusite.com/webhook'
})
};
fetch('https://api.cloud.pepperpay.com.br/public/v1/transactions', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'api_token' => 'token_123',
'amount' => 10000,
'payment_method' => 'pix',
'cart' => [
[
'offer_hash' => 'off_123',
'price' => 10000,
'quantity' => 1,
'operation_type' => 1,
'title' => 'oferta promocional',
'cover' => 'https://google.com/image'
]
],
'installments' => 1,
'customer' => [
'name' => 'João Silva',
'email' => 'joao@email.com',
'phone_number' => '11999999999',
'document' => '12345678901'
],
'tracking' => [
'src' => 'google',
'utm_source' => 'google',
'utm_campaign' => 'black_friday',
'utm_content' => 'banner_1',
'utm_term' => 'pagamento',
'utm_medium' => 'cpc'
],
'webhook_url' => 'https://meusite.com/webhook'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloud.pepperpay.com.br/public/v1/transactions"
payload := strings.NewReader("{\n \"api_token\": \"token_123\",\n \"amount\": 10000,\n \"payment_method\": \"pix\",\n \"cart\": [\n {\n \"offer_hash\": \"off_123\",\n \"price\": 10000,\n \"quantity\": 1,\n \"operation_type\": 1,\n \"title\": \"oferta promocional\",\n \"cover\": \"https://google.com/image\"\n }\n ],\n \"installments\": 1,\n \"customer\": {\n \"name\": \"João Silva\",\n \"email\": \"joao@email.com\",\n \"phone_number\": \"11999999999\",\n \"document\": \"12345678901\"\n },\n \"tracking\": {\n \"src\": \"google\",\n \"utm_source\": \"google\",\n \"utm_campaign\": \"black_friday\",\n \"utm_content\": \"banner_1\",\n \"utm_term\": \"pagamento\",\n \"utm_medium\": \"cpc\"\n },\n \"webhook_url\": \"https://meusite.com/webhook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloud.pepperpay.com.br/public/v1/transactions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"api_token\": \"token_123\",\n \"amount\": 10000,\n \"payment_method\": \"pix\",\n \"cart\": [\n {\n \"offer_hash\": \"off_123\",\n \"price\": 10000,\n \"quantity\": 1,\n \"operation_type\": 1,\n \"title\": \"oferta promocional\",\n \"cover\": \"https://google.com/image\"\n }\n ],\n \"installments\": 1,\n \"customer\": {\n \"name\": \"João Silva\",\n \"email\": \"joao@email.com\",\n \"phone_number\": \"11999999999\",\n \"document\": \"12345678901\"\n },\n \"tracking\": {\n \"src\": \"google\",\n \"utm_source\": \"google\",\n \"utm_campaign\": \"black_friday\",\n \"utm_content\": \"banner_1\",\n \"utm_term\": \"pagamento\",\n \"utm_medium\": \"cpc\"\n },\n \"webhook_url\": \"https://meusite.com/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.pepperpay.com.br/public/v1/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"api_token\": \"token_123\",\n \"amount\": 10000,\n \"payment_method\": \"pix\",\n \"cart\": [\n {\n \"offer_hash\": \"off_123\",\n \"price\": 10000,\n \"quantity\": 1,\n \"operation_type\": 1,\n \"title\": \"oferta promocional\",\n \"cover\": \"https://google.com/image\"\n }\n ],\n \"installments\": 1,\n \"customer\": {\n \"name\": \"João Silva\",\n \"email\": \"joao@email.com\",\n \"phone_number\": \"11999999999\",\n \"document\": \"12345678901\"\n },\n \"tracking\": {\n \"src\": \"google\",\n \"utm_source\": \"google\",\n \"utm_campaign\": \"black_friday\",\n \"utm_content\": \"banner_1\",\n \"utm_term\": \"pagamento\",\n \"utm_medium\": \"cpc\"\n },\n \"webhook_url\": \"https://meusite.com/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"event": "transaction",
"hash": "abc123def456",
"payment_method": "pix",
"payment_status": "waiting_payment",
"installments": 1,
"pix": {
"pix_url": "https://api.pagar.me/core/v5/transactions/tran_wMV0O5gC5Esx46qW/qrcode?payment_method=pix",
"pix_qr_code": "00020101021226820014br.gov.bcb.pix2560pix.stone.com.br/pix/v2/5dfc6ddb-dd19-45ce-a1fe-ea94fbe96acf520400005303986540567.005802BR5925Pagar Me Instituicao De P6014RIO DE JANEIRO622905251e89c398ad8f443503ffd810f6304E5DF",
"qr_code_base64": 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": {
"name": "Produtor XYZ"
},
"affiliate": null,
"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
}
],
"postback_url": "https://webhook.example.com",
"tracking_code": null,
"created_at": "2024-01-01 10:00:00",
"updated_at": "2024-01-01 10:00:00"
}{
"success": true,
"message": "<string>",
"errors": [
"<string>"
]
}Rate Limiting
429 Too Many Requests.Autorizações
Use o token da Pepper API no formato: Bearer {seu_token_aqui}
Corpo
Dados da transação PIX
Valor total da transação em centavos
Método de pagamento (pix)
Itens do carrinho de compras
Show child attributes
Show child attributes
Dados do cliente
Show child attributes
Show child attributes
Dados de rastreamento e UTM
Show child attributes
Show child attributes
URL para recebimento de notificações via webhook. Deve ser uma URL válida (http ou https)
Resposta
Transação criada 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
Dados específicos do PIX
Show child attributes
Show child attributes
Dados específicos do boleto
Show child attributes
Show child attributes
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
URL do webhook
Código de rastreio
Data de criação
Data de atualização