Complete REST API documentation for Comet Platform.
This API reference documents two types of APIs:
Lightning Node API - Direct calls to user-deployed Lightning nodes (LND API)
Backend Services API - Calls to Comet Platform backend services for managing nodes, billing, and users
The Lightning Node API allows you to interact directly with your deployed Lightning nodes using the LND (Lightning Network Daemon) REST API.
The base URL for Lightning Node API calls is your node's API endpoint. Users receive their node API endpoint after deployment. The endpoint format is:
Example:
Note: Each deployed node has its own unique API endpoint that you own and control.
Macaroon Authentication: Lightning Node API endpoints require macaroon authentication via the Grpc-Metadata-macaroon header:
curl -H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
<https: your-node.example.com ="" v1 ="" getinfo =""
Generate Macaroons: Macaroons can be generated and managed through the Comet Platform dashboard or via the Backend Services API (see Macaroon Management in Provisioning Service).
Rate limits are configured per node and depend on your subscription tier.
Tier
Requests/min
Burst
Free
60
100
Pro
600
1000
Enterprise
6000
10000
GET /v1/getinfo
Get information about the Lightning node.
cURL Example:
curl -X GET \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
<https: your-node.example.com ="" v1 ="" getinfo =""
Response:
{
"identity_pubkey" : "03abc..." ,
"alias" : "my-node" ,
"num_pending_channels" : 0 ,
"num_active_channels" : 15 ,
"num_peers" : 10 ,
"block_height" : 800000 ,
"block_hash" : "0000000000000000000..." ,
"synced_to_chain" : true ,
"testnet" : false
}
GET /v1/balance/blockchain
Get on-chain balance.
cURL Example:
curl -X GET \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
<https: your-node.example.com ="" v1 ="" balance ="" blockchain =""
Response:
{
"total_balance" : "5000000" ,
"confirmed_balance" : "4900000" ,
"unconfirmed_balance" : "100000"
}
GET /v1/balance/channels
Get channel balance.
cURL Example:
curl -X GET \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
<https: your-node.example.com ="" v1 ="" balance ="" channels =""
Response:
{
"balance" : "25000000" ,
"pending_open_balance" : "1000000"
}
GET /v1/channels
List all channels for the node.
cURL Example:
curl -X GET \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
"<https: your-node.example.com=" " v1=" " channels?active_only=" true ">"
Query Parameters:
active_only: boolean (optional)
inactive_only: boolean (optional)
public_only: boolean (optional)
private_only: boolean (optional)
Response:
{
"channels" : [
{
"active" : true ,
"remote_pubkey" : "03def..." ,
"channel_point" : "abc123:0" ,
"chan_id" : "123456789" ,
"capacity" : "1000000" ,
"local_balance" : "500000" ,
"remote_balance" : "500000" ,
"commit_fee" : "1000" ,
"commit_weight" : "600" ,
"fee_per_kw" : "12500" ,
"unsettled_balance" : "0" ,
"total_satoshis_sent" : "100000" ,
"total_satoshis_received" : "200000" ,
"num_updates" : "5" ,
"pending_htlcs" : [ ]
}
]
}
POST /v1/channels
Open a new channel.
cURL Example:
curl -X POST \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
-H "Content-Type: application/json" \\
-d '{
"node_pubkey": "03def...",
"node_pubkey_string": "03def...",
"local_funding_amount": "1000000",
"push_sat": "0",
"sat_per_byte": "10",
"private": false,
"min_htlc_msat": "1000",
"remote_csv_delay": 144,
"min_confs": 1,
"spend_unconfirmed": false
}' \\
<https: your-node.example.com ="" v1 ="" channels =""
Request:
{
"node_pubkey" : "03def..." ,
"node_pubkey_string" : "03def..." ,
"local_funding_amount" : "1000000" ,
"push_sat" : "0" ,
"sat_per_byte" : "10" ,
"private" : false ,
"min_htlc_msat" : "1000" ,
"remote_csv_delay" : 144 ,
"min_confs" : 1 ,
"spend_unconfirmed" : false
}
Response:
{
"funding_txid_bytes" : "abc123..." ,
"funding_txid_str" : "abc123..." ,
"output_index" : 0
}
POST /v1/channels/{channel_point}/close
Close a channel.
cURL Example:
curl -X POST \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
-H "Content-Type: application/json" \\
-d '{
"channel_point": {
"funding_txid_bytes": "abc123...",
"funding_txid_str": "abc123...",
"output_index": 0
},
"force": false,
"target_conf": 6,
"sat_per_byte": "10",
"delivery_address": "bc1q..."
}' \\
<https: your-node.example.com ="" v1 ="" channels ="" abc123:0 ="" close =""
Request:
{
"channel_point" : {
"funding_txid_bytes" : "abc123..." ,
"funding_txid_str" : "abc123..." ,
"output_index" : 0
} ,
"force" : false ,
"target_conf" : 6 ,
"sat_per_byte" : "10" ,
"delivery_address" : "bc1q..."
}
POST /v1/invoices
Create a new invoice.
cURL Example:
curl -X POST \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
-H "Content-Type: application/json" \\
-d '{
"memo": "Payment for order #123",
"value": "50000",
"value_msat": "50000000",
"description_hash": null,
"expiry": "3600",
"fallback_addr": "",
"cltv_expiry": 0,
"private": false
}' \\
<https: your-node.example.com ="" v1 ="" invoices =""
Request:
{
"memo" : "Payment for order #123" ,
"value" : "50000" ,
"value_msat" : "50000000" ,
"description_hash" : null ,
"expiry" : "3600" ,
"fallback_addr" : "" ,
"cltv_expiry" : 0 ,
"private" : false
}
Response:
{
"r_hash" : "abc123..." ,
"payment_request" : "lnbc500n1..." ,
"add_index" : "5" ,
"payment_addr" : "def456..."
}
GET /v1/invoices
List invoices.
cURL Example:
curl -X GET \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
"<https: your-node.example.com=" " v1=" " invoices?pending_only=" false &num_max_invoices =10 ">"
Query Parameters:
pending_only: boolean (optional)
index_offset: uint64 (optional)
num_max_invoices: uint64 (optional)
reversed: boolean (optional)
Response:
{
"invoices" : [
{
"memo" : "Payment for order #123" ,
"r_preimage" : "def456..." ,
"r_hash" : "abc123..." ,
"value" : "50000" ,
"value_msat" : "50000000" ,
"settled" : true ,
"creation_date" : "1704537000" ,
"settle_date" : "1704537100" ,
"payment_request" : "lnbc500n1..." ,
"add_index" : "5" ,
"settle_index" : "5"
}
] ,
"last_index_offset" : "5" ,
"first_index_offset" : "0"
}
GET /v1/invoices/{r_hash_str}
Look up an invoice by payment hash.
cURL Example:
curl -X GET \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
<https: your-node.example.com ="" v1 ="" invoices ="" abc123 =""
Response:
{
"memo" : "Payment for order #123" ,
"r_preimage" : "def456..." ,
"r_hash" : "abc123..." ,
"value" : "50000" ,
"value_msat" : "50000000" ,
"settled" : true ,
"creation_date" : "1704537000" ,
"settle_date" : "1704537100" ,
"payment_request" : "lnbc500n1..." ,
"add_index" : "5" ,
"settle_index" : "5"
}
POST /v1/channels/transactions
Send a payment.
cURL Example:
curl -X POST \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
-H "Content-Type: application/json" \\
-d '{
"payment_request": "lnbc500n1...",
"amt": "50000",
"fee_limit": {
"fixed": "1000"
},
"timeout_seconds": 60
}' \\
<https: your-node.example.com ="" v1 ="" channels ="" transactions =""
Request:
{
"payment_request" : "lnbc500n1..." ,
"amt" : "50000" ,
"fee_limit" : {
"fixed" : "1000"
} ,
"timeout_seconds" : 60
}
Response:
{
"payment_error" : "" ,
"payment_preimage" : "def456..." ,
"payment_route" : {
"total_time_lock" : 800000 ,
"total_fees" : "100" ,
"total_amt" : "50100" ,
"hops" : [ ]
} ,
"payment_hash" : "abc123..."
}
GET /v1/payments
List payments.
cURL Example:
curl -X GET \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
"<https: your-node.example.com=" " v1=" " payments?include_incomplete=" false &max_payments =10 ">"
Query Parameters:
include_incomplete: boolean (optional)
index_offset: uint64 (optional)
max_payments: uint64 (optional)
reversed: boolean (optional)
Response:
{
"payments" : [
{
"payment_hash" : "abc123..." ,
"payment_preimage" : "def456..." ,
"value" : "50000" ,
"value_sat" : "50000" ,
"value_msat" : "50000000" ,
"creation_date" : "1704537000" ,
"fee" : "100" ,
"fee_sat" : "100" ,
"fee_msat" : "100000" ,
"payment_preimage" : "def456..." ,
"value_sat" : "50000" ,
"value_msat" : "50000000" ,
"payment_request" : "lnbc500n1..." ,
"status" : "SUCCEEDED" ,
"htlcs" : [ ]
}
] ,
"first_index_offset" : "0" ,
"last_index_offset" : "5"
}
GET /v1/peers
List connected peers.
cURL Example:
curl -X GET \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
<https: your-node.example.com ="" v1 ="" peers =""
Response:
{
"peers" : [
{
"pub_key" : "03def..." ,
"address" : "45.67.89.10:9735" ,
"bytes_sent" : "1234567" ,
"bytes_recv" : "7654321" ,
"sat_sent" : "100000" ,
"sat_recv" : "200000" ,
"inbound" : false ,
"ping_time" : "50"
}
]
}
POST /v1/peers
Connect to a peer.
cURL Example:
curl -X POST \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
-H "Content-Type: application/json" \\
-d '{
"addr": {
"pubkey": "03def...",
"host": "45.67.89.10:9735"
},
"perm": false,
"timeout": "60"
}' \\
<https: your-node.example.com ="" v1 ="" peers =""
Request:
{
"addr" : {
"pubkey" : "03def..." ,
"host" : "45.67.89.10:9735"
} ,
"perm" : false ,
"timeout" : "60"
}
POST /v1/newaddress
Generate a new on-chain address.
cURL Example:
curl -X POST \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
-H "Content-Type: application/json" \\
-d '{
"type": 1
}' \\
<https: your-node.example.com ="" v1 ="" newaddress =""
Request:
Response:
POST /v1/transactions
Send on-chain transaction.
cURL Example:
curl -X POST \\
-H "Grpc-Metadata-macaroon: <macaroon_hex>" \\
-H "Content-Type: application/json" \\
-d '{
"addr": "bc1q...",
"amount": "100000",
"target_conf": 6,
"sat_per_byte": "10",
"send_all": false,
"label": "payment"
}' \\
<https: your-node.example.com ="" v1 ="" transactions =""
Request:
{
"addr" : "bc1q..." ,
"amount" : "100000" ,
"target_conf" : 6 ,
"sat_per_byte" : "10" ,
"send_all" : false ,
"label" : "payment"
}
Response:
{
"txid" : "abc123..." ,
"tx_bytes" : "..."
}
Error Response:
{
"error" : "insufficient balance" ,
"code" : 2 ,
"message" : "Insufficient balance for payment"
}
Error Codes:
1: Cancelled
2: Unknown
3: Invalid argument
4: Deadline exceeded
5: Not found
6: Already exists
7: Permission denied
8: Resource exhausted
9: Failed precondition
10: Aborted
11: Out of range
12: Unimplemented
13: Internal
14: Unavailable
15: Data loss
16: Unauthenticated
The Backend Services API allows you to manage your nodes, billing, subscriptions, and user account through Comet Platform's backend services.
Each backend service has its own base URL:
User Service : https://users.cometplatform.com
Billing Service : https://billing.cometplatform.com
Provisioning Service : https://provisioning.cometplatform.com
Bearer Token (RSA Auth): Most endpoints require Bearer token authentication:
curl -H "Authorization: Bearer <access_token>" \\
<https: users.cometplatform.com ="" user ="" me =""
API Key Authentication: Some endpoints support API key authentication via the X-API-Key header:
curl -H "X-API-Key: <api_key>" \\
<https: provisioning.cometplatform.com ="" company ="" {company_id}="" nodes =""
Base URL: https://users.cometplatform.com
GET /user/me
Get the current authenticated user's information.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: users.cometplatform.com ="" user ="" me =""
Response:
{
"email" : "user@example.com" ,
"firstName" : "John" ,
"lastName" : "Doe" ,
"phone" : "+1234567890" ,
"status" : "active" ,
"avatar" : "https://..." ,
"currency" : "USD" ,
"company" : {
"id" : "company_abc123" ,
"name" : "My Company" ,
"country" : "US"
}
}
PATCH /user/me
Update the current user's information.
cURL Example:
curl -X PATCH \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"firstName": "John",
"lastName": "Doe",
"phone": "+1234567890",
"avatar": "https://...",
"currency": "USD"
}' \\
<https: users.cometplatform.com ="" user ="" me =""
Request:
{
"firstName" : "John" ,
"lastName" : "Doe" ,
"phone" : "+1234567890" ,
"avatar" : "https://..." ,
"currency" : "USD"
}
Response:
{
"email" : "user@example.com" ,
"firstName" : "John" ,
"lastName" : "Doe" ,
"phone" : "+1234567890" ,
"status" : "active" ,
"avatar" : "https://..." ,
"currency" : "USD" ,
"company" : {
"id" : "company_abc123" ,
"name" : "My Company" ,
"country" : "US"
}
}
DELETE /user
Soft delete the current user account.
cURL Example:
curl -X DELETE \\
-H "Authorization: Bearer <access_token>" \\
<https: users.cometplatform.com ="" user =""
Response:
{
"message" : "User deleted successfully"
}
POST /companies
Create a new company.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"name": "My Company",
"country": "US"
}' \\
<https: users.cometplatform.com ="" companies =""
Request:
{
"name" : "My Company" ,
"country" : "US"
}
Response:
{
"id" : "company_abc123" ,
"name" : "My Company" ,
"country" : "US"
}
PATCH /companies
Update the current user's company.
cURL Example:
curl -X PATCH \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"name": "Updated Company Name",
"country": "CA"
}' \\
<https: users.cometplatform.com ="" companies =""
Request:
{
"name" : "Updated Company Name" ,
"country" : "CA"
}
Response:
{
"id" : "company_abc123" ,
"name" : "Updated Company Name" ,
"country" : "CA"
}
POST /apikeys
Create a new API key.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"name": "My API Key",
"permissions": ["read", "write"]
}' \\
<https: users.cometplatform.com ="" apikeys =""
Request:
{
"name" : "My API Key" ,
"permissions" : [ "read" , "write" ]
}
Response:
{
"id" : "apikey_abc123" ,
"name" : "My API Key" ,
"key" : "sk_live_abc123..." ,
"created_at" : "2025-01-06T10:00:00Z"
}
GET /apikeys
List all API keys for the current user.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: users.cometplatform.com ="" apikeys =""
Response:
{
"keys" : [
{
"id" : "apikey_abc123" ,
"name" : "My API Key" ,
"created_at" : "2025-01-06T10:00:00Z"
}
]
}
GET /apikeys/{id}
Get a specific API key by ID.
cURL Example:
Response:
DELETE /apikeys/{id}
Delete an API key.
cURL Example:
curl -X DELETE \\
-H "Authorization: Bearer <access_token>" \\
<https: users.cometplatform.com ="" apikeys ="" apikey_abc123 =""
Response:
{
"message" : "API key deleted successfully"
}
GET /notification/settings
Get user notification settings.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: users.cometplatform.com ="" notification ="" settings =""
Response:
[
{
"eventType" : "node-status-change" ,
"email" : true ,
"sms" : false ,
"push" : true
}
]
PATCH /notification/settings
Update user notification settings.
cURL Example:
curl -X PATCH \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '[
{
"eventType": "node-status-change",
"email": true,
"sms": false,
"push": true
}
]' \\
<https: users.cometplatform.com ="" notification ="" settings =""
Request:
[
{
"eventType" : "node-status-change" ,
"email" : true ,
"sms" : false ,
"push" : true
}
]
Response:
[
{
"eventType" : "node-status-change" ,
"email" : true ,
"sms" : false ,
"push" : true
}
]
Base URL: https://provisioning.cometplatform.com
POST /company/{company_id}/nodes
Create a new Lightning node.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"name": "my-node",
"network": "mainnet",
"region": "us-east",
"type": "standard",
"tier": "pro"
}' \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes =""
Request:
{
"name" : "my-node" ,
"network" : "mainnet" ,
"region" : "us-east" ,
"type" : "standard" ,
"tier" : "pro"
}
Response:
{
"node_id" : "node_abc123" ,
"status" : "creating"
}
GET /company/{company_id}/nodes
List all nodes for a company.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes =""
Response:
[
{
"node_name" : "my-node" ,
"status" : "running" ,
"node_id" : "node_abc123" ,
"region" : "us-east" ,
"type" : "standard" ,
"tier" : "pro" ,
"tls_cert" : "created" ,
"api_endpoint" : "node-abc123.example.com:8080" ,
"created" : "2025-01-06T10:00:00Z" ,
"delete_requested_at" : null ,
"purge_requested_at" : null ,
"network" : "mainnet" ,
"owner_id" : "company_abc123" ,
"version" : "0.17.0" ,
"update_available" : false ,
"macaroons" : [ ] ,
"command_history" : [ ] ,
"settings" : { }
}
]
GET /company/{company_id}/nodes/{node_id}
Get details for a specific node.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes ="" node_abc123 =""
Response:
{
"node_name" : "my-node" ,
"status" : "running" ,
"node_id" : "node_abc123" ,
"region" : "us-east" ,
"type" : "standard" ,
"tier" : "pro" ,
"tls_cert" : "created" ,
"api_endpoint" : "node-abc123.example.com:8080" ,
"created" : "2025-01-06T10:00:00Z" ,
"delete_requested_at" : null ,
"purge_requested_at" : null ,
"network" : "mainnet" ,
"owner_id" : "company_abc123" ,
"version" : "0.17.0" ,
"update_available" : false ,
"macaroons" : [ ] ,
"command_history" : [ ] ,
"settings" : { }
}
POST /company/{company_id}/nodes/{node_id}/start
Start a stopped node.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes ="" node_abc123 ="" start =""
Response:
{
"node_name" : "my-node" ,
"status" : "starting" ,
"node_id" : "node_abc123" ,
"region" : "us-east" ,
"type" : "standard" ,
"tier" : "pro" ,
"tls_cert" : "created" ,
"api_endpoint" : "node-abc123.example.com:8080" ,
"created" : "2025-01-06T10:00:00Z" ,
"delete_requested_at" : null ,
"purge_requested_at" : null ,
"network" : "mainnet" ,
"owner_id" : "company_abc123" ,
"version" : "0.17.0" ,
"update_available" : false ,
"macaroons" : [ ] ,
"command_history" : [ ] ,
"settings" : { }
}
POST /company/{company_id}/nodes/{node_id}/stop
Stop a running node.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes ="" node_abc123 ="" stop =""
Response:
{
"node_name" : "my-node" ,
"status" : "stopping" ,
"node_id" : "node_abc123" ,
"region" : "us-east" ,
"type" : "standard" ,
"tier" : "pro" ,
"tls_cert" : "created" ,
"api_endpoint" : "node-abc123.example.com:8080" ,
"created" : "2025-01-06T10:00:00Z" ,
"delete_requested_at" : null ,
"purge_requested_at" : null ,
"network" : "mainnet" ,
"owner_id" : "company_abc123" ,
"version" : "0.17.0" ,
"update_available" : false ,
"macaroons" : [ ] ,
"command_history" : [ ] ,
"settings" : { }
}
DELETE /company/{company_id}/nodes/{node_id}
Delete a node.
cURL Example:
curl -X DELETE \\
-H "Authorization: Bearer <access_token>" \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes ="" node_abc123 =""
Response:
{
"node_name" : "my-node" ,
"status" : "deleting" ,
"node_id" : "node_abc123" ,
"region" : "us-east" ,
"type" : "standard" ,
"tier" : "pro" ,
"tls_cert" : "created" ,
"api_endpoint" : "node-abc123.example.com:8080" ,
"created" : "2025-01-06T10:00:00Z" ,
"delete_requested_at" : "2025-01-06T11:00:00Z" ,
"purge_requested_at" : null ,
"network" : "mainnet" ,
"owner_id" : "company_abc123" ,
"version" : "0.17.0" ,
"update_available" : false ,
"macaroons" : [ ] ,
"command_history" : [ ] ,
"settings" : { }
}
POST /company/{company_id}/nodes/{node_id}/macaroon
Upload an encrypted macaroon for a node.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"encrypted_macaroon": "encrypted_data...",
"permissions": "readonly"
}' \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes ="" node_abc123 ="" macaroon =""
Request:
{
"encrypted_macaroon" : "encrypted_data..." ,
"permissions" : "readonly"
}
Response:
{
"node_id" : "node_abc123" ,
"name" : "readonly" ,
"created" : "2025-01-06T10:00:00Z"
}
GET /company/{company_id}/nodes/{node_id}/macaroon/{permission}
Get an encrypted macaroon by permission type.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes ="" node_abc123 ="" macaroon ="" readonly =""
Response:
{
"node_id" : "node_abc123" ,
"permission" : "readonly-macaroon" ,
"macaroon" : "encrypted_data..."
}
POST /company/{company_id}/nodes/{node_id}/seed
Upload an encrypted seed for a node.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"encrypted_seed": "encrypted_data..."
}' \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes ="" node_abc123 ="" seed =""
Request:
{
"encrypted_seed" : "encrypted_data..."
}
Response:
{
"node_id" : "node_abc123" ,
"seed" : "encrypted_data..."
}
GET /company/{company_id}/nodes/{node_id}/seed
Get the encrypted seed for a node.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: provisioning.cometplatform.com ="" company ="" company_abc123 ="" nodes ="" node_abc123 ="" seed =""
Response:
{
"node_id" : "node_abc123" ,
"seed" : "encrypted_data..."
}
GET /resources
Get available resource configurations.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
"<https: provisioning.cometplatform.com=" " resources?type=" node ®ion =us-east&network =mainnet">"
Query Parameters:
type: string (required) - Resource type (e.g., "node")
region: string (required) - Region (e.g., "us-east")
network: string (required) - Network (e.g., "mainnet", "testnet")
Response:
[
{
"type" : "node" ,
"region" : "us-east" ,
"network" : "mainnet" ,
"vCpu" : 2 ,
"memGB" : 4 ,
"storageSizeGB" : 100 ,
"credits" : 100
}
]
Base URL: https://billing.cometplatform.com
GET /company/{companyId}/billing-account
Get or create a billing account for a company.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: billing.cometplatform.com ="" company ="" company_abc123 ="" billing-account =""
Response:
{
"id" : "billing_account_abc123" ,
"companyId" : "company_abc123" ,
"status" : "active" ,
"address1" : "123 Main St" ,
"address2" : "" ,
"city" : "New York" ,
"state" : "NY" ,
"zip" : "10001" ,
"country" : "US" ,
"taxIdNumber" : "" ,
"subscriptionId" : "subscription_abc123" ,
"subscription" : {
"id" : "subscription_abc123" ,
"name" : "Pro Plan" ,
"status" : "active"
}
}
PATCH /company/{companyId}/billing-account/{billingAccountId}
Update billing account information.
cURL Example:
curl -X PATCH \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"address1": "456 Oak Ave",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"country": "US",
"taxIdNumber": "12-3456789"
}' \\
<https: billing.cometplatform.com ="" company ="" company_abc123 ="" billing-account ="" billing_account_abc123 =""
Request:
{
"address1" : "456 Oak Ave" ,
"city" : "Los Angeles" ,
"state" : "CA" ,
"zip" : "90001" ,
"country" : "US" ,
"taxIdNumber" : "12-3456789"
}
GET /company/{companyId}/billing-account/{billingAccountId}/subscription/available-plans
Get list of available subscription plans.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: billing.cometplatform.com ="" company ="" company_abc123 ="" billing-account ="" billing_account_abc123 ="" subscription ="" available-plans =""
Response:
[
{
"id" : "plan_basic" ,
"name" : "Basic Plan" ,
"description" : "Basic features" ,
"price" : 29.99 ,
"credits" : 1000 ,
"billingFrequency" : "monthly" ,
"features" : [ "feature1" , "feature2" ]
}
]
POST /company/{companyId}/billing-account/{billingAccountId}/subscription
Create, upgrade, or downgrade a subscription.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"plan": "pro",
"billingFrequency": "monthly",
"confirm": false,
"paymentMethod": "card"
}' \\
<https: billing.cometplatform.com ="" company ="" company_abc123 ="" billing-account ="" billing_account_abc123 ="" subscription =""
Request:
{
"plan" : "pro" ,
"billingFrequency" : "monthly" ,
"confirm" : false ,
"paymentMethod" : "card"
}
Response:
{
"action" : "created" ,
"subscription" : {
"id" : "subscription_abc123" ,
"name" : "Pro Plan" ,
"status" : "pending_payment" ,
"type" : "pro" ,
"billingFrequency" : "monthly" ,
"price" : 99.99 ,
"credits" : 10000
}
}
POST /company/{companyId}/billing-account/{billingAccountId}/subscription/cancel
Cancel a subscription.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
-H "Content-Type: application/json" \\
-d '{
"reason": "No longer needed"
}' \\
<https: billing.cometplatform.com ="" company ="" company_abc123 ="" billing-account ="" billing_account_abc123 ="" subscription ="" cancel =""
Request:
{
"reason" : "No longer needed"
}
Response:
{
"id" : "subscription_abc123" ,
"name" : "Pro Plan" ,
"status" : "cancelled" ,
"cancelReason" : "No longer needed" ,
"canceledAt" : "2025-01-06T11:00:00Z"
}
POST /company/{companyId}/billing-account/{billingAccountId}/subscription/re-activate
Reactivate a cancelled subscription.
cURL Example:
curl -X POST \\
-H "Authorization: Bearer <access_token>" \\
<https: billing.cometplatform.com ="" company ="" company_abc123 ="" billing-account ="" billing_account_abc123 ="" subscription ="" re-activate =""
Response:
{
"id" : "subscription_abc123" ,
"name" : "Pro Plan" ,
"status" : "active" ,
"type" : "pro" ,
"billingFrequency" : "monthly" ,
"price" : 99.99 ,
"credits" : 10000
}
GET /company/{companyId}/billing-account/{billingAccountId}/invoice
Get list of invoices.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: billing.cometplatform.com ="" company ="" company_abc123 ="" billing-account ="" billing_account_abc123 ="" invoice =""
Response:
[
{
"id" : "invoice_abc123" ,
"amount" : 99.99 ,
"currency" : "USD" ,
"status" : "paid" ,
"createdAt" : "2025-01-06T10:00:00Z" ,
"paidAt" : "2025-01-06T10:05:00Z"
}
]
GET /company/{companyId}/billing-account/{billingAccountId}/invoice/{invoiceId}
Get a specific invoice.
cURL Example:
curl -X GET \\
-H "Authorization: Bearer <access_token>" \\
<https: billing.cometplatform.com ="" company ="" company_abc123 ="" billing-account ="" billing_account_abc123 ="" invoice ="" invoice_abc123 =""
Response:
{
"id" : "invoice_abc123" ,
"amount" : 99.99 ,
"currency" : "USD" ,
"status" : "paid" ,
"createdAt" : "2025-01-06T10:00:00Z" ,
"paidAt" : "2025-01-06T10:05:00Z" ,
"lineItems" : [
{
"description" : "Pro Plan - Monthly" ,
"amount" : 99.99
}
]
}