curl --request POST \
--url https://sandbox.api.veepag.com/v1/transaction \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"companyId": "company_id",
"amount": 9900,
"installments": 1,
"capture": true,
"split": {
"active": true,
"rules": [
{
"companyId": "recipient_company_id",
"percentage": 20,
"chargeProcessingFee": true,
"chargeRecipientProcessingFee": false
}
]
},
"paymentProfile": {
"cardNumber": "4111111111111111",
"cardExpiration": "10/2026",
"holderName": "CLIENTE TESTE",
"cardCvv": "123"
},
"client": {
"name": "Cliente Teste",
"doc": "12345678909",
"email": "cliente@example.com"
}
}
'import requests
url = "https://sandbox.api.veepag.com/v1/transaction"
payload = {
"companyId": "company_id",
"amount": 9900,
"installments": 1,
"capture": True,
"split": {
"active": True,
"rules": [
{
"companyId": "recipient_company_id",
"percentage": 20,
"chargeProcessingFee": True,
"chargeRecipientProcessingFee": False
}
]
},
"paymentProfile": {
"cardNumber": "4111111111111111",
"cardExpiration": "10/2026",
"holderName": "CLIENTE TESTE",
"cardCvv": "123"
},
"client": {
"name": "Cliente Teste",
"doc": "12345678909",
"email": "cliente@example.com"
}
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyId: 'company_id',
amount: 9900,
installments: 1,
capture: true,
split: {
active: true,
rules: [
{
companyId: 'recipient_company_id',
percentage: 20,
chargeProcessingFee: true,
chargeRecipientProcessingFee: false
}
]
},
paymentProfile: {
cardNumber: '4111111111111111',
cardExpiration: '10/2026',
holderName: 'CLIENTE TESTE',
cardCvv: '123'
},
client: {name: 'Cliente Teste', doc: '12345678909', email: 'cliente@example.com'}
})
};
fetch('https://sandbox.api.veepag.com/v1/transaction', 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://sandbox.api.veepag.com/v1/transaction",
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([
'companyId' => 'company_id',
'amount' => 9900,
'installments' => 1,
'capture' => true,
'split' => [
'active' => true,
'rules' => [
[
'companyId' => 'recipient_company_id',
'percentage' => 20,
'chargeProcessingFee' => true,
'chargeRecipientProcessingFee' => false
]
]
],
'paymentProfile' => [
'cardNumber' => '4111111111111111',
'cardExpiration' => '10/2026',
'holderName' => 'CLIENTE TESTE',
'cardCvv' => '123'
],
'client' => [
'name' => 'Cliente Teste',
'doc' => '12345678909',
'email' => 'cliente@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>"
],
]);
$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://sandbox.api.veepag.com/v1/transaction"
payload := strings.NewReader("{\n \"companyId\": \"company_id\",\n \"amount\": 9900,\n \"installments\": 1,\n \"capture\": true,\n \"split\": {\n \"active\": true,\n \"rules\": [\n {\n \"companyId\": \"recipient_company_id\",\n \"percentage\": 20,\n \"chargeProcessingFee\": true,\n \"chargeRecipientProcessingFee\": false\n }\n ]\n },\n \"paymentProfile\": {\n \"cardNumber\": \"4111111111111111\",\n \"cardExpiration\": \"10/2026\",\n \"holderName\": \"CLIENTE TESTE\",\n \"cardCvv\": \"123\"\n },\n \"client\": {\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
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://sandbox.api.veepag.com/v1/transaction")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"company_id\",\n \"amount\": 9900,\n \"installments\": 1,\n \"capture\": true,\n \"split\": {\n \"active\": true,\n \"rules\": [\n {\n \"companyId\": \"recipient_company_id\",\n \"percentage\": 20,\n \"chargeProcessingFee\": true,\n \"chargeRecipientProcessingFee\": false\n }\n ]\n },\n \"paymentProfile\": {\n \"cardNumber\": \"4111111111111111\",\n \"cardExpiration\": \"10/2026\",\n \"holderName\": \"CLIENTE TESTE\",\n \"cardCvv\": \"123\"\n },\n \"client\": {\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.veepag.com/v1/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"company_id\",\n \"amount\": 9900,\n \"installments\": 1,\n \"capture\": true,\n \"split\": {\n \"active\": true,\n \"rules\": [\n {\n \"companyId\": \"recipient_company_id\",\n \"percentage\": 20,\n \"chargeProcessingFee\": true,\n \"chargeRecipientProcessingFee\": false\n }\n ]\n },\n \"paymentProfile\": {\n \"cardNumber\": \"4111111111111111\",\n \"cardExpiration\": \"10/2026\",\n \"holderName\": \"CLIENTE TESTE\",\n \"cardCvv\": \"123\"\n },\n \"client\": {\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "transaction_id",
"companyId": "company_id",
"status": "PAID",
"amount": 9900,
"paymentMethod": "CREDIT_CARD"
}{
"error_messages": [
{
"msg": "Payload invalido.",
"type": "field",
"path": "companyId",
"location": "body"
}
],
"code": "ZodValidationException",
"path": "/v1/transaction",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unauthorized."
}
],
"code": "unauthorized",
"path": "/v1/transaction",
"metadata": {}
}{
"error_messages": [
{
"msg": "Forbidden."
}
],
"code": "forbidden",
"path": "/v1/transaction",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unknown server error."
}
],
"code": "unknown_server_error",
"path": "/v1/transaction",
"metadata": {}
}Adicionar uma nova transação
Cria uma transacao avulsa com cartao. A API pode criar ou reutilizar cliente por documento, criar o meio de pagamento e disparar webhook transaction.created.
curl --request POST \
--url https://sandbox.api.veepag.com/v1/transaction \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"companyId": "company_id",
"amount": 9900,
"installments": 1,
"capture": true,
"split": {
"active": true,
"rules": [
{
"companyId": "recipient_company_id",
"percentage": 20,
"chargeProcessingFee": true,
"chargeRecipientProcessingFee": false
}
]
},
"paymentProfile": {
"cardNumber": "4111111111111111",
"cardExpiration": "10/2026",
"holderName": "CLIENTE TESTE",
"cardCvv": "123"
},
"client": {
"name": "Cliente Teste",
"doc": "12345678909",
"email": "cliente@example.com"
}
}
'import requests
url = "https://sandbox.api.veepag.com/v1/transaction"
payload = {
"companyId": "company_id",
"amount": 9900,
"installments": 1,
"capture": True,
"split": {
"active": True,
"rules": [
{
"companyId": "recipient_company_id",
"percentage": 20,
"chargeProcessingFee": True,
"chargeRecipientProcessingFee": False
}
]
},
"paymentProfile": {
"cardNumber": "4111111111111111",
"cardExpiration": "10/2026",
"holderName": "CLIENTE TESTE",
"cardCvv": "123"
},
"client": {
"name": "Cliente Teste",
"doc": "12345678909",
"email": "cliente@example.com"
}
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyId: 'company_id',
amount: 9900,
installments: 1,
capture: true,
split: {
active: true,
rules: [
{
companyId: 'recipient_company_id',
percentage: 20,
chargeProcessingFee: true,
chargeRecipientProcessingFee: false
}
]
},
paymentProfile: {
cardNumber: '4111111111111111',
cardExpiration: '10/2026',
holderName: 'CLIENTE TESTE',
cardCvv: '123'
},
client: {name: 'Cliente Teste', doc: '12345678909', email: 'cliente@example.com'}
})
};
fetch('https://sandbox.api.veepag.com/v1/transaction', 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://sandbox.api.veepag.com/v1/transaction",
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([
'companyId' => 'company_id',
'amount' => 9900,
'installments' => 1,
'capture' => true,
'split' => [
'active' => true,
'rules' => [
[
'companyId' => 'recipient_company_id',
'percentage' => 20,
'chargeProcessingFee' => true,
'chargeRecipientProcessingFee' => false
]
]
],
'paymentProfile' => [
'cardNumber' => '4111111111111111',
'cardExpiration' => '10/2026',
'holderName' => 'CLIENTE TESTE',
'cardCvv' => '123'
],
'client' => [
'name' => 'Cliente Teste',
'doc' => '12345678909',
'email' => 'cliente@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>"
],
]);
$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://sandbox.api.veepag.com/v1/transaction"
payload := strings.NewReader("{\n \"companyId\": \"company_id\",\n \"amount\": 9900,\n \"installments\": 1,\n \"capture\": true,\n \"split\": {\n \"active\": true,\n \"rules\": [\n {\n \"companyId\": \"recipient_company_id\",\n \"percentage\": 20,\n \"chargeProcessingFee\": true,\n \"chargeRecipientProcessingFee\": false\n }\n ]\n },\n \"paymentProfile\": {\n \"cardNumber\": \"4111111111111111\",\n \"cardExpiration\": \"10/2026\",\n \"holderName\": \"CLIENTE TESTE\",\n \"cardCvv\": \"123\"\n },\n \"client\": {\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
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://sandbox.api.veepag.com/v1/transaction")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"company_id\",\n \"amount\": 9900,\n \"installments\": 1,\n \"capture\": true,\n \"split\": {\n \"active\": true,\n \"rules\": [\n {\n \"companyId\": \"recipient_company_id\",\n \"percentage\": 20,\n \"chargeProcessingFee\": true,\n \"chargeRecipientProcessingFee\": false\n }\n ]\n },\n \"paymentProfile\": {\n \"cardNumber\": \"4111111111111111\",\n \"cardExpiration\": \"10/2026\",\n \"holderName\": \"CLIENTE TESTE\",\n \"cardCvv\": \"123\"\n },\n \"client\": {\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.veepag.com/v1/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"company_id\",\n \"amount\": 9900,\n \"installments\": 1,\n \"capture\": true,\n \"split\": {\n \"active\": true,\n \"rules\": [\n {\n \"companyId\": \"recipient_company_id\",\n \"percentage\": 20,\n \"chargeProcessingFee\": true,\n \"chargeRecipientProcessingFee\": false\n }\n ]\n },\n \"paymentProfile\": {\n \"cardNumber\": \"4111111111111111\",\n \"cardExpiration\": \"10/2026\",\n \"holderName\": \"CLIENTE TESTE\",\n \"cardCvv\": \"123\"\n },\n \"client\": {\n \"name\": \"Cliente Teste\",\n \"doc\": \"12345678909\",\n \"email\": \"cliente@example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "transaction_id",
"companyId": "company_id",
"status": "PAID",
"amount": 9900,
"paymentMethod": "CREDIT_CARD"
}{
"error_messages": [
{
"msg": "Payload invalido.",
"type": "field",
"path": "companyId",
"location": "body"
}
],
"code": "ZodValidationException",
"path": "/v1/transaction",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unauthorized."
}
],
"code": "unauthorized",
"path": "/v1/transaction",
"metadata": {}
}{
"error_messages": [
{
"msg": "Forbidden."
}
],
"code": "forbidden",
"path": "/v1/transaction",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unknown server error."
}
],
"code": "unknown_server_error",
"path": "/v1/transaction",
"metadata": {}
}Authorizations
API key no formato keyId.secret.
Body
ID da empresa que recebera a transacao. A credencial precisa ter acesso a essa empresa.
Dados do cartao usados para processar a transacao.
Show child attributes
Show child attributes
Valor da transacao em centavos. Exemplo: 9900 representa R$ 99,00.
9900
Dados do cliente enviados inline. Quando informado, o documento deve ser enviado em doc ou cpf.
Show child attributes
Show child attributes
Quantidade de parcelas. Quando omitido, o fluxo usa 1 parcela.
Indica se a transacao deve ser capturada imediatamente. Quando omitido, o fluxo usa true.
Regras de split específicas desta transação. Quando active for true, têm prioridade sobre o split ativo do produto ou da empresa.
Show child attributes
Show child attributes
Response
Transacao criada.
ID da transacao.
ID da empresa vinculada a transacao.
ID do cliente vinculado, quando houver.
ID do produto vinculado, quando houver.
ID da assinatura vinculada, quando houver.
ID da cobranca vinculada, quando houver.
Valor da transacao, normalmente com value em centavos e currency BRL.
Parcelamento da transacao.
Meio de pagamento usado na transacao.
CREDIT_CARD, DEBIT_CARD, BOLETO, PIX Status atual da transacao.
PAID, PROCESSING, DECLINED, CANCELED, DISCARDED, AUTHORIZED, IN_ANALYSIS, ERROR_PAYMENT, DISPUTE, STANDBY, CHARGEBACK, PENDING_REVIEW, PENDING_3DS, BLOCKED, INVALID_PAYMENT, NO_PAYMENT_ROUTE, PENDING_PAYMENT, ERROR_REFUNDED Mensagem principal retornada pelo processamento.
Mensagem complementar retornada pelo processamento.
Dados de cartao salvos internamente, quando houver.
Dados da adquirente vinculada a transacao.
Dados de boleto, quando gerados.
Dados de Pix, quando gerados.
Metadados livres vinculados a transacao.
Data de criacao da transacao.
Data da ultima atualizacao da transacao.
Was this page helpful?
