ChargebeeAPI
Using AI coding agents like Claude Code or Cursor? Try the official Chargebee Agent Skills to speed up your development.Try now

Reconcile transaction

Idempotency Supported
Try in API Explorer

Update selected attributes of the transaction resource: status, id_at_gateway, and customer_id. Use this API for reconciliation purposes where the status of a transaction is in needs_attention that can be updated to either success or failure status.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/transactions/{transaction-id}/reconcile

Input Parameters

id_at_gateway
optional, string, max chars=100

The identifier with which this transaction is referred in gateway. The id_at_gateway can only be updated when the transaction status is in needs_attention.

Note:

  • It is mandatory to pass this parameter value for updating the transaction status from needs_attention to success. It is recommended to pass this value if available in the gateway.
  • An error occurs when the provided id_at_gateway value does not match the id_at_gateway value stored against the transaction in Chargebee.
customer_id
optional, string, max chars=50

Unique identifier of the customer for which this transaction is made. This is needed only when the transaction is successful but not associated with any customer.

Note:

An error occurs when the provided customer_id value does not match the customer_id value stored against the transaction in Chargebee.

status
optional, enumerated string

The status of this transaction. The status can only be updated when the transaction status is in needs_attention state.

Possible Enum Values
success

When the transaction is successful.

Note:

When the transaction is updated to success status, - and the invoice is associated with the transaction, the transaction amount will be applied to the invoice.

  • and no invoice is associated but the customer is associated with the transaction, customer_excess_payments will be updated.
failure

When the transaction is in failure status.

Note:

When the transaction is updated to failure status and the invoice is associated with the transaction,

  • the invoice will be moved to the payment_due status if the dunning is configured.
  • the invoice will be moved to the not_paid status if the dunning is not configured.

Returns

transactionTransaction object
Resource object representing transaction