Retrieves a credit balance transaction.
Parameters
- idstringRequired
Unique identifier for the object.
Returns
Returns a credit balance transaction.
{ "id": "cbtxn_test_61R9ZljjaFmdidb6e41L6nFOS1ekD9Ue", "object": "billing.credit_balance_transaction", "created": 1726619524, "credit": null, "credit_grant": "credgr_test_61R9ZkIkIzLSp0xze41L6nFOS1ekDTPE", "debit": { "amount": { "monetary": { "currency": "usd", "value": 1000 }, "type": "monetary" }, "credits_applied": { "invoice": "in_1Q0BoLL6nFOS1ekDbwBM5ER1", "invoice_line_item": "il_1QB443L6nFOS1ekDwRiN3Z4n" }, "type": "credits_applied" }, "effective_at": 1729211351, "livemode": false, "test_clock": "clock_1Q0BoJL6nFOS1ekDbyYYuseM", "type": "debit"}
Retrieve a list of credit balance transactions.
Parameters
- customerstringRequired
The customer for which to fetch credit balance transactions.
- credit_
grantstring The credit grant for which to fetch credit balance transactions.
More parameters
- ending_
beforestring - limitinteger
- starting_
afterstring
Returns
Returns a list of credit balanace transactions.
{ "object": "list", "data": [ { "id": "cbtxn_test_61R9ZljjaFmdidb6e41L6nFOS1ekD9Ue", "object": "billing.credit_balance_transaction", "created": 1726619524, "credit": null, "credit_grant": "credgr_test_61R9ZkIkIzLSp0xze41L6nFOS1ekDTPE", "debit": { "amount": { "monetary": { "currency": "usd", "value": 1000 }, "type": "monetary" }, "credits_applied": { "invoice": "in_1Q0BoLL6nFOS1ekDbwBM5ER1", "invoice_line_item": "il_1QB443L6nFOS1ekDwRiN3Z4n" }, "type": "credits_applied" }, "effective_at": 1729211351, "livemode": false, "test_clock": "clock_1Q0BoJL6nFOS1ekDbyYYuseM", "type": "debit" }, { "id": "cbtxn_test_61R9ZkIbb17ze4b2s41L6nFOS1ekDXHs", "object": "billing.credit_balance_transaction", "created": 1726619434, "credit": { "amount": { "monetary": { "currency": "usd", "value": 1000 }, "type": "monetary" }, "type": "credits_granted" }, "credit_grant": "credgr_test_61R9ZkIkIzLSp0xze41L6nFOS1ekDTPE", "debit": null, "effective_at": 1726619434, "livemode": false, "test_clock": "clock_1Q0BoJL6nFOS1ekDbyYYuseM", "type": "credit" } ], "has_more": false, "url": "/v1/billing/credit_grants"}
You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.
Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
For example, you might have a single “gold” product that has plans for $10/month, $100/year, €9/month, and €90/year.
Related guides: Set up a subscription and more about products and prices.
License Fees v2
A LicenseFee describes quantity-based pricing such as seat-based pricing.
A MeteredItem represents any item that you bill customers for based on how much they use it, such as hourly cloud CPU usage or tokens generated by an AI service.