Skip to content
StraventaDocs
Guides

Payment lifecycle

The canonical state machine for a 505pay payment intent — from created to completed, refunded, expired, or failed

Every payment in 505pay is modelled as a payment intent. The intent is created by your server, presented to the payer, and moves through a well-defined set of states until it is terminal. Understanding the lifecycle is the foundation for building correct payment, refund, and reconciliation logic.

State diagram

State reference

StateMeaningTerminal?
createdIntent exists; no checkout page opened yetNo
pendingPayer is on the checkout page or has initiated the paymentNo
completedPSP has confirmed the payment; funds capturedNo (refund possible)
partially_refundedOne or more partial refunds issuedNo (more refunds possible)
refundedFull amount refundedYes
failedPSP rejected or an unrecoverable error occurredYes
expiredTTL elapsed before the payer completed paymentYes

Webhook events

Your server receives a webhook for each state transition. See Webhooks for signature verification and retry behaviour.

EventFired whenRecommended action
payment.createdIntent createdLog; start UI loading state
payment.pendingPayer initiates checkoutShow pending UI
payment.completedPSP confirms — funds capturedFulfil order; send receipt
payment.failedPSP rejectsPrompt payer to retry or use another method
payment.expiredTTL elapsedClose checkout UI; optionally re-create intent
payment.refundedFull refund processedUpdate order status; send refund confirmation

Do not fulfil on the API response alone

Always wait for the payment.completed webhook before fulfilling an order. The Payments API response confirms the intent was accepted, not that funds have settled. Webhooks carry the authoritative payment confirmation from the PSP.

Method-specific notes

MethodTTL (default)Refundable?Settlement
QRIS Dynamic15 minNoT+0
QRIS StaticN/A (reusable)NoT+0
Virtual Account24 hNoT+1
GoPay15 minYes (via 505pay dashboard)T+1
OVO5 minYesT+1
DANA15 minYesT+1
ShopeePay15 minYesT+1
Card 3DS15 minYesT+2

Was this page helpful?

On this page