curl --request POST \
--url https://api.bitgpt.xyz/invoices/{id} \
--header 'Content-Type: application/json' \
--data '{
"expand": []
}'import requests
url = "https://api.bitgpt.xyz/invoices/{id}"
payload = { "expand": [] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({expand: []})
};
fetch('https://api.bitgpt.xyz/invoices/{id}', 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.bitgpt.xyz/invoices/{id}",
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([
'expand' => [
]
]),
CURLOPT_HTTPHEADER => [
"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://api.bitgpt.xyz/invoices/{id}"
payload := strings.NewReader("{\n \"expand\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.bitgpt.xyz/invoices/{id}")
.header("Content-Type", "application/json")
.body("{\n \"expand\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitgpt.xyz/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"expand\": []\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"data": {
"id": "invoice_0197d634-7d8e-7615-8007-e37b992cdb30",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"status": "PENDING",
"substatus": null,
"currency": "EUR",
"price": "504.818257074815000000000000000000",
"created_at": "2025-07-04 18:10:53",
"updated_at": "2025-07-04 18:10:53"
},
"error": null,
"log": null,
"validator": null,
"support_id": null,
"message": "Resource created successfully",
"env": "development"
}{
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}{
"status": 401,
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}{
"status": 403,
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}Get invoice details
Retrieve detailed information about a specific invoice by ID
curl --request POST \
--url https://api.bitgpt.xyz/invoices/{id} \
--header 'Content-Type: application/json' \
--data '{
"expand": []
}'import requests
url = "https://api.bitgpt.xyz/invoices/{id}"
payload = { "expand": [] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({expand: []})
};
fetch('https://api.bitgpt.xyz/invoices/{id}', 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.bitgpt.xyz/invoices/{id}",
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([
'expand' => [
]
]),
CURLOPT_HTTPHEADER => [
"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://api.bitgpt.xyz/invoices/{id}"
payload := strings.NewReader("{\n \"expand\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.bitgpt.xyz/invoices/{id}")
.header("Content-Type", "application/json")
.body("{\n \"expand\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitgpt.xyz/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"expand\": []\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"data": {
"id": "invoice_0197d634-7d8e-7615-8007-e37b992cdb30",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"status": "PENDING",
"substatus": null,
"currency": "EUR",
"price": "504.818257074815000000000000000000",
"created_at": "2025-07-04 18:10:53",
"updated_at": "2025-07-04 18:10:53"
},
"error": null,
"log": null,
"validator": null,
"support_id": null,
"message": "Resource created successfully",
"env": "development"
}{
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}{
"status": 401,
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}{
"status": 403,
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}Path Parameters
Invoice ID
Body
Array of fields to expand in the response
payments, payments.provider, items, items.product, items.billing_schema, items.payment_intent, calculations, organization, currency Currency for calculation summary (optional)
BITCOIN, ETHEREUM, USDT, USDC, USDC_NATIVE, SOLANA, BINANCE_COIN, RIPPLE, POLYGON, TRON, LITECOIN, BITCOIN_CASH, DOGECOIN, USD, EUR, CHF, GBP, AUD, JPY, CNY, CAD, HKD, SGD, SEK, KRW, NOK, NZD, INR, MXN, TWD, ZAR, BRL, DKK, PLN, THB, ILS, IDR, CZK, AED, TRY, HUF, CLP, SAR, PHP, MYR, COP, RUB, RON, PEN "GBP"
"BITCOIN"
Response
Invoice view
Status code of the response
200, 201, 202 Invoice object containing billing information, invoice items, calculations, and organization details for payment processing
Show child attributes
Show child attributes
{
"id": "invoice_019851f5-39f7-714a-8f2c-3c3eede808b4",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"status": "PENDING",
"substatus": null,
"currency": "EUR",
"price": "56.550000000000000000000000000000",
"price_usd": "66.750000000000000000000000000000",
"created_at": "2025-07-28 18:54:42",
"updated_at": "2025-07-28 18:55:34",
"redirect_url": null,
"customer_email": "test@test.tt",
"metadata": {
"one": "1",
"two": "2",
"three": "3",
"four": "4"
},
"items": [
{
"id": "invoice_item_019851f5-39f8-753b-9cf5-985300807b51",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"invoice_id": "invoice_019851f5-39f7-714a-8f2c-3c3eede808b4",
"type": "PRODUCT",
"currency": "GBP",
"product_id": "product_01982266-ee05-7249-a0bf-787b4b6e0946",
"billing_schema_id": "schema_01982266-ee06-70fe-9cac-bc4b6d964815",
"payment_intent_id": null,
"quantity": 4,
"status": "INCLUDED",
"exclude_reason": null,
"created_at": "2025-07-28 18:54:42",
"updated_at": null,
"product": {
"id": "product_01982266-ee05-7249-a0bf-787b4b6e0946",
"version_group_id": "product_01981e60-62f5-7f75-8576-aa262be8ea54",
"is_active": 1,
"name": "Product #1",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"description": "111",
"image_id": null,
"created_at": "2025-07-19 13:17:07",
"updated_at": null,
"image": null
},
"billing_schema": {
"id": "schema_01982266-ee06-70fe-9cac-bc4b6d964815",
"is_active": 1,
"version_group_id": "schema_01982266-ee06-70fe-9cac-bc4b6d964815",
"name": "Basic Product",
"description": "Billing Schema #1",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"product_id": "product_01982266-ee05-7249-a0bf-787b4b6e0946",
"type": "ONE_TIME",
"currency": "GBP",
"base_price": "10.000000000000000000000000000000",
"interval_type": null,
"interval_count": null,
"payment_type": null,
"renew_type": null,
"billing_type": null,
"created_at": "2025-07-19 13:17:07",
"updated_at": null
}
},
{
"id": "invoice_item_019851f5-39f9-7eeb-aa8c-2ddfca8c65a3",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"invoice_id": "invoice_019851f5-39f7-714a-8f2c-3c3eede808b4",
"type": "PRODUCT",
"currency": "EUR",
"product_id": "product_0198222f-fe06-743f-8651-42128a1e218a",
"billing_schema_id": "schema_0198222f-fe07-76a8-87d0-880d5289f759",
"payment_intent_id": null,
"quantity": 1,
"status": "INCLUDED",
"exclude_reason": null,
"created_at": "2025-07-28 18:54:42",
"updated_at": null,
"product": {
"id": "product_0198222f-fe06-743f-8651-42128a1e218a",
"version_group_id": "product_0198222f-fe06-743f-8651-42128a1e218a",
"is_active": 1,
"name": "Product #2",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"description": "ONE_TIME PRODUCT",
"image_id": null,
"created_at": "2025-07-19 12:17:07",
"updated_at": null,
"image": null
},
"billing_schema": {
"id": "schema_0198222f-fe07-76a8-87d0-880d5289f759",
"is_active": 1,
"version_group_id": "schema_0198222f-fe07-76a8-87d0-880d5289f759",
"name": "Product #2",
"description": "Billing Schema #1",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"product_id": "product_0198222f-fe06-743f-8651-42128a1e218a",
"type": "ONE_TIME",
"currency": "EUR",
"base_price": "10.000000000000000000000000000000",
"interval_type": null,
"interval_count": null,
"payment_type": null,
"renew_type": null,
"billing_type": null,
"created_at": "2025-07-19 12:17:07",
"updated_at": null
}
}
],
"calculations": [
{
"id": "invoice_calc_019851f6-03c9-7768-9a6f-3e7a86b7eeed",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"invoice_id": "invoice_019851f5-39f7-714a-8f2c-3c3eede808b4",
"invoice_item_id": "invoice_item_019851f5-39f8-753b-9cf5-985300807b51",
"title": "Product #1",
"calculation_type": "PRODUCT",
"idx": 0,
"currency": "GBP",
"initial_price": "40.000000000000000000000000000000",
"price_delta": "0.000000000000000000000000000000",
"price": "40.000000000000000000000000000000",
"details": {
"price": "10.000000000000000000000000000000",
"currency": "GBP",
"quantity": 4,
"product_id": "product_01982266-ee05-7249-a0bf-787b4b6e0946"
},
"created_at": "2025-07-28 18:55:34",
"updated_at": null
},
{
"id": "invoice_calc_019851f6-03cc-7fe9-8c19-a4cb550bb75c",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"invoice_id": "invoice_019851f5-39f7-714a-8f2c-3c3eede808b4",
"invoice_item_id": "invoice_item_019851f5-39f8-753b-9cf5-985300807b51",
"title": "Currency change GBP => EUR",
"calculation_type": "CURRENCY_CHANGE",
"idx": 1,
"currency": "EUR",
"initial_price": "40.000000000000000000000000000000",
"price_delta": "0.000000000000000000000000000000",
"price": "46.557223908892338549036308436250",
"details": {
"to": "EUR",
"from": "GBP",
"to_rate_usd": "0.847260000000000000",
"from_rate_usd": "0.727930000000000000"
},
"created_at": "2025-07-28 18:55:34",
"updated_at": null
},
{
"id": "invoice_calc_019851f6-03ce-7afb-a2e6-897bb4a22728",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"invoice_id": "invoice_019851f5-39f7-714a-8f2c-3c3eede808b4",
"invoice_item_id": "invoice_item_019851f5-39f9-7eeb-aa8c-2ddfca8c65a3",
"title": "Product #2",
"calculation_type": "PRODUCT",
"idx": 0,
"currency": "EUR",
"initial_price": "10.000000000000000000000000000000",
"price_delta": "0.000000000000000000000000000000",
"price": "10.000000000000000000000000000000",
"details": {
"price": "10.000000000000000000000000000000",
"currency": "EUR",
"quantity": 1,
"product_id": "product_0198222f-fe06-743f-8651-42128a1e218a"
},
"created_at": "2025-07-28 18:55:34",
"updated_at": null
},
{
"id": "invoice_calc_019851f6-03d0-755e-ac57-96ca8b9dd424",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"invoice_id": "invoice_019851f5-39f7-714a-8f2c-3c3eede808b4",
"invoice_item_id": null,
"title": "Total",
"calculation_type": "TOTAL",
"idx": 0,
"currency": "EUR",
"initial_price": "56.557223908892338549036308436250",
"price_delta": "0.000000000000000000000000000000",
"price": "56.557223908892338549036308436250",
"details": [],
"created_at": "2025-07-28 18:55:34",
"updated_at": null
},
{
"id": "invoice_calc_019851f6-03d2-7cd5-872e-d0fdc5f19f97",
"organization_id": "org_0196b0e9-11d8-7f26-b1d2-bd47054e4827",
"invoice_id": "invoice_019851f5-39f7-714a-8f2c-3c3eede808b4",
"invoice_item_id": null,
"title": "Total, USD",
"calculation_type": "TOTAL_USD",
"idx": 0,
"currency": "USD",
"initial_price": "66.753091033321930161976616901836",
"price_delta": "0.000000000000000000000000000000",
"price": "66.753091033321930161976616901836",
"details": [],
"created_at": "2025-07-28 18:55:34",
"updated_at": null
}
],
"organization": {
"name": "4",
"image_url": "https://assets.bitgpt.xyz/uploads/2025/03/26/156091ee0884f36de9836d.jpeg"
},
"payments": [
{
"id": "payment_01979449-dc2f-71e4-b565-42d78c0d83aa",
"idempotency_key": "1b70f35483e563e009967abe74308e6977f9b36f1bfc05168fa22104b64293d6-invoice_01979284-7610-79f8-86c4-978168730054",
"organization_id": "org_f44b7809595e5ebe3bb4d6",
"provider_id": "prov_bitcoin_bitcoin",
"invoice_id": "invoice_019851f5-39f7-714a-8f2c-3c3eede808b4",
"currency": "BITCOIN",
"price": "0.000126300000000000000000000000",
"status": "COMPLETED",
"created_at": "2025-06-21 22:59:17",
"updated_at": "2025-08-20 23:57:58",
"happened_at": "2025-06-21 22:59:17"
}
]
}
Message of the response, human readable
"Resource created successfully"
API environment
development, production Error message of the response, human readable
"Invalid email address"
Useful informaiton, not always present, to debug the response
{ "request_id": "req_1234567890" }
"Some pertinent log message"
Validator response object, each key is the field name and value is the error message
{
"email": "Invalid email address",
"password": "Password is required"
}
Support ID linked to the response, used to identify it when talking with our team
"support_uuidv7-something-else"

