For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDashboard
Getting StartedAPI ReferenceRoadmapBlog
Getting StartedAPI ReferenceRoadmapBlog
    • Resources
    • Authentication
    • Pagination
    • Rate limiting
  • API Keys
    • GETList api keys
    • GETGet api key
    • POSTCreate api key
    • PUTUpdate api key
    • DELDelete api key
  • Environments
    • POSTCreate environment
    • PUTUpdate environment
    • DELDelete environment
  • Plans
    • The Plan object
    • GETList plans
    • GETGet plan
    • POSTCreate plan
    • PUTUpdate plan
    • DELDelete plan
  • Companies
    • The Company object
    • GETList companies
    • POSTUpsert company
    • GETLookup company
    • DELDelete company
    • POSTDelete company by keys
    • GETList company memberships
    • POSTGet or create company membership
    • DELDelete company membership
    • POSTUpsert company trait
  • Users
    • The User object
    • GETList users
    • GETLookup user
    • POSTUpsert user
    • DELDelete user
    • POSTDelete user by keys
    • POSTUpsert user trait
  • Events
    • The Event object
    • GETList events
    • POSTCreate event
    • POSTCreate event batch
    • GETGet event
  • Features
    • The Feature object
    • GETList features
    • GETGet feature
    • POSTCreate feature
    • PUTUpdate feature
    • DELDelete feature
  • Flags
    • The Flag object
    • GETList flags
    • GETGet flag
    • POSTCreate flag
    • PUTUpdate flag
    • DELDelete flag
    • PUTUpdate flag rules
    • POSTCheck flag
    • POSTCheck flags
  • Entitlements
    • GETList company overrides
    • GETGet company override
    • POSTCreate company override
    • PUTUpdate company override
    • DELDelete company override
    • GETList plan entitlements
    • GETGet plan entitlement
    • POSTCreate plan entitlement
    • PUTUpdate plan entitlement
    • DELDelete plan entitlement
  • Feature Usage
    • GETList feature usage
  • Billing Credits
    • GETList credits
    • POSTCreate credit
    • GETGet credit
    • PUTUpdate credit
    • DELDelete credit
    • GETList credit bundles
    • POSTCreate credit bundle
    • GETGet credit bundle
    • PUTUpdate credit bundle
    • DELDelete credit bundle
    • POSTGrant credits to company
    • GETList company credit grants
    • GETList credit grants
    • PUTZero out credit grant
    • GETList plan credit grants
    • POSTCreate plan credit grant
    • DELDelete plan credit grant
    • GETGet credit ledger
  • Account Members
    • GETList account members
    • GETGet account member
LogoLogo
SupportDashboard
Billing Credits

Create credit bundle

POST
https://api.schematichq.com/billing/credits/bundles
POST
/billing/credits/bundles
1import { SchematicClient } from "@schematichq/schematic-typescript-node";
2
3async function main() {
4 const client = new SchematicClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.credits.createCreditBundle({
8 bundleName: "Premium Data Pack",
9 creditId: "crd_987654321",
10 currency: "USD",
11 pricePerUnit: 1500,
12 });
13}
14main();
1{
2 "data": {
3 "bundle_type": "fixed",
4 "created_at": "2024-01-15T09:30:00Z",
5 "credit_id": "crd_987654321",
6 "credit_name": "Premium Data Credit",
7 "currency_prices": [
8 {
9 "currency": "USD",
10 "price": {
11 "currency": "USD",
12 "external_price_id": "price_abc123",
13 "id": "price_001",
14 "interval": "month",
15 "interval_count": 1,
16 "price": 1500,
17 "provider_type": "metronome",
18 "scheme": "per_unit",
19 "nickname": "Monthly Premium Data Pack",
20 "price_decimal": "15.00"
21 }
22 }
23 ],
24 "expiry_type": "duration",
25 "expiry_unit": "billing_periods",
26 "has_grants": true,
27 "id": "bundle_123456789",
28 "name": "Premium Data Pack",
29 "status": "active",
30 "updated_at": "2024-01-15T09:30:00Z",
31 "billing_invoice_id": "inv_123456789",
32 "credit_description": "Access to premium data credits for enhanced analytics",
33 "credit_icon": "https://cdn.schematichq.com/icons/premium_data.png",
34 "expiry_unit_count": 3,
35 "plural_name": "Premium Data Packs",
36 "price": {
37 "currency": "USD",
38 "external_price_id": "price_abc123",
39 "id": "price_001",
40 "interval": "month",
41 "interval_count": 1,
42 "price": 1500,
43 "provider_type": "metronome",
44 "scheme": "per_unit",
45 "nickname": "Monthly Premium Data Pack",
46 "price_decimal": "15.00"
47 },
48 "quantity": 100,
49 "singular_name": "Premium Data Pack",
50 "unit_price": {
51 "currency": "USD",
52 "external_price_id": "price_abc123",
53 "id": "price_001",
54 "interval": "month",
55 "interval_count": 1,
56 "price": 1500,
57 "provider_type": "metronome",
58 "scheme": "per_unit",
59 "nickname": "Monthly Premium Data Pack",
60 "price_decimal": "15.00"
61 }
62 },
63 "params": {}
64}
Was this page helpful?
Previous

Get credit bundle

Next
Built with

Authentication

X-Schematic-Api-Keystring
API Key authentication via header

Request

This endpoint expects an object.
bundle_namestringRequired<=256 characters
credit_idstringRequired
currencystringRequired
price_per_unitlongRequired>=0
bundle_typeenum or nullOptional
Allowed values:
currency_priceslist of objects or nullOptional
expiry_typeenum or nullOptional
Allowed values:
expiry_unitenum or nullOptional
Allowed values:
expiry_unit_countlong or nullOptional>=1
price_per_unit_decimalstring or nullOptional
quantitylong or nullOptional>=1
statusenum or nullOptional
Allowed values:

Response

Created
dataobject
paramsobject
Input parameters

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error