Dados do comprovante (público)
curl --request GET \
--url https://v4pay-api.vercel.app/checkout/{txid}import requests
url = "https://v4pay-api.vercel.app/checkout/{txid}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://v4pay-api.vercel.app/checkout/{txid}', 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://v4pay-api.vercel.app/checkout/{txid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://v4pay-api.vercel.app/checkout/{txid}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v4pay-api.vercel.app/checkout/{txid}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v4pay-api.vercel.app/checkout/{txid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"txid": "<string>",
"description": "<string>",
"amount": 123,
"customer_name": "<string>",
"customer_document": "<string>",
"pix_code": "<string>",
"qr_code_url": "<string>",
"status": "pending",
"end_to_end_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"store_name": "<string>",
"store_document": "<string>",
"environment": "test",
"product_id": "<string>",
"success_url": "<string>",
"cancel_url": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Checkout (público)
Dados do comprovante (público)
Rota pública usada pela página de checkout e pelo comprovante. Devolve a cobrança com o documento do pagador mascarado no servidor e o nome/CNPJ da loja que recebe.
GET
/
checkout
/
{txid}
Dados do comprovante (público)
curl --request GET \
--url https://v4pay-api.vercel.app/checkout/{txid}import requests
url = "https://v4pay-api.vercel.app/checkout/{txid}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://v4pay-api.vercel.app/checkout/{txid}', 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://v4pay-api.vercel.app/checkout/{txid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://v4pay-api.vercel.app/checkout/{txid}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v4pay-api.vercel.app/checkout/{txid}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v4pay-api.vercel.app/checkout/{txid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"txid": "<string>",
"description": "<string>",
"amount": 123,
"customer_name": "<string>",
"customer_document": "<string>",
"pix_code": "<string>",
"qr_code_url": "<string>",
"status": "pending",
"end_to_end_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"store_name": "<string>",
"store_document": "<string>",
"environment": "test",
"product_id": "<string>",
"success_url": "<string>",
"cancel_url": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}