cURL
curl --request POST \
--url https://api.uselotus.io/api/credits/{credit_id}/void/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.uselotus.io/api/credits/{credit_id}/void/"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.uselotus.io/api/credits/{credit_id}/void/', 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/{credit_id}/void/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{credit_id}/void/"
req, _ := http.NewRequest("POST", 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.post("https://api.uselotus.io/api/credits/{credit_id}/void/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselotus.io/api/credits/{credit_id}/void/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
Void credit
POST
/
api
/
credits
/
{credit_id}
/
void
/
cURL
curl --request POST \
--url https://api.uselotus.io/api/credits/{credit_id}/void/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.uselotus.io/api/credits/{credit_id}/void/"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.uselotus.io/api/credits/{credit_id}/void/', 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/{credit_id}/void/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/{credit_id}/void/"
req, _ := http.NewRequest("POST", 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.post("https://api.uselotus.io/api/credits/{credit_id}/void/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselotus.io/api/credits/{credit_id}/void/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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>"
}
]
}Immediately voids a credit. If the credit is already expired or has already been consumed, nothing will happen.
lotus.void_credit(credit_id='credit_0569173ee6654369')
await lotus.voidCredit({
credit_id: "credit_0569173ee6654369",
});
Authorizations
knoxTokenAuthOrganizationApiKeyAuth
Token-based authentication with required prefix "Token"
Path Parameters
The ID of the credit to retrieve or update.
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