---
title: tm.payment
slug: db/tmpayment
createdAt: 2023-12-14T14:12:33.922Z
---

A payment can either be an incoming payment when a customer pays for an order, or an outgoing payment when a refund is issued. A payment is always linked to an [order](docId:_jxcUBXabuuSuHKqCpEaN)

## Fields

| FIELD           | TYPE        | DESCRIPTION                                                                                                |
| --------------- | ----------- | ---------------------------------------------------------------------------------------------------------- |
| id              | `int`       | ID                                                                                                         |
| paidts          | `timestamp` | Timestamp of the actual payment                                                                            |
| orderid         | `int`       | Link to the order<br />**References:** [tm.order](docId:_jxcUBXabuuSuHKqCpEaN)                             |
| paymentmethodid | `int`       | Payment method used for this payment<br />**References:** [tm.paymentmethod](docId\:fUsfSBzbhWciVf-3Dujoz) |
| amount          | `decimal`   | Payment amount. Can be positive (incoming payment) or negative (outgoing payment)                          |
| userid          | `int`       | User that received the payment or performed the refund                                                     |
| vouchercodeid   | `int`       | The id of the vouchercode that is linked to this payment                                                   |
| properties      | `text`      | Properties of this payment, the contents of this column is dependent on PSP                                |
| subpayments     | `text`      | Sub-payments of this payment, if applicable                                                                |

