Skip to Content
ePay.lkDocs
Payments

Payment statuses

The payment lifecycle — every status, what moves a payment between them, and which webhooks are sent.

requires_paymentpayer starts attemptprocessingacquirer approvessucceededpartial refundpartially_refundedrest refundedrefunded
processingattempt declined (failure set, payment.failed)requires_payment— payer may retry until expiry
succeededfull refundrefunded
requires_payment | processingcanceled / timed outcanceledorexpired
processinglegacy form-POST only (one-shot)failed
Terminal states: succeeded (until refunded), refunded, failed, canceled, expired.
StatusMeaningFinal?Webhook when entered
requires_paymentCreated and waiting for the payer. Also the state after a declined attempt (failure is set).Nopayment.failed (after a declined attempt)
processingThe payer started an attempt; waiting for the acquirer's result.No—
succeededPaid. Funds are captured and will be settled to your balance.Yes¹payment.succeeded
partially_refundedSucceeded, and part of the amount has been refunded (amount_refunded < amount).Yes¹refund.succeeded
refundedThe full amount has been refunded.Yesrefund.succeeded
failedLegacy form-POST payments only: the single attempt was declined.Yespayment.failed
canceledCanceled by you (POST /v1/payments/:id/cancel) or by the payer on the checkout.Yespayment.canceled
expiredNot paid before expires_at.Yespayment.expired

¹ succeeded and partially_refunded can still move to partially_refunded / refunded through refunds.

Rules worth knowing

  • Declines are retryable. For API, payment-link and invoice payments a declined attempt returns the payment from processing to requires_payment with failure: { code, message } set, and emits payment.failed. The payer can try again until the payment expires — so payment.failed does not mean the order is lost. Only treat canceled and expired as final non-payment.
  • Legacy form-POST payments are one-shot. A declined attempt moves them to failed, matching the old gateway's behaviour.
  • Only requires_payment can be canceled via the API. A payment that's processing will resolve on its own.
  • Transitions are atomic. Each change is a guarded update (… WHERE status IN (…)), so a late acquirer callback can never "un-cancel" or double-succeed a payment, and each payment.succeeded is emitted exactly once per payment (deliveries may still be retried — see webhooks).
  • failure describes the most recent declined attempt. It's cleared when the payer starts a new attempt and when the payment succeeds. Typical codes: card_declined, insufficient_funds, expired_card, authentication_failed, processing_error, acquirer_timeout.

Fields that change with status

FieldSet when
payment_methodAn attempt is made: { type: "card" | "lankaqr", card_brand, card_last4 }
succeeded_atThe payment succeeds
fee, netThe payment succeeds (net = amount − fee)
amount_refundedRefunds succeed
settled_atThe funds are settled to your available balance

On this page