Payment Statuses
Learn about all order, payment, and payment link statuses and their transitions.
This guide explains all possible statuses for orders, payment links, and payments in Paysera Checkout.
Paysera Checkout has three separate status types that track different entities:
- Order Status - Tracks the overall order state
- Payment Status - Tracks individual payment attempts
- Payment Link Status - Tracks payment link availability
Order Statuses​
Orders track the overall transaction state. An order can have multiple payment attempts.
Status Diagram​
Status Reference​
| Status | Code | Description | Terminal |
|---|---|---|---|
| Pending Payment | pending_payment | Order created, awaiting payment | No |
| Paid | paid | Order total amount equals amount paid | No |
| Canceled | canceled | Order was manually canceled* | Yes |
| Closed | closed | No further operations allowed* | Yes |
*canceled and closed are defined but not yet fully implemented.
Status Details​
pending_payment​
Initial state after order creation.
Transitions to:
paid- When total amount is paidcanceled- When manually canceledclosed- When order is closed
Actions available:
- Create payment link
- Cancel order
paid​
Order has been fully paid (amount paid equals order amount).
Transitions to:
canceled- When manually canceledclosed- When order is closed
Actions available:
- Process refund (if supported)
canceled​
Order was canceled.
Terminal state - no further actions.
closed​
Order is closed, no further operations allowed.
Terminal state - no further actions.
Payment Link Statuses​
Payment links control access to the payment flow.
| Status | Code | Description | Terminal |
|---|---|---|---|
| Active | active | Link is valid and can be used | No |
| Completed | completed | Payment completed via this link | Yes |
| Expired | expired | Link has expired | Quasi* |
| Canceled | canceled | Link was canceled | Yes |
*expired can transition to completed if a payment settles during bank flow.
Payment links do not have a failed status. If a payment attempt fails, the link remains active (unless expired or canceled), allowing retry.
Payment Statuses​
Payments track individual payment attempts through the bank/gateway flow.
| Status | Code | Description | Terminal |
|---|---|---|---|
| Initiated | initiated | Payment request created | No |
| Awaiting Auth | awaiting_authorization | Requires SCA (3DS) | No |
| Authorized | authorized | Bank authorized | No |
| Processing | processing | Internal processing | No |
| Pending Settlement | pending_settlement | Clearing stage | No |
| On Hold | on_hold | Compliance review | No |
| Settled | settled | Funds transferred | No* |
| Failed | failed | Technical failure | Yes |
| Rejected | rejected | Bank refused | Yes |
| Canceled | canceled | Canceled | Yes |
| Expired | expired | Timeout | Yes |
| Refunded | refunded | Returned to payer | Yes |
| Chargeback | chargeback | Dispute initiated | Yes |
*settled can transition to refunded or chargeback.
Webhook Events​
Webhooks are sent when statuses change:
| Event | Description |
|---|---|
order.paid | Order has been fully paid |
order.pending_payment | Order awaiting payment |
payment_link.completed | Payment link completed |
payment_link.expired | Payment link expired |
payment_link.canceled | Payment link canceled |
Handling Statuses in Code​
PHP Example​
<?php
class PaymentStatusHandler
{
public function handleWebhook(array $data): void
{
$orderStatus = $data['order']['status'];
$reference = $data['order']['reference'];
switch ($orderStatus) {
case 'paid':
$this->handlePaid($reference, $data);
break;
case 'pending_payment':
$this->handlePendingPayment($reference, $data);
break;
case 'canceled':
$this->handleCanceled($reference, $data);
break;
case 'closed':
$this->handleClosed($reference, $data);
break;
default:
$this->logUnhandledStatus($orderStatus, $reference);
}
}
private function handlePaid(string $reference, array $data): void
{
// Update order in database
$this->orderRepository->updateStatus($reference, 'paid');
// Send confirmation email
$this->mailer->sendOrderConfirmation($reference);
// Trigger fulfillment
$this->fulfillmentService->process($reference);
}
private function handlePendingPayment(string $reference, array $data): void
{
// Order is awaiting payment
$this->orderRepository->updateStatus($reference, 'awaiting_payment');
}
private function handleCanceled(string $reference, array $data): void
{
// Order was canceled
$this->orderRepository->updateStatus($reference, 'canceled');
}
private function handleClosed(string $reference, array $data): void
{
// Order was closed
$this->orderRepository->updateStatus($reference, 'closed');
}
}
JavaScript Example​
class PaymentStatusHandler {
async handleWebhook(data) {
const orderStatus = data.order.status;
const reference = data.order.reference;
const handlers = {
paid: () => this.handlePaid(reference, data),
pending_payment: () => this.handlePendingPayment(reference, data),
canceled: () => this.handleCanceled(reference, data),
closed: () => this.handleClosed(reference, data),
};
const handler = handlers[orderStatus];
if (handler) {
await handler();
} else {
console.warn(`Unhandled status: ${orderStatus}`);
}
}
async handlePaid(reference, data) {
await this.orderRepository.updateStatus(reference, 'paid');
await this.mailer.sendOrderConfirmation(reference);
await this.fulfillmentService.process(reference);
}
// ... other handlers
}
Status Querying​
You can query order status via API:
curl -X GET https://api.paysera.com/merchant-order/integration/v1/orders/ORDER_ID \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response:
{
"id": "a6f2b8e3-5e5f-47d9-b13f-87ed2db2938a",
"status": "paid",
"amount": 2500,
"currency": "EUR",
"amountPaid": 2500,
"balanceDue": 0,
"createdAt": 1736433270,
"updatedAt": 1736433570
}
Related Documentation​
- Payment Statuses Reference - Complete status tables
- Webhooks - Handle status change notifications
- Payment Flow - Understand the complete payment lifecycle