Skip to main content

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.

Three Distinct Status Types

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​

StatusCodeDescriptionTerminal
Pending Paymentpending_paymentOrder created, awaiting paymentNo
PaidpaidOrder total amount equals amount paidNo
CanceledcanceledOrder was manually canceled*Yes
ClosedclosedNo 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 paid
  • canceled - When manually canceled
  • closed - When order is closed

Actions available:

  • Create payment link
  • Cancel order

Order has been fully paid (amount paid equals order amount).

Transitions to:

  • canceled - When manually canceled
  • closed - 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 links control access to the payment flow.

StatusCodeDescriptionTerminal
ActiveactiveLink is valid and can be usedNo
CompletedcompletedPayment completed via this linkYes
ExpiredexpiredLink has expiredQuasi*
CanceledcanceledLink was canceledYes

*expired can transition to completed if a payment settles during bank flow.

No Failed Status

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.

StatusCodeDescriptionTerminal
InitiatedinitiatedPayment request createdNo
Awaiting Authawaiting_authorizationRequires SCA (3DS)No
AuthorizedauthorizedBank authorizedNo
ProcessingprocessingInternal processingNo
Pending Settlementpending_settlementClearing stageNo
On Holdon_holdCompliance reviewNo
SettledsettledFunds transferredNo*
FailedfailedTechnical failureYes
RejectedrejectedBank refusedYes
CanceledcanceledCanceledYes
ExpiredexpiredTimeoutYes
RefundedrefundedReturned to payerYes
ChargebackchargebackDispute initiatedYes

*settled can transition to refunded or chargeback.

Webhook Events​

Webhooks are sent when statuses change:

EventDescription
order.paidOrder has been fully paid
order.pending_paymentOrder awaiting payment
payment_link.completedPayment link completed
payment_link.expiredPayment link expired
payment_link.canceledPayment 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
}