getInvoices
curl --request GET \
--url https://alphainsider.com/api/getInvoices \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://alphainsider.com/api/getInvoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getInvoices"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getInvoices",
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: <authorization>"
],
]);
$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://alphainsider.com/api/getInvoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"response": [
{
"invoice_id": "NJ9Fo2OSoM5MRy5ithwnw",
"user_id": "user_1",
"description": "Pro Account Monthly Subscription",
"status": "paid",
"updated_at": "2024-10-22T20:59:25.765Z",
"created_at": "2024-10-22T20:59:22.304Z",
"amount": "5000",
"amount_refunded": "0",
"source": {
"source_id": "ta-fz_Z_fkHau1d5k3HUR",
"user_id": "user_1",
"type": "card",
"direction": "in",
"primary": true,
"description": "Card (VISA ....4242)",
"name": "fds fds",
"city": "fds",
"country": "US",
"line_one": "fds",
"line_two": "fds",
"district": "fd",
"postal": "33132",
"status": "active",
"updated_at": "2024-10-21T17:51:08.576296+00:00",
"created_at": "2024-08-30T13:41:24.478454+00:00"
},
"retryable": false
}
]
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Payments
getInvoices
Get invoices.
GET
/
getInvoices
getInvoices
curl --request GET \
--url https://alphainsider.com/api/getInvoices \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://alphainsider.com/api/getInvoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getInvoices"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/getInvoices",
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: <authorization>"
],
]);
$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://alphainsider.com/api/getInvoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"response": [
{
"invoice_id": "NJ9Fo2OSoM5MRy5ithwnw",
"user_id": "user_1",
"description": "Pro Account Monthly Subscription",
"status": "paid",
"updated_at": "2024-10-22T20:59:25.765Z",
"created_at": "2024-10-22T20:59:22.304Z",
"amount": "5000",
"amount_refunded": "0",
"source": {
"source_id": "ta-fz_Z_fkHau1d5k3HUR",
"user_id": "user_1",
"type": "card",
"direction": "in",
"primary": true,
"description": "Card (VISA ....4242)",
"name": "fds fds",
"city": "fds",
"country": "US",
"line_one": "fds",
"line_two": "fds",
"district": "fd",
"postal": "33132",
"status": "active",
"updated_at": "2024-10-21T17:51:08.576296+00:00",
"created_at": "2024-08-30T13:41:24.478454+00:00"
},
"retryable": false
}
]
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Headers
User API token.
Query Parameters
Array of invoice IDs. Leave empty to get all invoices.
Maximum array length:
100Invoice identifier, when one exists.
Payment source identifier.
Invoice status.
Available options:
pending, paid, failed, chargeback Number of results to return.
Offet by ID. Used for pagination.
⌘I