# Transaction

### Content

<table><thead><tr><th width="231.6796875">Key</th><th width="154.80078125">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>int</td><td>Internal transaction ID</td></tr><tr><td>uuid</td><td>string</td><td><ul><li>Public transaction ID</li><li>8 - 40 characters long</li></ul></td></tr><tr><td>amount</td><td>int</td><td>The processed amount</td></tr><tr><td>referenceId</td><td>string</td><td>Custom reference</td></tr><tr><td>time</td><td>string</td><td>Date and time of the transaction creation in the ISO 8601 format (2025-10-01T09:36:07+00:00)</td></tr><tr><td>status</td><td>string</td><td><a href="https://docs.payrexx.com/developer/guides/webhook/transaction#status-values">Status Values</a></td></tr><tr><td>lang</td><td>string</td><td><a href="https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes">ISO 639-1 </a>of shopper language</td></tr><tr><td>psp</td><td>string</td><td><a href="https://docs.payrexx.com/developer/general-info/payment-provider">Payment provider Identifier</a> - column PSP</td></tr><tr><td>pspId</td><td>int</td><td><a href="https://docs.payrexx.com/developer/general-info/payment-provider">Payment provider Identifier</a> - column ID</td></tr><tr><td>mode</td><td>string</td><td>TEST or LIVE</td></tr><tr><td>type</td><td>string</td><td><ul><li>Shows which way the transaction was processed</li><li>One of <code>E-Commerce</code>, <code>POS-Terminal</code>, <code>Tap to Pay</code> </li></ul></td></tr><tr><td>posSerialNumber</td><td>string|null</td><td><p>Dependent on the value of <code>type</code> :</p><ul><li><code>POS-Terminal</code> : the serial number of the used POS device</li><li><code>E-Commerce</code>  or <code>Tap to Pay</code>: null</li></ul></td></tr><tr><td>posTerminalName</td><td>string|null</td><td><p>Dependent on the value of <code>type</code> :</p><ul><li><code>POS-Terminal</code> or  <code>Tap to Pay</code> : the name of the used POS device/Tap to Pay Terminal</li><li><code>E-Commerce</code> : null</li></ul></td></tr><tr><td>refundable</td><td>bool</td><td>States if a refund can be performed</td></tr><tr><td>partiallyRefundable</td><td>bool</td><td>States if a partial refund can be performed</td></tr><tr><td>instance</td><td>Instance</td><td><a data-mention href="../../general-info/objects/instance">instance</a></td></tr><tr><td>metadata</td><td>Metadata</td><td><a data-mention href="../../general-info/objects/metadata">metadata</a></td></tr><tr><td>invoice</td><td>Invoice</td><td><a data-mention href="../../general-info/objects/invoice">invoice</a></td></tr><tr><td>payment</td><td>Payment</td><td><a data-mention href="../../general-info/objects/payment">payment</a></td></tr><tr><td>contact</td><td>Contact|null</td><td><a data-mention href="../../general-info/objects/contact">contact</a></td></tr><tr><td>subscription</td><td>Subscription|null</td><td>See Subscription for further information</td></tr><tr><td>pageUuid</td><td>string|null</td><td><ul><li>UUID of the page if present</li><li>8 - 40 characters long</li></ul></td></tr><tr><td>payrexxFee</td><td>int</td><td><ul><li>Total fee amount</li><li>For platform merchants, the key is <code>fee</code></li></ul></td></tr><tr><td>preAuthorizationId</td><td>int</td><td><ul><li>If the transaction is a tokenization, its ID is returned</li><li>If the transaction is a charge of a tokenization, the ID of the tokenization (source) is returned</li><li>Otherwise, the field is not added to the webhook</li></ul></td></tr><tr><td>originalTransactionId</td><td>int</td><td><ul><li>Present if this transaction is status <code>refunded</code> or <code>partially-refunded</code> </li><li>ID of the charged transaction</li></ul></td></tr><tr><td>originalTransactionUuid</td><td>int</td><td><ul><li>Present if this transaction is status <code>refunded</code> or <code>partially-refunded</code></li><li>UUID of the charged transaction</li><li>8 - 40 characters long</li></ul></td></tr><tr><td>associatedSourceTransactionUuids</td><td>array</td><td><ul><li>Only for merchants of marketplaces</li><li>UUIDs of all associated source transactions</li></ul></td></tr><tr><td>associatedSourceTransactionIds</td><td>array</td><td><ul><li>Only for merchants of marketplaces</li><li>IDs of all associated source transactions</li></ul></td></tr><tr><td>sourceTransactionUuid</td><td>string|null</td><td><ul><li>Only for merchants of marketplaces</li><li>UUID of the source transaction, <code>null</code> if there is none</li></ul></td></tr><tr><td>sourceTransactionId</td><td>string|null</td><td><ul><li>Only for merchants of marketplaces</li><li>ID of the source transaction, <code>null</code> if there is none</li></ul></td></tr><tr><td>payoutUuid</td><td>string|null</td><td>Returns the UUID of the payout if the transaction is part of a payout. Otherwise, null is returned.</td></tr></tbody></table>

### Changelog

<details>

<summary>2025-04-29</summary>

The field `time` is now formatted in the ISO 8601 format. Example: 2025-10-01T09:36:07+00:00 - previously 2025-10-01 09:36:07.

An update to the [payment](https://docs.payrexx.com/developer/general-info/objects/payment) object.

</details>

<details>

<summary>2025-04-08</summary>

An update to the [payment](https://docs.payrexx.com/developer/general-info/objects/payment) object.

</details>

<details>

<summary>2025-03-03</summary>

There are new fields regarding POS devices.

`type` of type string

* Shows which way the transaction was processed
* One of `E-Commerce`, `POS-Terminal`, `Tap to Pay`&#x20;

posSerialNumber of type string

* `null` if `type` is `E-Commerce`&#x20;
* else, the number of the used POS device

posTerminalName of type string

* `null` if `type` is `E-Commerce`&#x20;
* else, the name of the used POS device

</details>

<details>

<summary>2024-11-12</summary>

An update to the [payment](https://docs.payrexx.com/developer/general-info/objects/payment) object.

</details>

<details>

<summary>2024-08-16</summary>

There is a new field `instance` of type object that contains information about the merchant, which contains two fields.

`name` of type string

* Name of the account

`uuid` of type string

* 8-character-long identifier

</details>

<details>

<summary>2024-06-01</summary>

An update to the [payment](https://docs.payrexx.com/developer/general-info/objects/payment) object.

</details>

<details>

<summary>2023-10-20</summary>

There is a new field `payoutUuid` that returns the UUID of the payout if the transaction is part of one. If the transaction is not yet part of a payout, `null` is returned

</details>

<details>

<summary>2022-11-29</summary>

An update to the [payment](https://docs.payrexx.com/developer/general-info/objects/payment) object.

</details>

<details>

<summary>2022-10-04</summary>

The charged fees are also returned to merchants of the platforms. For them, the key is adjusted from `payrexxFee` to `fee`.

There are two new fields regarding refunding a transaction.

`refundable` of type bool

* States if a refund can be performed

`partiallyRefundable` of type bool

* States if a partial refund can be performed

</details>

<details>

<summary>2022-01-18</summary>

The field `payrexx_fee` is renamed to `payrexxFee`.

</details>

<details>

<summary>2021-10-12</summary>

The field `metadata` is now returned as an object.

</details>

<details>

<summary>2020-06-10</summary>

There is a new field `amount` of type int.

</details>

<details>

<summary>2019-12-19</summary>

Webhooks are now sent for transactions with status `refund-pending`.

There is an adjustment to the field `status`. Transactions of status `uncaptured` are no longer treated as `confirmed`, but returned as they are.

</details>

<details>

<summary>2019-10-15</summary>

There is a new field `preAuthorizationId` of type int. If the transaction is a tokenization, its ID is returned. If the transaction is a charge of a tokenization, the ID of the tokenization (source) is returned. Otherwise, the field is not added to the webhook.

</details>

<details>

<summary>2019-02-13</summary>

There are adjustments to the field `status`. The exceptional handling of the statuses `chargeback`, `error` and `partially-refunded` is removed. They are returned as they are.

</details>

<details>

<summary>2018-08-07</summary>

The first version. Webhooks are not sent for transactions with status `refund-pending`.

</details>

### Status Values

<table><thead><tr><th width="243.73828125">Status</th><th>Description</th></tr></thead><tbody><tr><td>waiting</td><td>Order has been placed</td></tr><tr><td>confirmed</td><td>Successful payment</td></tr><tr><td>cancelled</td><td>Payment aborted by the customer</td></tr><tr><td>declined</td><td>Failed 3D secure or declined by the issuer bank</td></tr><tr><td>authorized</td><td>Successful tokenization</td></tr><tr><td>reserved</td><td>Successful reservation</td></tr><tr><td>refunded</td><td>Full refund</td></tr><tr><td>partially-refunded</td><td>Partial refund</td></tr><tr><td>refund_pending</td><td>Refund is being processed</td></tr><tr><td>chargeback</td><td>Cardholder returns money</td></tr><tr><td>error</td><td>An issue occurred during the payment process</td></tr><tr><td>disputed</td><td>A dispute has been opened for this transaction</td></tr><tr><td>expired</td><td>Payment aborted due to inactivity</td></tr></tbody></table>

### Example

```json
{
  "transaction": {
    "id": 1234,
    "psp": "Native_PSP",
    "lang": "de",
    "mode": "TEST",
    "time": "2025-10-06 02:34:21",
    "type": "E-Commerce",
    "uuid": "1122aabb",
    "pspId": 44,
    "amount": 1000,
    "status": "confirmed",
    "contact": {
      "id": 1234,
      "uuid": "aabb1122",
      "title": "female",
      "firstname": "Jane",
      "lastname": "Doe",
      "company": "Payrexx",
      "street": "Burgstrasse 20",
      "zip": "3600",
      "place": "Thun",
      "country": "Switzerland",
      "countryISO": "CH",
      "phone": "0335500010",
      "email": "subscription@test.com",
      "date_of_birth": "01.01.1970",
      "delivery_title": "",
      "delivery_firstname": "",
      "delivery_lastname": "",
      "delivery_company": "",
      "delivery_street": "",
      "delivery_zip": "",
      "delivery_place": "",
      "delivery_country": "",
      "delivery_countryISO": ""
    },
    "invoice": {
      "test": 1,
      "number": "IV_123",
      "currency": "CHF",
      "discount": {
        "code": null,
        "amount": 0,
        "percentage": null
      },
      "products": [
        {
          "sku": null,
          "name": "Product 1",
          "price": 1000,
          "vatRate": "8.1",
          "quantity": 1,
          "description": "sample-email@mail.com"
        }
      ],
      "paymentLink": null,
      "referenceId": "Custom API Reference",
      "custom_fields": [
        {
          "name": "E-Mail",
          "type": "email",
          "value": "sample-email@mail.com"
        }
      ],
      "originalAmount": 1000,
      "refundedAmount": 0,
      "shippingAmount": null,
      "paymentRequestId": null,
      "googleAnalyticProducts": [
        {
          "price": 10,
          "item_id": 112233,
          "quantity": 1,
          "item_name": "Product 1"
        }
      ]
    },
    "payment": {
      "brand": "visa",
      "wallet": null,
      "purchaseOnInvoiceInformation": null
    },
    "instance": {
      "name": "demo",
      "uuid": "aabb1122"
    },
    "metadata": {},
    "pageUuid": "aabb1122",
    "payoutUuid": null,
    "payrexxFee": 0,
    "refundable": true,
    "referenceId": "Custom API Reference",
    "subscription": {
      "id": 1234,
      "end": null,
      "uuid": "aabb1122",
      "start": "2026-01-01",
      "status": "active",
      "valid_until": "2026-12-31",
      "paymentInterval": "P1M"
    },
    "posSerialNumber": "",
    "posTerminalName": "",
    "partiallyRefundable": true
  }
}
```
