List payments
curl --request GET \
--url https://api-sandbox.beinfi.com/billing/payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.beinfi.com/billing/payments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-sandbox.beinfi.com/billing/payments', 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-sandbox.beinfi.com/billing/payments",
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: Bearer <token>"
],
]);
$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-sandbox.beinfi.com/billing/payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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-sandbox.beinfi.com/billing/payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.beinfi.com/billing/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"providerId": "<string>",
"method": "pix",
"amount": "<string>",
"currency": "<string>",
"status": "pending",
"refundedAmount": "<string>",
"failureCode": "insufficient_funds",
"failedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"payer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
},
"invoiceUrl": "<string>",
"chargeToken": "<string>",
"network": "main",
"settlementAsset": "USDC",
"settlementNetwork": "base",
"pixPayload": "<string>",
"pixQrImage": "<string>",
"providerPixPayload": "<string>",
"sandboxConfirmUrl": "<string>",
"pixExpiresAt": "2023-11-07T05:31:56Z",
"clientSecret": "<string>",
"publishableKey": "<string>",
"nextAction": {
"type": "adyen_session",
"session": {
"id": "<string>",
"sessionData": "<string>"
},
"clientKey": "<string>",
"environment": "live",
"countryCode": "BR",
"locale": "pt-BR",
"amount": {
"value": 1,
"currency": "BRL"
}
},
"switchable": true
}
]
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>"
}Payments
List payments
Every charge attempt on your account, newest first, each with its payment method and who paid. Filters apply before pagination, so limit and offset page through matching payments only.
GET
/
billing
/
payments
List payments
curl --request GET \
--url https://api-sandbox.beinfi.com/billing/payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.beinfi.com/billing/payments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-sandbox.beinfi.com/billing/payments', 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-sandbox.beinfi.com/billing/payments",
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: Bearer <token>"
],
]);
$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-sandbox.beinfi.com/billing/payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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-sandbox.beinfi.com/billing/payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.beinfi.com/billing/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"providerId": "<string>",
"method": "pix",
"amount": "<string>",
"currency": "<string>",
"status": "pending",
"refundedAmount": "<string>",
"failureCode": "insufficient_funds",
"failedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"payer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
},
"invoiceUrl": "<string>",
"chargeToken": "<string>",
"network": "main",
"settlementAsset": "USDC",
"settlementNetwork": "base",
"pixPayload": "<string>",
"pixQrImage": "<string>",
"providerPixPayload": "<string>",
"sandboxConfirmUrl": "<string>",
"pixExpiresAt": "2023-11-07T05:31:56Z",
"clientSecret": "<string>",
"publishableKey": "<string>",
"nextAction": {
"type": "adyen_session",
"session": {
"id": "<string>",
"sessionData": "<string>"
},
"clientKey": "<string>",
"environment": "live",
"countryCode": "BR",
"locale": "pt-BR",
"amount": {
"value": 1,
"currency": "BRL"
}
},
"switchable": true
}
]
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>"
}Authorizations
Your account's secret key: Authorization: Bearer sk_test_… or sk_live_…. Server-side only.
Query Parameters
Filter by payment status.
Available options:
pending, confirmed, failed, refunded, charged_back Filter by the processor the charge ran through, as shown in the payment's provider field (for example, sandbox).
Filter by payment method.
Available options:
pix, boleto, card, crypto Response
List of payments.
Show child attributes
Show child attributes