Skip to main content
GET
/
v0
/
costs
/
{id}
Get
curl --request GET \
  --url https://api.paygentic.io/v0/costs/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "object": "cost",
  "name": "<string>",
  "currency": "<string>",
  "unitCost": "<string>",
  "productId": "<string>",
  "merchantId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "unit": "<string>",
  "eventType": "<string>",
  "valueProperty": "<string>",
  "groupBy": {},
  "deletedAt": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.paygentic.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

The unique identifier of the cost Unique identifier for a cost

Pattern: ^cst_[a-zA-Z0-9]+$

Response

Cost details

id
string
required

Unique identifier for a cost

Pattern: ^cst_[a-zA-Z0-9]+$
object
enum<string>
default:cost
required
Available options:
cost
type
enum<string>
required
Available options:
metered
name
string
required
currency
string
required
unitCost
string
required

Decimal as string to avoid floating point precision loss.

productId
string
required

Unique identifier for a product

Pattern: ^prod_[a-zA-Z0-9]+$
merchantId
string
required

Unique identifier for an organization

Pattern: ^org_[a-zA-Z0-9]+$
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
unit
string | null
aggregation
enum<string> | null
Available options:
SUM,
COUNT,
AVG,
MIN,
MAX,
UNIQUE_COUNT,
LATEST
eventType
string | null
valueProperty
string | null
groupBy
object
deletedAt
string<date-time> | null

Soft-delete timestamp. Always null for active costs returned by the API.