Consultar cobrança
curl --request GET \
--url https://besimplo.com/api/v1/payment_intents/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/payment_intents/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://besimplo.com/api/v1/payment_intents/{id}', 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://besimplo.com/api/v1/payment_intents/{id}",
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: <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"
"net/http"
"io"
)
func main() {
url := "https://besimplo.com/api/v1/payment_intents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://besimplo.com/api/v1/payment_intents/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/payment_intents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "pi_01h455vb4pex5vsknk084sn02r",
"object": "payment_intent",
"amount": 9990,
"attempts": 1,
"created": 1764040287,
"currency": "brl",
"customer": "cus_01h455vb4pex5vsknk084sn02p",
"due_at": 1764126687,
"installments": 1,
"invoice": "in_01h455vb4pex5vsknk084sn02q",
"live_mode": true,
"max_attempts": 3,
"next_attempt": null,
"payment_method_type": "pix",
"status": "paid",
"status_transitions": {
"paid_at": 1764043887
},
"subscription": "sub_01h455vb4pex5vsknk084sn02s"
}Tentativas de cobrança
Consultar cobrança
Consultar uma cobrança existente na sua conta pelo ID. É o mesmo objeto que
chega em data.object nos eventos payment_intent.*.
Limite de taxa: 100 requisições por minuto por chave de API.
GET
/
api
/
v1
/
payment_intents
/
{id}
Consultar cobrança
curl --request GET \
--url https://besimplo.com/api/v1/payment_intents/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/payment_intents/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://besimplo.com/api/v1/payment_intents/{id}', 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://besimplo.com/api/v1/payment_intents/{id}",
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: <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"
"net/http"
"io"
)
func main() {
url := "https://besimplo.com/api/v1/payment_intents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://besimplo.com/api/v1/payment_intents/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/payment_intents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "pi_01h455vb4pex5vsknk084sn02r",
"object": "payment_intent",
"amount": 9990,
"attempts": 1,
"created": 1764040287,
"currency": "brl",
"customer": "cus_01h455vb4pex5vsknk084sn02p",
"due_at": 1764126687,
"installments": 1,
"invoice": "in_01h455vb4pex5vsknk084sn02q",
"live_mode": true,
"max_attempts": 3,
"next_attempt": null,
"payment_method_type": "pix",
"status": "paid",
"status_transitions": {
"paid_at": 1764043887
},
"subscription": "sub_01h455vb4pex5vsknk084sn02s"
}Authorizations
Path Parameters
Response
Operação realizada com sucesso
Status atual da cobrança.
- pending: Aguardando processamento.
- processing: Em processamento na adquirente.
- paid: Paga.
- failed: Recusada; pode ser retentada até
max_attempts. - refunding: Estorno solicitado.
- refunded: Estornada.
- discarded: Substituída por um checkout que assumiu a fatura.
Available options:
pending, processing, paid, failed, refunding, refunded, discarded Example:
"pending"
Motivo da última tentativa recusada, ou null enquanto nenhuma
tentativa falhou. É zerado quando uma nova tentativa começa.
O código da adquirente não sai do sistema: a Simplo é multiadquirente por desenho, e estes seis códigos continuam válidos quando a mesma fatura for cobrada por outra adquirente.

