Buscar cobrança por ID
curl --request GET \
--url https://api.rivoopay.com/charge/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.rivoopay.com/charge/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.rivoopay.com/charge/{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://api.rivoopay.com/charge/{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 => [
"X-API-KEY: <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://api.rivoopay.com/charge/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<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://api.rivoopay.com/charge/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rivoopay.com/charge/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 123,
"message": "<string>",
"data": {
"id": "charge_123456",
"total": 100000,
"url": "https://pay.rivoopay.com/c/charge_123456",
"status": "OPEN",
"paymentStatus": "PROCESSING",
"devMode": false,
"needShipping": false,
"expiresAt": "2024-12-04T09:30:00.000Z",
"company": {
"taxId": "36062381000180",
"name": "Empresa Bola Ltda",
"color": "#000000",
"imageUrl": "https://i.imgur.com/ONMjk45.jpeg"
},
"paymentDate": "2024-12-03T10:30:00.000Z",
"successUrl": "https://example.com/success",
"failedUrl": "https://example.com/failed",
"brCode": "00020101021226950014br.gov.bcb.pix...",
"brCodeBase64": "data:image/png;base64,iVBORw0KGgoAAA...",
"items": [
{
"productId": "prod_123456",
"companyId": "company_123456",
"quantity": 2,
"product": {
"id": "prod_01F4Z8Z5Y6X7W8V9U0T1S2R3Q4",
"name": "Produto Bola",
"description": "Produto muito bom para uso diário",
"price": 1990,
"needShipping": false,
"companyId": "f96a489c-8a4d-4c7b-a1f6-347acbd832df",
"status": "ACTIVE",
"sku": "SKU-ABCD-123",
"imageUrl": "https://example.com/image.png",
"categories": [
"Eletronicos e Tecnologia",
"Celulares e Smartphones"
],
"marketplaceStatus": "INACTIVE",
"dayDue": 4,
"dayGenerateCharge": 14.5
}
}
],
"customer": {
"name": "João da Silva",
"taxId": "***.***.529-25",
"email": "j***@gmail.com",
"phone": "(**) *****-9999"
},
"isRecurring": true,
"pixAutomaticEmv": "<string>",
"pixAutomaticQrCode": "<string>",
"pixAutomaticPaymentLinkUrl": "<string>",
"recurrenceChargeId": "<string>"
}
}Cobranças
Buscar Cobrança por ID
Retorna os detalhes de uma cobrança pelo seu ID
GET
/
charge
/
{id}
Buscar cobrança por ID
curl --request GET \
--url https://api.rivoopay.com/charge/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.rivoopay.com/charge/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.rivoopay.com/charge/{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://api.rivoopay.com/charge/{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 => [
"X-API-KEY: <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://api.rivoopay.com/charge/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<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://api.rivoopay.com/charge/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rivoopay.com/charge/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 123,
"message": "<string>",
"data": {
"id": "charge_123456",
"total": 100000,
"url": "https://pay.rivoopay.com/c/charge_123456",
"status": "OPEN",
"paymentStatus": "PROCESSING",
"devMode": false,
"needShipping": false,
"expiresAt": "2024-12-04T09:30:00.000Z",
"company": {
"taxId": "36062381000180",
"name": "Empresa Bola Ltda",
"color": "#000000",
"imageUrl": "https://i.imgur.com/ONMjk45.jpeg"
},
"paymentDate": "2024-12-03T10:30:00.000Z",
"successUrl": "https://example.com/success",
"failedUrl": "https://example.com/failed",
"brCode": "00020101021226950014br.gov.bcb.pix...",
"brCodeBase64": "data:image/png;base64,iVBORw0KGgoAAA...",
"items": [
{
"productId": "prod_123456",
"companyId": "company_123456",
"quantity": 2,
"product": {
"id": "prod_01F4Z8Z5Y6X7W8V9U0T1S2R3Q4",
"name": "Produto Bola",
"description": "Produto muito bom para uso diário",
"price": 1990,
"needShipping": false,
"companyId": "f96a489c-8a4d-4c7b-a1f6-347acbd832df",
"status": "ACTIVE",
"sku": "SKU-ABCD-123",
"imageUrl": "https://example.com/image.png",
"categories": [
"Eletronicos e Tecnologia",
"Celulares e Smartphones"
],
"marketplaceStatus": "INACTIVE",
"dayDue": 4,
"dayGenerateCharge": 14.5
}
}
],
"customer": {
"name": "João da Silva",
"taxId": "***.***.529-25",
"email": "j***@gmail.com",
"phone": "(**) *****-9999"
},
"isRecurring": true,
"pixAutomaticEmv": "<string>",
"pixAutomaticQrCode": "<string>",
"pixAutomaticPaymentLinkUrl": "<string>",
"recurrenceChargeId": "<string>"
}
}⌘I