cURL
curl --request GET \
--url https://api.uselotus.io/api/credits/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.uselotus.io/api/credits/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.uselotus.io/api/credits/', 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.uselotus.io/api/credits/",
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: <api-key>"
],
]);
$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.uselotus.io/api/credits/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.uselotus.io/api/credits/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselotus.io/api/credits/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"credit_id": "<string>",
"customer": {
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
},
"amount": 5000000000,
"amount_remaining": 5000000000,
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"description": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"status": "active",
"amount_paid": 0,
"amount_paid_currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"drawdowns": [
{
"credit_id": "<string>",
"amount": -5000000000,
"applied_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]
}
]Credits
List credits
GET
/
api
/
credits
/
cURL
curl --request GET \
--url https://api.uselotus.io/api/credits/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.uselotus.io/api/credits/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.uselotus.io/api/credits/', 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.uselotus.io/api/credits/",
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: <api-key>"
],
]);
$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.uselotus.io/api/credits/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.uselotus.io/api/credits/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselotus.io/api/credits/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"credit_id": "<string>",
"customer": {
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>"
},
"amount": 5000000000,
"amount_remaining": 5000000000,
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"description": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"status": "active",
"amount_paid": 0,
"amount_paid_currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"drawdowns": [
{
"credit_id": "<string>",
"amount": -5000000000,
"applied_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]
}
]Retrieves an array of credits.
lotus.list_credits(customer_id='cust_0569173ee6654369')
await lotus.listCredits({
customer_id: "cust_0569173ee6654369",
});
Authorizations
knoxTokenAuthOrganizationApiKeyAuth
Token-based authentication with required prefix "Token"
Query Parameters
Filter to adjustments in a specific currency
Minimum string length:
1The id provided when creating the customer, we suggest matching with your internal customer id in your backend
Minimum string length:
1Filter to adjustments that are effective after this date
Filter to adjustments that are effective before this date
Filter to adjustments that expire after this date
Filter to adjustments that expire before this date
Filter to adjustments that were issued after this date
Filter to adjustments that were issued before this date
Filter to a specific set of adjustment statuses. Defaults to both active and inactive.
active- Activeinactive- Inactive
Available options:
active, inactive Response
200 - application/json
Show child attributes
Show child attributes
Required range:
0 <= x < 10000000000Required range:
0 <= x < 10000000000Show child attributes
Show child attributes
active- Activeinactive- Inactive
Available options:
active, inactive Required range:
-10000000000 < x < 10000000000Show child attributes
Show child attributes
Show child attributes
Show child attributes