getUpcomingInvoice
curl --request GET \
--url https://alphainsider.com/api/getUpcomingInvoice \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://alphainsider.com/api/getUpcomingInvoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getUpcomingInvoice"
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/getUpcomingInvoice",
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/getUpcomingInvoice"
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": null,
"user_id": "user_2",
"description": "October - November 2024 Invoices",
"status": "pending",
"updated_at": null,
"created_at": null,
"amount": "10000",
"amount_refunded": "0",
"source": {
"source_id": "7mb8VEEjb4zCzbU4U-l1Z",
"user_id": "user_2",
"type": "card",
"direction": "in",
"primary": true,
"description": "Card (VISA ....4242)",
"name": "John Doe",
"city": "New York",
"country": "US",
"line_one": "123 Sesame St",
"line_two": "",
"district": "NY",
"postal": "10001",
"status": "active",
"updated_at": "2024-10-22T14:18:35.209Z",
"created_at": "2024-06-10T14:57:33.313Z"
},
"retryable": false
}
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}Payments
getUpcomingInvoice
Get upcoming invoice.
GET
/
getUpcomingInvoice
getUpcomingInvoice
curl --request GET \
--url https://alphainsider.com/api/getUpcomingInvoice \
--header 'Authorization: <authorization>'const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://alphainsider.com/api/getUpcomingInvoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/getUpcomingInvoice"
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/getUpcomingInvoice",
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/getUpcomingInvoice"
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": null,
"user_id": "user_2",
"description": "October - November 2024 Invoices",
"status": "pending",
"updated_at": null,
"created_at": null,
"amount": "10000",
"amount_refunded": "0",
"source": {
"source_id": "7mb8VEEjb4zCzbU4U-l1Z",
"user_id": "user_2",
"type": "card",
"direction": "in",
"primary": true,
"description": "Card (VISA ....4242)",
"name": "John Doe",
"city": "New York",
"country": "US",
"line_one": "123 Sesame St",
"line_two": "",
"district": "NY",
"postal": "10001",
"status": "active",
"updated_at": "2024-10-22T14:18:35.209Z",
"created_at": "2024-06-10T14:57:33.313Z"
},
"retryable": false
}
}{
"success": false,
"response": "Request failed."
}{
"success": false,
"response": "Authentication failed."
}⌘I