retryInvoice
curl --request POST \
--url https://alphainsider.com/api/retryInvoice \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({invoice_id: '<string>'})
};
fetch('https://alphainsider.com/api/retryInvoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/retryInvoice"
payload = { "invoice_id": "<string>" }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/retryInvoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'invoice_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://alphainsider.com/api/retryInvoice"
payload := strings.NewReader("{\n \"invoice_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
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
retryInvoice
Retry failed invoice.
POST
/
retryInvoice
retryInvoice
curl --request POST \
--url https://alphainsider.com/api/retryInvoice \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({invoice_id: '<string>'})
};
fetch('https://alphainsider.com/api/retryInvoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://alphainsider.com/api/retryInvoice"
payload = { "invoice_id": "<string>" }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://alphainsider.com/api/retryInvoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'invoice_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://alphainsider.com/api/retryInvoice"
payload := strings.NewReader("{\n \"invoice_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
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.
Body
application/json
Invoice identifier, when one exists.
⌘I