Skip to content

Transaction Status

Understand the lifecycle of a transaction.

Status Description
pending Charge initiated, awaiting customer action
processing Customer authorized, transaction being processed
succeeded Payment completed successfully
failed Payment failed (see failure_reason)
declined Customer declined or cancelled the payment
expired Charge expired before completion
refunded Charge was fully refunded
partially_refunded Charge was partially refunded
pending → processing → succeeded
↓ ↓
failed declined
expired

For server-side integrations, poll the charge endpoint until a terminal state is reached:

async function waitForCompletion(chargeId) {
while (true) {
const charge = await malipo.charges.retrieve(chargeId);
if (["succeeded", "failed", "declined", "expired"].includes(charge.status)) {
return charge;
}
await new Promise(r => setTimeout(r, 2000)); // 2s delay
}
}