import type * as Whop from "../index.js"; export interface PaymentStatus { /** The account receiving this payment, or `null` when the payment has no associated account. */ account: Whop.AccountSummary | null; /** When Whop will capture this authorization automatically, as an ISO 8601 timestamp. `null` when no automatic capture was requested. */ auto_capture_at: string | null; /** When the card authorization must be captured, as an ISO 8601 timestamp. `null` when this payment was not authorized for later capture. */ capture_expires_at: string | null; /** The payment this status describes, prefixed `pay_`. */ id: string; /** Details of the most recent failed attempt, or `null` when the payment has not failed. */ last_payment_error: Whop.PaymentLastPaymentError | null; /** What the buyer must do next while `status` is `requires_action`, otherwise `null`. `type` picks the shape and each variant carries only its own `data`, so switching on `type` gives you exactly that step's payload. The `collect_card_present` step is served only to a credential holding `payment:charge` on the account; any other reader sees `null` while the tap is outstanding. */ next_action: Whop.PaymentNextAction | null; /** Always `payment_status`. */ object: string; /** Present while `status` is `processing` on a settlement rail, otherwise `null`. A `processing` status without it has not been decided yet — keep polling. */ processing_details: Whop.PaymentProcessingDetails | null; /** Where to send the buyer once the payment reaches a resting state, or `null` to leave them where they are. Editable until they return — see the return_url operation. */ return_url: string | null; /** How far the payment has got. `requires_confirmation` — nothing attempted yet, or the last attempt failed and can be retried. `requires_action` — the buyer has a step outstanding; see `next_action`. `requires_capture` — the card authorization is holding funds and must be captured. `confirming` — the buyer has done their part and the processor is deciding. `processing` — with `processing_details`, the money is moving; without them, the charge is still being decided and the status should be read again. `succeeded` — collected. `canceled` — voided or written off. */ status: PaymentStatus.Status; } export declare namespace PaymentStatus { /** How far the payment has got. `requires_confirmation` — nothing attempted yet, or the last attempt failed and can be retried. `requires_action` — the buyer has a step outstanding; see `next_action`. `requires_capture` — the card authorization is holding funds and must be captured. `confirming` — the buyer has done their part and the processor is deciding. `processing` — with `processing_details`, the money is moving; without them, the charge is still being decided and the status should be read again. `succeeded` — collected. `canceled` — voided or written off. */ const Status: { readonly RequiresConfirmation: "requires_confirmation"; readonly RequiresAction: "requires_action"; readonly RequiresCapture: "requires_capture"; readonly Confirming: "confirming"; readonly Processing: "processing"; readonly Succeeded: "succeeded"; readonly Canceled: "canceled"; }; type Status = (typeof Status)[keyof typeof Status]; }