Class: ThePlaidApi::PaymentInitiationPaymentStatus
- Inherits:
-
Object
- Object
- ThePlaidApi::PaymentInitiationPaymentStatus
- Defined in:
- lib/the_plaid_api/models/payment_initiation_payment_status.rb
Overview
The status of the payment. Core lifecycle statuses: **‘PAYMENT_STATUS_INPUT_NEEDED`**: Transitional. The payment is awaiting user input to continue processing. It may re-enter this state if additional input is required. **`PAYMENT_STATUS_AUTHORISING`:** Transitional. The payment is being authorised by the financial institution. It will automatically move on once authorisation completes. **`PAYMENT_STATUS_INITIATED`:** The payment has been authorised and accepted by the financial institution. In many EU markets, `PAYMENT_STATUS_EXECUTED` is not supported, and a payment will remain in `PAYMENT_STATUS_INITIATED` until the funds settle, making this a terminal success state in those cases. A payment in `PAYMENT_STATUS_INITIATED` should be treated as a successfully submitted payment; do not gate downstream processing on reaching `PAYMENT_STATUS_EXECUTED`. For a full explanation of payment statuses and how to handle each, see the [Payment Status guide](plaid.com/docs/payment-initiation/payment-status/). **`PAYMENT_STATUS_EXECUTED`: Terminal.** The funds have left the payer’s account and the payment is en route to settlement. Note that this status does not confirm that funds have arrived in the recipient’s account; do not use it as proof of fund receipt. Support is more common in the UK than in the EU; where unsupported, a successful payment remains in `PAYMENT_STATUS_INITIATED` before settling. When using Plaid Virtual Accounts, `PAYMENT_STATUS_EXECUTED` is not terminal—the payment will continue to `PAYMENT_STATUS_SETTLED` once funds are available. **`PAYMENT_STATUS_SETTLED`: Terminal.** The funds are available in the recipient’s account. Only available to customers using [Plaid Virtual Accounts](plaid.com/docs/payment-initiation/virtual-accounts/). Failure statuses: **`PAYMENT_STATUS_INSUFFICIENT_FUNDS`: Terminal.** The payment failed due to insufficient funds. No further retries will succeed until the payer’s balance is replenished. **`PAYMENT_STATUS_FAILED`: Terminal (retryable).** The payment could not be initiated due to a system error or outage. Retry once the root cause is resolved. **`PAYMENT_STATUS_BLOCKED`: Terminal (retryable).** The payment was blocked by Plaid (e.g., flagged as risky). Resolve any compliance or risk issues and retry. **`PAYMENT_STATUS_REJECTED`: Terminal.** The payment was rejected by the financial institution. No automatic retry is possible. **`PAYMENT_STATUS_CANCELLED`: Terminal.** The end user cancelled the payment during authorisation. Standing-order statuses: **`PAYMENT_STATUS_ESTABLISHED`: Terminal.** A recurring/standing order has been successfully created. Deprecated (to be removed in a future release): `PAYMENT_STATUS_UNKNOWN`: The payment status is unknown. `PAYMENT_STATUS_PROCESSING`: The payment is currently being processed. `PAYMENT_STATUS_COMPLETED`: Indicates that the standing order has been successfully established.
Constant Summary collapse
- PAYMENT_INITIATION_PAYMENT_STATUS =
[ # TODO: Write general description for PAYMENT_STATUS_INPUT_NEEDED PAYMENT_STATUS_INPUT_NEEDED = 'PAYMENT_STATUS_INPUT_NEEDED'.freeze, # TODO: Write general description for PAYMENT_STATUS_PROCESSING PAYMENT_STATUS_PROCESSING = 'PAYMENT_STATUS_PROCESSING'.freeze, # TODO: Write general description for PAYMENT_STATUS_INITIATED PAYMENT_STATUS_INITIATED = 'PAYMENT_STATUS_INITIATED'.freeze, # TODO: Write general description for PAYMENT_STATUS_COMPLETED PAYMENT_STATUS_COMPLETED = 'PAYMENT_STATUS_COMPLETED'.freeze, # TODO: Write general description for PAYMENT_STATUS_INSUFFICIENT_FUNDS PAYMENT_STATUS_INSUFFICIENT_FUNDS = 'PAYMENT_STATUS_INSUFFICIENT_FUNDS'.freeze, # TODO: Write general description for PAYMENT_STATUS_FAILED PAYMENT_STATUS_FAILED = 'PAYMENT_STATUS_FAILED'.freeze, # TODO: Write general description for PAYMENT_STATUS_BLOCKED PAYMENT_STATUS_BLOCKED = 'PAYMENT_STATUS_BLOCKED'.freeze, # TODO: Write general description for PAYMENT_STATUS_UNKNOWN PAYMENT_STATUS_UNKNOWN = 'PAYMENT_STATUS_UNKNOWN'.freeze, # TODO: Write general description for PAYMENT_STATUS_EXECUTED PAYMENT_STATUS_EXECUTED = 'PAYMENT_STATUS_EXECUTED'.freeze, # TODO: Write general description for PAYMENT_STATUS_SETTLED PAYMENT_STATUS_SETTLED = 'PAYMENT_STATUS_SETTLED'.freeze, # TODO: Write general description for PAYMENT_STATUS_AUTHORISING PAYMENT_STATUS_AUTHORISING = 'PAYMENT_STATUS_AUTHORISING'.freeze, # TODO: Write general description for PAYMENT_STATUS_CANCELLED PAYMENT_STATUS_CANCELLED = 'PAYMENT_STATUS_CANCELLED'.freeze, # TODO: Write general description for PAYMENT_STATUS_ESTABLISHED PAYMENT_STATUS_ESTABLISHED = 'PAYMENT_STATUS_ESTABLISHED'.freeze, # TODO: Write general description for PAYMENT_STATUS_REJECTED PAYMENT_STATUS_REJECTED = 'PAYMENT_STATUS_REJECTED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = PAYMENT_STATUS_INPUT_NEEDED) ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_status.rb', line 101 def self.from_value(value, default_value = PAYMENT_STATUS_INPUT_NEEDED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'payment_status_input_needed' then PAYMENT_STATUS_INPUT_NEEDED when 'payment_status_processing' then PAYMENT_STATUS_PROCESSING when 'payment_status_initiated' then PAYMENT_STATUS_INITIATED when 'payment_status_completed' then PAYMENT_STATUS_COMPLETED when 'payment_status_insufficient_funds' then PAYMENT_STATUS_INSUFFICIENT_FUNDS when 'payment_status_failed' then PAYMENT_STATUS_FAILED when 'payment_status_blocked' then PAYMENT_STATUS_BLOCKED when 'payment_status_unknown' then PAYMENT_STATUS_UNKNOWN when 'payment_status_executed' then PAYMENT_STATUS_EXECUTED when 'payment_status_settled' then PAYMENT_STATUS_SETTLED when 'payment_status_authorising' then PAYMENT_STATUS_AUTHORISING when 'payment_status_cancelled' then PAYMENT_STATUS_CANCELLED when 'payment_status_established' then PAYMENT_STATUS_ESTABLISHED when 'payment_status_rejected' then PAYMENT_STATUS_REJECTED else default_value end end |
.validate(value) ⇒ Object
95 96 97 98 99 |
# File 'lib/the_plaid_api/models/payment_initiation_payment_status.rb', line 95 def self.validate(value) return false if value.nil? PAYMENT_INITIATION_PAYMENT_STATUS.include?(value) end |