Skip to main content
Every payment in Pandabase follows a defined lifecycle from creation to completion. Understanding this lifecycle helps you build reliable integrations and handle edge cases.

Overview

Transaction statuses

StatusDescription
PENDINGPayment intent created, awaiting customer action
SUCCESSPayment confirmed by the provider
PAIDFunds have been captured
NOT_PAIDPayment expired, was declined, or failed
REFUNDEDPayment was refunded to the customer
CHARGEBACKCustomer filed a dispute with their bank

Order statuses

StatusDescription
PENDINGOrder created, awaiting payment
PROCESSINGPayment received, order is being processed
COMPLETEDOrder fulfilled
CANCELLEDOrder was cancelled
FAILEDPayment failed
REFUNDEDOrder was refunded
CHARGEBACKA dispute was opened on this order

Lifecycle flow

1. Payment initiated

When a customer proceeds to pay, an order and transaction are created with PENDING status. A payment.pending webhook event is fired.
{
  "object": "payment",
  "event": {
    "type": "payment.pending",
    "id": "ord_abc123",
    "data": {
      "order": { "status": "PENDING", ... },
      "transaction": { "status": "PENDING", ... },
      "customer": { "email": "[email protected]" }
    }
  }
}

2. Payment succeeds

Once the payment provider confirms the payment, the transaction moves to SUCCESS and then PAID. The order status moves to PROCESSING. Two webhook events are fired in sequence:
  • payment.success — includes order (with custom_fields if defined) and transaction
  • payment.paid — includes transaction
payment.success is the primary event to listen for when fulfilling orders. It fires when the payment is confirmed and includes the full order data.

3. Payment fails

If the payment is declined, expires, or the customer abandons checkout, the transaction moves to NOT_PAID. A payment.not_paid webhook event is fired with order and transaction data.

4. Refund

When a merchant issues a refund, the transaction status changes to REFUNDED and the order status changes to REFUNDED. A payment.refunded webhook event is fired with transaction data.

5. Dispute

If a customer opens a chargeback with their bank, the transaction status changes to CHARGEBACK and the order status changes to CHARGEBACK. A payment.disputed webhook event is fired with transaction data.

Webhook events by lifecycle stage

StageEventData included
Payment initiatedpayment.pendingorder, transaction, customer
Payment confirmedpayment.successorder, transaction
Funds capturedpayment.paidtransaction
Payment failedpayment.not_paidorder, transaction
Refund issuedpayment.refundedtransaction
Dispute openedpayment.disputedtransaction