Reconcile Credit Purchase
curl --request GET \
--url https://api.dispersed.com/v1/compute/ledger/credit-purchases/reconcileimport requests
url = "https://api.dispersed.com/v1/compute/ledger/credit-purchases/reconcile"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.dispersed.com/v1/compute/ledger/credit-purchases/reconcile', 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.dispersed.com/v1/compute/ledger/credit-purchases/reconcile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.dispersed.com/v1/compute/ledger/credit-purchases/reconcile"
req, _ := http.NewRequest("GET", url, nil)
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.dispersed.com/v1/compute/ledger/credit-purchases/reconcile")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dispersed.com/v1/compute/ledger/credit-purchases/reconcile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"amount": 123,
"currency": "<string>",
"checkout_session_id": "<string>",
"object": "compute_ledger_credit_purchase",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "<string>",
"consumer_profile_uuid": "<string>",
"consumer_account_uuid": "<string>",
"render_user_id": "<string>",
"memo": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}Compute Ledger
Reconcile Credit Purchase
GET
/
v1
/
compute
/
ledger
/
credit-purchases
/
reconcile
Reconcile Credit Purchase
curl --request GET \
--url https://api.dispersed.com/v1/compute/ledger/credit-purchases/reconcileimport requests
url = "https://api.dispersed.com/v1/compute/ledger/credit-purchases/reconcile"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.dispersed.com/v1/compute/ledger/credit-purchases/reconcile', 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.dispersed.com/v1/compute/ledger/credit-purchases/reconcile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.dispersed.com/v1/compute/ledger/credit-purchases/reconcile"
req, _ := http.NewRequest("GET", url, nil)
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.dispersed.com/v1/compute/ledger/credit-purchases/reconcile")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dispersed.com/v1/compute/ledger/credit-purchases/reconcile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"amount": 123,
"currency": "<string>",
"checkout_session_id": "<string>",
"object": "compute_ledger_credit_purchase",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"uuid": "<string>",
"consumer_profile_uuid": "<string>",
"consumer_account_uuid": "<string>",
"render_user_id": "<string>",
"memo": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"timestamp": "<string>",
"details": []
}
}Query Parameters
Stripe Checkout session ID to reconcile
Example:
"cs_test_abc123"
Response
Current state of the credit purchase (reconciled if PENDING)
Available options:
COMPLETED, EXPIRED, PENDING Available options:
compute_ledger_credit_purchase ⌘I