List subscriptions
curl --request GET \
--url https://api-global.fastpaybrasil.com/v1/subscriptions \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api-global.fastpaybrasil.com/v1/subscriptions"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api-global.fastpaybrasil.com/v1/subscriptions', 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-global.fastpaybrasil.com/v1/subscriptions",
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: Basic <encoded-value>"
],
]);
$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-global.fastpaybrasil.com/v1/subscriptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-global.fastpaybrasil.com/v1/subscriptions")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-global.fastpaybrasil.com/v1/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
"status": "active",
"currentPeriodStart": "2024-01-15T10:30:00.000Z",
"currentPeriodEnd": "2024-02-15T10:30:00.000Z",
"billingDay": 15,
"cancelledAt": null,
"cancellationType": null,
"refunded": false,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"plan": {
"name": "Plano Premium Mensal",
"price": 99.9,
"currency": "BRL"
},
"customer": {
"name": "John Doe",
"email": "[email protected]"
}
}
],
"meta": {
"total": 100,
"page": 1,
"limit": 10,
"totalPages": 10
}
}{
"statusCode": 401,
"message": "Unauthorized"
}Subscriptions
List subscriptions
Returns a paginated list of subscriptions.
GET
/
v1
/
subscriptions
List subscriptions
curl --request GET \
--url https://api-global.fastpaybrasil.com/v1/subscriptions \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api-global.fastpaybrasil.com/v1/subscriptions"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api-global.fastpaybrasil.com/v1/subscriptions', 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-global.fastpaybrasil.com/v1/subscriptions",
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: Basic <encoded-value>"
],
]);
$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-global.fastpaybrasil.com/v1/subscriptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-global.fastpaybrasil.com/v1/subscriptions")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-global.fastpaybrasil.com/v1/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
"status": "active",
"currentPeriodStart": "2024-01-15T10:30:00.000Z",
"currentPeriodEnd": "2024-02-15T10:30:00.000Z",
"billingDay": 15,
"cancelledAt": null,
"cancellationType": null,
"refunded": false,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"plan": {
"name": "Plano Premium Mensal",
"price": 99.9,
"currency": "BRL"
},
"customer": {
"name": "John Doe",
"email": "[email protected]"
}
}
],
"meta": {
"total": 100,
"page": 1,
"limit": 10,
"totalPages": 10
}
}{
"statusCode": 401,
"message": "Unauthorized"
}Authorizations
HTTP Basic authentication. Use your secret key as the username and an empty string as password. The API key should be base64 encoded in the format 'username:' when sending the Authorization header.
Query Parameters
Filter by merchant ID
Filter by customer ID
Filter by subscription status
Available options:
pending_activation, active, cancelled, paused, expired Search by customer name, email, or plan name
Page number (starts at 1)
Number of items per page
⌘I