> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tirdad.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# wallet.transaction.updated

> Fired when an existing wallet transaction is updated (e.g. pending to completed). Doc-only for parsing.



## OpenAPI

````yaml /api-reference/openapi.json post /webhook-events/wallet.transaction.updated
openapi: 3.0.1
info:
  title: Tirdad API
  description: Tirdad API Service
  contact:
    name: API Support
  version: '1.0'
servers:
  - url: https://api.tirdad.ai/v1
    description: Tirdad API
security: []
paths:
  /webhook-events/wallet.transaction.updated:
    post:
      tags:
        - Webhook Events
      summary: wallet.transaction.updated
      description: >-
        Fired when an existing wallet transaction is updated (e.g. pending to
        completed). Doc-only for parsing.
      responses:
        '200':
          description: Webhook payload
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/webhookDto.TransactionUpdatedWebhookPayload
      x-codeSamples:
        - lang: go
          label: Go
          source: "package main\n\nimport(\n\t\"context\"\n\ttirdad \"github.com/tirdad-billing/go-sdk/v2\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := tirdad.New(\n        tirdad.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n    )\n\n    res, err := s.WebhookEvents.PostWebhookEventsWalletTransactionUpdated(ctx)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.WebhookDtoTransactionUpdatedWebhookPayload != nil {\n        // handle response\n    }\n}"
        - lang: python
          label: Python
          source: |-
            from tirdad_sdk import Tirdad


            with Tirdad(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as f_client:

                res = f_client.webhook_events.post_webhook_events_wallet_transaction_updated()

                # Handle response
                print(res)
        - lang: typescript
          label: TypeScript
          source: |-
            import { Tirdad } from "@tirdad/sdk";

            const tirdad = new Tirdad({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await tirdad.webhookEvents.postWebhookEventsWalletTransactionUpdated();

              console.log(result);
            }

            run();
components:
  schemas:
    webhookDto.TransactionUpdatedWebhookPayload:
      type: object
      properties:
        event_type:
          $ref: '#/components/schemas/types.WebhookEventName'
        updated_transaction:
          $ref: '#/components/schemas/webhookDto.WalletTransaction'
    types.WebhookEventName:
      type: string
      enum:
        - subscription.created
        - subscription.draft.created
        - subscription.activated
        - subscription.updated
        - subscription.paused
        - subscription.cancelled
        - subscription.resumed
        - subscription.plan_changed
        - subscription.phase.created
        - subscription.phase.updated
        - subscription.phase.deleted
        - feature.created
        - feature.updated
        - feature.deleted
        - feature.wallet_balance.alert
        - entitlement.created
        - entitlement.updated
        - entitlement.deleted
        - wallet.created
        - wallet.updated
        - wallet.terminated
        - wallet.transaction.created
        - wallet.transaction.updated
        - payment.created
        - payment.updated
        - payment.failed
        - payment.success
        - payment.pending
        - refund.created
        - refund.succeeded
        - refund.failed
        - customer.created
        - customer.updated
        - customer.deleted
        - invoice.update.finalized
        - invoice.update.payment
        - invoice.update.voided
        - invoice.update
        - invoice.payment.overdue
        - invoice.sync.success
        - invoice.sync.failed
        - wallet.credit_balance.dropped
        - wallet.credit_balance.recovered
        - wallet.ongoing_balance.dropped
        - wallet.ongoing_balance.recovered
        - wallet.ongoing_balance.updated
        - subscription.spend.threshold_reached
        - subscription.spend.threshold_recovered
        - subscription.line_item_spend.threshold_reached
        - subscription.line_item_spend.threshold_recovered
        - subscription.group_spend.threshold_reached
        - subscription.group_spend.threshold_recovered
        - entitlement.grant.exhausted
        - subscription.renewal.due
        - invoice.communication.triggered
        - credit_note.created
        - credit_note.updated
        - checkout.session.initiated
        - checkout.session.completed
        - checkout.session.failed
        - checkout.session.expired
        - event.rejected
      x-enum-varnames:
        - WebhookEventSubscriptionCreated
        - WebhookEventSubscriptionDraftCreated
        - WebhookEventSubscriptionActivated
        - WebhookEventSubscriptionUpdated
        - WebhookEventSubscriptionPaused
        - WebhookEventSubscriptionCancelled
        - WebhookEventSubscriptionResumed
        - WebhookEventSubscriptionPlanChanged
        - WebhookEventSubscriptionPhaseCreated
        - WebhookEventSubscriptionPhaseUpdated
        - WebhookEventSubscriptionPhaseDeleted
        - WebhookEventFeatureCreated
        - WebhookEventFeatureUpdated
        - WebhookEventFeatureDeleted
        - WebhookEventFeatureWalletBalanceAlert
        - WebhookEventEntitlementCreated
        - WebhookEventEntitlementUpdated
        - WebhookEventEntitlementDeleted
        - WebhookEventWalletCreated
        - WebhookEventWalletUpdated
        - WebhookEventWalletTerminated
        - WebhookEventWalletTransactionCreated
        - WebhookEventWalletTransactionUpdated
        - WebhookEventPaymentCreated
        - WebhookEventPaymentUpdated
        - WebhookEventPaymentFailed
        - WebhookEventPaymentSuccess
        - WebhookEventPaymentPending
        - WebhookEventRefundCreated
        - WebhookEventRefundSucceeded
        - WebhookEventRefundFailed
        - WebhookEventCustomerCreated
        - WebhookEventCustomerUpdated
        - WebhookEventCustomerDeleted
        - WebhookEventInvoiceUpdateFinalized
        - WebhookEventInvoiceUpdatePayment
        - WebhookEventInvoiceUpdateVoided
        - WebhookEventInvoiceUpdate
        - WebhookEventInvoicePaymentOverdue
        - WebhookEventInvoiceSyncSuccess
        - WebhookEventInvoiceSyncFailed
        - WebhookEventWalletCreditBalanceDropped
        - WebhookEventWalletCreditBalanceRecovered
        - WebhookEventWalletOngoingBalanceDropped
        - WebhookEventWalletOngoingBalanceRecovered
        - WebhookEventWalletOngoingBalanceUpdated
        - WebhookEventSubscriptionSpendThresholdReached
        - WebhookEventSubscriptionSpendThresholdRecovered
        - WebhookEventSubscriptionLineItemSpendThresholdReached
        - WebhookEventSubscriptionLineItemSpendThresholdRecovered
        - WebhookEventSubscriptionGroupSpendThresholdReached
        - WebhookEventSubscriptionGroupSpendThresholdRecovered
        - WebhookEventEntitlementGrantExhausted
        - WebhookEventSubscriptionRenewalDue
        - WebhookEventInvoiceCommunicationTriggered
        - WebhookEventCreditNoteCreated
        - WebhookEventCreditNoteUpdated
        - WebhookEventCheckoutSessionInitiated
        - WebhookEventCheckoutSessionCompleted
        - WebhookEventCheckoutSessionFailed
        - WebhookEventCheckoutSessionExpired
        - WebhookEventEventRejected
      x-speakeasy-name-override: WebhookEventName
    webhookDto.WalletTransaction:
      type: object
      properties:
        amount:
          type: string
        consumption_breakdown:
          type: array
          items:
            $ref: '#/components/schemas/types.WalletTxConsumption'
        credit_amount:
          type: string
        credit_balance_after:
          type: string
        credit_balance_before:
          type: string
        currency:
          type: string
        customer_id:
          type: string
        description:
          type: string
        expiry_date:
          type: string
          format: date-time
        id:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        reference_id:
          type: string
        reference_type:
          $ref: '#/components/schemas/types.WalletTxReferenceType'
        source_id:
          type: string
        source_type:
          $ref: '#/components/schemas/types.WalletTxSourceType'
        transaction_reason:
          $ref: '#/components/schemas/types.TransactionReason'
        transaction_status:
          $ref: '#/components/schemas/types.TransactionStatus'
        type:
          $ref: '#/components/schemas/types.TransactionType'
        wallet_id:
          type: string
    types.WalletTxConsumption:
      type: object
      properties:
        credit_transaction_id:
          type: string
        credits:
          type: string
      x-speakeasy-name-override: WalletTxConsumption
    types.Metadata:
      type: object
      additionalProperties:
        type: string
      x-speakeasy-name-override: Metadata
    types.WalletTxReferenceType:
      type: string
      enum:
        - PAYMENT
        - EXTERNAL
        - REQUEST
        - INVOICE
      x-enum-varnames:
        - WalletTxReferenceTypePayment
        - WalletTxReferenceTypeExternal
        - WalletTxReferenceTypeRequest
        - WalletTxReferenceTypeInvoice
      x-speakeasy-name-override: WalletTxReferenceType
    types.WalletTxSourceType:
      type: string
      enum:
        - INVOICE
      x-enum-varnames:
        - WalletTxSourceTypeInvoice
      x-speakeasy-name-override: WalletTxSourceType
    types.TransactionReason:
      type: string
      enum:
        - INVOICE_PAYMENT
        - FREE_CREDIT_GRANT
        - SUBSCRIPTION_CREDIT_GRANT
        - PURCHASED_CREDIT_INVOICED
        - PURCHASED_CREDIT_DIRECT
        - CREDIT_NOTE
        - CREDIT_EXPIRED
        - WALLET_TERMINATION
        - MANUAL_BALANCE_DEBIT
        - CREDIT_ADJUSTMENT
        - INVOICE_VOID_REFUND
        - PURCHASED_CREDIT_BONUS
      x-enum-varnames:
        - TransactionReasonInvoicePayment
        - TransactionReasonFreeCredit
        - TransactionReasonSubscriptionCredit
        - TransactionReasonPurchasedCreditInvoiced
        - TransactionReasonPurchasedCreditDirect
        - TransactionReasonCreditNote
        - TransactionReasonCreditExpired
        - TransactionReasonWalletTermination
        - TransactionReasonManualBalanceDebit
        - TransactionReasonCreditAdjustment
        - TransactionReasonInvoiceVoidRefund
        - TransactionReasonPurchasedCreditBonus
      x-speakeasy-name-override: TransactionReason
    types.TransactionStatus:
      type: string
      enum:
        - pending
        - completed
        - failed
      x-enum-varnames:
        - TransactionStatusPending
        - TransactionStatusCompleted
        - TransactionStatusFailed
      x-speakeasy-name-override: TransactionStatus
    types.TransactionType:
      type: string
      enum:
        - credit
        - debit
      x-enum-varnames:
        - TransactionTypeCredit
        - TransactionTypeDebit
      x-speakeasy-name-override: TransactionType

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.