Payments

List payments, and refund, capture or reverse them.

A payment is one transaction with the gateway on an order: a charge, a refund, a hold on a card, or a declined attempt. Each has its own ID, so one order can have several payments.

Its transaction_type says what happened:

  • db (debit): money taken straight away.
  • pa (pre-authorisation): an amount held on the card, not yet taken.
  • cp (capture): money taken from a pre-authorisation.
  • rv (reversal): a pre-authorisation released, with nothing taken.
  • rf (refund): money returned to the customer.

What you can do next depends on the payment:

  • Refund a successful db or cp, in full or in part.
  • Capture a successful pa on an order created with pa_only: true. You can capture once, for the whole amount or part of it.
  • Reverse a pa with nothing captured, to release the whole hold.

Each refund, capture or reversal is a new payment. Its original_reference_id points back to the payment it came from. If the gateway declines one, it's still saved, with successful: false.