# Class TransactionData (1.32.0)

1.32.0 (latest) 1.29.0 1.28.2 1.27.0 1.26.1 1.25.0 1.24.1 1.23.0 1.22.0 1.21.2 1.20.0 1.19.1 1.18.1 1.17.1 1.16.1 1.15.0 1.14.0 1.13.0 1.12.1 1.11.1 1.10.0 1.9.0 1.8.3 1.7.1 1.6.1 1.5.0 1.4.1 1.3.1 1.2.0 1.1.2 1.0.0 0.4.2 0.3.3 0.2.1 0.1.0

    TransactionData(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Transaction data associated with a payment protected by
reCAPTCHA Enterprise.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `transaction_id` | `str` Unique identifier for the transaction. This custom identifier can be used to reference this transaction in the future, for example, labeling a refund or chargeback event. Two attempts at the same transaction should use the same transaction id. This field is a member of `oneof`_ `_transaction_id`. |
| `payment_method` | `str` Optional. The payment method for the transaction. The allowed values are: - credit-card - debit-card - gift-card - processor-{name} (If a third-party is used, for example, processor-paypal) - custom-{name} (If an alternative method is used, for example, custom-crypto) |
| `card_bin` | `str` Optional. The Bank Identification Number - generally the first 6 or 8 digits of the card. |
| `card_last_four` | `str` Optional. The last four digits of the card. |
| `currency_code` | `str` Optional. The currency code in ISO-4217 format. |
| `value` | `float` Optional. The decimal value of the transaction in the specified currency. |
| `shipping_value` | `float` Optional. The value of shipping in the specified currency. 0 for free or no shipping. |
| `shipping_address` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.TransactionData.Address` Optional. Destination address if this transaction involves shipping a physical item. |
| `billing_address` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.TransactionData.Address` Optional. Address associated with the payment method when applicable. |
| `user` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.TransactionData.User` Optional. Information about the user paying/initiating the transaction. |
| `merchants` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.TransactionData.User]` Optional. Information about the user or users fulfilling the transaction. |
| `items` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.TransactionData.Item]` Optional. Items purchased in this transaction. |
| `gateway_info` | `https://docs.cloud.google.com/python/docs/reference/recaptchaenterprise/latest/google.cloud.recaptchaenterprise_v1.types.TransactionData.GatewayInfo` Optional. Information about the payment gateway's response to the transaction. |

## Classes

### Address

    Address(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Structured address format for billing and shipping addresses.

### GatewayInfo

    GatewayInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Details about the transaction from the gateway.

### Item

    Item(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Line items being purchased in this transaction.

### User

    User(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Details about a user's account involved in the transaction.