Atualizar cobrança
curl --request PUT \
--url https://sandbox.api.veepag.com/v1/charge \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"_id": "<string>",
"companyId": "<string>",
"productId": "<string>",
"dueDate": "<unknown>",
"amount": 123,
"description": "<string>",
"paymentMethodOption": [
{
"active": true,
"installments": [
{
"installment": 123,
"totalAmount": 123,
"installmentAmount": 123,
"fee": 123
}
]
}
]
}
'import requests
url = "https://sandbox.api.veepag.com/v1/charge"
payload = {
"_id": "<string>",
"companyId": "<string>",
"productId": "<string>",
"dueDate": "<unknown>",
"amount": 123,
"description": "<string>",
"paymentMethodOption": [
{
"active": True,
"installments": [
{
"installment": 123,
"totalAmount": 123,
"installmentAmount": 123,
"fee": 123
}
]
}
]
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '<string>',
companyId: '<string>',
productId: '<string>',
dueDate: '<unknown>',
amount: 123,
description: '<string>',
paymentMethodOption: [
{
active: true,
installments: [{installment: 123, totalAmount: 123, installmentAmount: 123, fee: 123}]
}
]
})
};
fetch('https://sandbox.api.veepag.com/v1/charge', 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/charge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '<string>',
'companyId' => '<string>',
'productId' => '<string>',
'dueDate' => '<unknown>',
'amount' => 123,
'description' => '<string>',
'paymentMethodOption' => [
[
'active' => true,
'installments' => [
[
'installment' => 123,
'totalAmount' => 123,
'installmentAmount' => 123,
'fee' => 123
]
]
]
]
]),
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/charge"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"productId\": \"<string>\",\n \"dueDate\": \"<unknown>\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"paymentMethodOption\": [\n {\n \"active\": true,\n \"installments\": [\n {\n \"installment\": 123,\n \"totalAmount\": 123,\n \"installmentAmount\": 123,\n \"fee\": 123\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox.api.veepag.com/v1/charge")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"productId\": \"<string>\",\n \"dueDate\": \"<unknown>\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"paymentMethodOption\": [\n {\n \"active\": true,\n \"installments\": [\n {\n \"installment\": 123,\n \"totalAmount\": 123,\n \"installmentAmount\": 123,\n \"fee\": 123\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.veepag.com/v1/charge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"productId\": \"<string>\",\n \"dueDate\": \"<unknown>\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"paymentMethodOption\": [\n {\n \"active\": true,\n \"installments\": [\n {\n \"installment\": 123,\n \"totalAmount\": 123,\n \"installmentAmount\": 123,\n \"fee\": 123\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"_id": "charge_id",
"amount": 9990
}{
"error_messages": [
{
"msg": "Payload invalido.",
"type": "field",
"path": "companyId",
"location": "body"
}
],
"code": "ZodValidationException",
"path": "/v1/charge",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unauthorized."
}
],
"code": "unauthorized",
"path": "/v1/charge",
"metadata": {}
}{
"error_messages": [
{
"msg": "Forbidden."
}
],
"code": "forbidden",
"path": "/v1/charge",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unknown server error."
}
],
"code": "unknown_server_error",
"path": "/v1/charge",
"metadata": {}
}Charge
Atualizar cobrança
Atualiza uma cobranca existente e registra historico com diferencas.
PUT
/
v1
/
charge
Atualizar cobrança
curl --request PUT \
--url https://sandbox.api.veepag.com/v1/charge \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"_id": "<string>",
"companyId": "<string>",
"productId": "<string>",
"dueDate": "<unknown>",
"amount": 123,
"description": "<string>",
"paymentMethodOption": [
{
"active": true,
"installments": [
{
"installment": 123,
"totalAmount": 123,
"installmentAmount": 123,
"fee": 123
}
]
}
]
}
'import requests
url = "https://sandbox.api.veepag.com/v1/charge"
payload = {
"_id": "<string>",
"companyId": "<string>",
"productId": "<string>",
"dueDate": "<unknown>",
"amount": 123,
"description": "<string>",
"paymentMethodOption": [
{
"active": True,
"installments": [
{
"installment": 123,
"totalAmount": 123,
"installmentAmount": 123,
"fee": 123
}
]
}
]
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '<string>',
companyId: '<string>',
productId: '<string>',
dueDate: '<unknown>',
amount: 123,
description: '<string>',
paymentMethodOption: [
{
active: true,
installments: [{installment: 123, totalAmount: 123, installmentAmount: 123, fee: 123}]
}
]
})
};
fetch('https://sandbox.api.veepag.com/v1/charge', 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/charge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '<string>',
'companyId' => '<string>',
'productId' => '<string>',
'dueDate' => '<unknown>',
'amount' => 123,
'description' => '<string>',
'paymentMethodOption' => [
[
'active' => true,
'installments' => [
[
'installment' => 123,
'totalAmount' => 123,
'installmentAmount' => 123,
'fee' => 123
]
]
]
]
]),
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/charge"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"productId\": \"<string>\",\n \"dueDate\": \"<unknown>\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"paymentMethodOption\": [\n {\n \"active\": true,\n \"installments\": [\n {\n \"installment\": 123,\n \"totalAmount\": 123,\n \"installmentAmount\": 123,\n \"fee\": 123\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sandbox.api.veepag.com/v1/charge")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"productId\": \"<string>\",\n \"dueDate\": \"<unknown>\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"paymentMethodOption\": [\n {\n \"active\": true,\n \"installments\": [\n {\n \"installment\": 123,\n \"totalAmount\": 123,\n \"installmentAmount\": 123,\n \"fee\": 123\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.veepag.com/v1/charge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"companyId\": \"<string>\",\n \"productId\": \"<string>\",\n \"dueDate\": \"<unknown>\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"paymentMethodOption\": [\n {\n \"active\": true,\n \"installments\": [\n {\n \"installment\": 123,\n \"totalAmount\": 123,\n \"installmentAmount\": 123,\n \"fee\": 123\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"_id": "charge_id",
"amount": 9990
}{
"error_messages": [
{
"msg": "Payload invalido.",
"type": "field",
"path": "companyId",
"location": "body"
}
],
"code": "ZodValidationException",
"path": "/v1/charge",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unauthorized."
}
],
"code": "unauthorized",
"path": "/v1/charge",
"metadata": {}
}{
"error_messages": [
{
"msg": "Forbidden."
}
],
"code": "forbidden",
"path": "/v1/charge",
"metadata": {}
}{
"error_messages": [
{
"msg": "Unknown server error."
}
],
"code": "unknown_server_error",
"path": "/v1/charge",
"metadata": {}
}Authorizations
api_keytoken
API key no formato keyId.secret.
Body
application/json
Response
Cobranca atualizada.
ID da cobranca.
ID da empresa vinculada a cobranca.
ID do cliente vinculado.
ID do produto vinculado.
ID da assinatura vinculada, quando houver.
Valor da cobranca, normalmente com value em centavos e currency BRL.
Data de vencimento da cobranca.
Descricao da cobranca.
Status atual da cobranca.
Available options:
PAID, ACTIVE, ANTICIPATED, CANCELED, CANCELED_ALERT_ETHOCA, PENDING_PAYMENT, IMPORTED, ERROR_PAYMENT, ERROR_REFUNDED, OVERDUE, NO_PAYMENT_ROUTE, RECOVERED, BLOCKED, NO_PAYMENT, CANCELED_MANUAL, DISPUTE, CHARGEBACK, STANDBY, DISABLED Metodos de pagamento disponiveis.
Available options:
CREDIT_CARD, DEBIT_CARD, BOLETO, PIX Opcoes de pagamento da cobranca.
Indica se a cobranca esta ativa.
Numero sequencial da cobranca, quando houver.
Data de criacao da cobranca.
Data da ultima atualizacao da cobranca.
Was this page helpful?
⌘I
