PayFanout API reference
    Preparing search index...
    • Maps a Worldline payment onto the unified status, per Worldline's Statuses reference. The codes that name a refused operation are decided first, by code alone, whatever status string or category carries them: a refused cancellation (63) or capture (93) leaves the payment authorised, so requires_capture; a refused deletion or refund (73/83) leaves it captured, so succeeded (refund state derives from amountRefunded). Next, a cancellation still awaiting the acquirer (CANCELLED 61/62) is processing and any other CANCELLED is canceled, never read as a failure; without a status string (the contract does not require one) codes 1/6 are canceled and 61/62 processing; a refund in flight (REFUND_REQUESTED) leaves the payment captured, so succeeded. After that the primary signal is statusOutput.statusCategory (Worldline's forward-compatible band — new statuses join an existing category), with statusCode and the status string as fallbacks; anything unrecognized is processing, never a fabricated terminal state.

      Parameters

      • status: string | undefined
      • statusCode: number | undefined
      • statusCategory: string | undefined

      Returns
          | "requires_payment_method"
          | "requires_confirmation"
          | "requires_action"
          | "requires_capture"
          | "processing"
          | "succeeded"
          | "canceled"
          | "failed"