Introducing the Better Auth Chargebee plugin: Use it to handle subscriptions, billing, and auth seamlessly.
Chargebeechargebee API

Capture authorization

The capture_authorization operation finalizes a previously created hold by converting reserved credits into consumed credits.

API Behavior

  • Completes an earlier authorize operation.
  • Moves credits from held (reserved) → consumed (debited).
  • Any unused portion of the hold is automatically released back to the usable balance.
  • Once fully captured (and remainder released, if any), the hold is considered closed.

Requirement

Requires the authorization_id (i.e., the ledger_operation_id of the original authorize operation).

The response returns both the created ledger_operation object and the updated ledger_account_balance.

Sample Request

Sample Result[JSON]

URL Format

POST https://[site].chargebee.com/api/v2/ledger_operations/capture_authorization

Input Parameters

authorization_id
required, string, max chars=50

Identifier of the original authorize operation whose hold is being captured.

Behavior

  • Must reference a valid and active hold created via an authorize request.
  • Must match the ledger_operation_id used in the original authorize call.
id
optional, string, max chars=50

Optional client-supplied identifier for this capture_authorization operation.

Behavior

  • When provided, must uniquely identify this operation across the entire ledger.
  • Should not conflict with any other operation, regardless of type.
amount
required, string, max chars=36

The number of credits to finalize as consumption from a previously authorized (held) amount. Pass this value as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).

Behavior

  • Must be less than or equal to the current held amount for the specified authorization_id.
  • The specified amount is moved from held → consumed.

Constraints

Cannot exceed the total credits currently on hold for the authorization.

Example

Step 1: Authorize (hold created): amount = "100" results in 100 credits moved from usable to held.

Step 2: Capture authorization (partial consumption): amount = "70" results in 70 credits moved from held to consumed; remaining 30 credits auto-released back to usable balance (via internal release operation)

Ledger Effect Summary

  • Consumed: 70
  • Released: 30
  • Remaining Hold: 0 (hold closed)
ledger_operation_timestamp
required, timestamp(UTC) in seconds

Unix timestamp (in seconds) representing when the capture_authorization occurred in the upstream system.

Usage

Used for period attribution, grace-period eligibility, and reporting accuracy.

metadata
optional, jsonobject

Optional opaque JSON object carrying additional business context.

Behavior

  • Stored as-is and returned verbatim by the system.
  • Not interpreted, validated, or indexed by the system.

Returns

Ledger operation object
Resource object representing ledger_operation
Ledger account balance object
Resource object representing ledger_account_balance