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

# payment.success

> Fired when a payment succeeds. Doc-only for parsing.



## OpenAPI

````yaml /api-reference/openapi.json post /webhook-events/payment.success
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /webhook-events/payment.success:
    post:
      tags:
        - Webhook Events
      summary: payment.success
      description: Fired when a payment succeeds. Doc-only for parsing.
      responses:
        '200':
          description: Webhook payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhookDto.PaymentWebhookPayload'
components:
  schemas:
    webhookDto.PaymentWebhookPayload:
      type: object
      properties:
        event_type:
          $ref: '#/components/schemas/types.WebhookEventName'
        payment:
          $ref: '#/components/schemas/PaymentResponse'
    types.WebhookEventName:
      type: string
      enum:
        - subscription.created
        - subscription.draft.created
        - subscription.activated
        - subscription.updated
        - subscription.paused
        - subscription.cancelled
        - subscription.resumed
        - 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
        - payment.created
        - payment.updated
        - payment.failed
        - payment.success
        - payment.pending
        - customer.created
        - customer.updated
        - customer.deleted
        - invoice.update.finalized
        - invoice.update.payment
        - invoice.update.voided
        - invoice.update
        - invoice.payment.overdue
        - wallet.credit_balance.dropped
        - wallet.credit_balance.recovered
        - wallet.ongoing_balance.dropped
        - wallet.ongoing_balance.recovered
        - subscription.renewal.due
        - invoice.communication.triggered
        - credit_note.created
        - credit_note.updated
      x-enum-varnames:
        - WebhookEventSubscriptionCreated
        - WebhookEventSubscriptionDraftCreated
        - WebhookEventSubscriptionActivated
        - WebhookEventSubscriptionUpdated
        - WebhookEventSubscriptionPaused
        - WebhookEventSubscriptionCancelled
        - WebhookEventSubscriptionResumed
        - WebhookEventSubscriptionPhaseCreated
        - WebhookEventSubscriptionPhaseUpdated
        - WebhookEventSubscriptionPhaseDeleted
        - WebhookEventFeatureCreated
        - WebhookEventFeatureUpdated
        - WebhookEventFeatureDeleted
        - WebhookEventFeatureWalletBalanceAlert
        - WebhookEventEntitlementCreated
        - WebhookEventEntitlementUpdated
        - WebhookEventEntitlementDeleted
        - WebhookEventWalletCreated
        - WebhookEventWalletUpdated
        - WebhookEventWalletTerminated
        - WebhookEventWalletTransactionCreated
        - WebhookEventPaymentCreated
        - WebhookEventPaymentUpdated
        - WebhookEventPaymentFailed
        - WebhookEventPaymentSuccess
        - WebhookEventPaymentPending
        - WebhookEventCustomerCreated
        - WebhookEventCustomerUpdated
        - WebhookEventCustomerDeleted
        - WebhookEventInvoiceUpdateFinalized
        - WebhookEventInvoiceUpdatePayment
        - WebhookEventInvoiceUpdateVoided
        - WebhookEventInvoiceUpdate
        - WebhookEventInvoicePaymentOverdue
        - WebhookEventWalletCreditBalanceDropped
        - WebhookEventWalletCreditBalanceRecovered
        - WebhookEventWalletOngoingBalanceDropped
        - WebhookEventWalletOngoingBalanceRecovered
        - WebhookEventSubscriptionRenewalDue
        - WebhookEventInvoiceCommunicationTriggered
        - WebhookEventCreditNoteCreated
        - WebhookEventCreditNoteUpdated
      x-speakeasy-name-override: WebhookEventName
    PaymentResponse:
      type: object
      properties:
        amount:
          type: string
        attempts:
          type: array
          items:
            $ref: '#/components/schemas/PaymentAttemptResponse'
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        currency:
          type: string
        destination_id:
          type: string
        destination_type:
          $ref: '#/components/schemas/types.PaymentDestinationType'
        error_message:
          type: string
        failed_at:
          type: string
          format: date-time
        gateway_metadata:
          $ref: '#/components/schemas/types.Metadata'
        gateway_payment_id:
          type: string
        gateway_tracking_id:
          type: string
        id:
          type: string
        idempotency_key:
          type: string
        invoice_number:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        payment_gateway:
          type: string
        payment_method_id:
          type: string
        payment_method_type:
          $ref: '#/components/schemas/types.PaymentMethodType'
        payment_status:
          $ref: '#/components/schemas/types.PaymentStatus'
        payment_url:
          type: string
        refunded_at:
          type: string
          format: date-time
        save_card_and_make_default:
          type: boolean
        succeeded_at:
          type: string
          format: date-time
        tenant_id:
          type: string
        track_attempts:
          type: boolean
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    PaymentAttemptResponse:
      type: object
      properties:
        attempt_number:
          type: integer
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        error_message:
          type: string
        id:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        payment_id:
          type: string
        tenant_id:
          type: string
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
    types.PaymentDestinationType:
      type: string
      enum:
        - INVOICE
      x-enum-varnames:
        - PaymentDestinationTypeInvoice
      x-speakeasy-name-override: PaymentDestinationType
    types.Metadata:
      type: object
      additionalProperties:
        type: string
      x-speakeasy-name-override: Metadata
    types.PaymentMethodType:
      type: string
      enum:
        - CARD
        - ACH
        - OFFLINE
        - CREDITS
        - PAYMENT_LINK
      x-enum-varnames:
        - PaymentMethodTypeCard
        - PaymentMethodTypeACH
        - PaymentMethodTypeOffline
        - PaymentMethodTypeCredits
        - PaymentMethodTypePaymentLink
      x-speakeasy-name-override: PaymentMethodType
    types.PaymentStatus:
      type: string
      enum:
        - INITIATED
        - PENDING
        - PROCESSING
        - SUCCEEDED
        - OVERPAID
        - FAILED
        - REFUNDED
        - PARTIALLY_REFUNDED
      x-enum-varnames:
        - PaymentStatusInitiated
        - PaymentStatusPending
        - PaymentStatusProcessing
        - PaymentStatusSucceeded
        - PaymentStatusOverpaid
        - PaymentStatusFailed
        - PaymentStatusRefunded
        - PaymentStatusPartiallyRefunded
      x-speakeasy-name-override: PaymentStatus

````