pub struct Transaction {Show 23 fields
pub id: TransactionID,
pub status: TransactionStatus,
pub customer_id: Option<CustomerID>,
pub address_id: Option<AddressID>,
pub business_id: Option<BusinessID>,
pub custom_data: Option<Value>,
pub currency_code: CurrencyCode,
pub origin: TransactionOrigin,
pub subscription_id: Option<SubscriptionID>,
pub invoice_id: Option<InvoiceId>,
pub invoice_number: Option<String>,
pub collection_mode: CollectionMode,
pub discount_id: Option<DiscountID>,
pub billing_details: Option<BillingDetails>,
pub billing_period: Option<TimePeriod>,
pub items: Vec<TransactionItem>,
pub details: TransactionDetails,
pub payments: Vec<TransactionPaymentAttempt>,
pub checkout: TransactionCheckout,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub billed_at: Option<DateTime<Utc>>,
pub revised_at: Option<DateTime<Utc>>,
}
Expand description
Represents a transaction entity.
Fields§
§id: TransactionID
Unique Paddle ID for this transaction entity, prefixed with txn_
.
status: TransactionStatus
Status of this transaction. You may set a transaction to billed
or canceled
, other statuses are set automatically by Paddle. Automatically-collected transactions may return completed
if payment is captured successfully, or past_due
if payment failed.
customer_id: Option<CustomerID>
Paddle ID of the customer that this transaction is for, prefixed with ctm_
.
address_id: Option<AddressID>
Paddle ID of the address that this transaction is for, prefixed with add_
.
business_id: Option<BusinessID>
Paddle ID of the business that this transaction is for, prefixed with biz_
.
custom_data: Option<Value>
Your own structured key-value data.
currency_code: CurrencyCode
Supported three-letter ISO 4217 currency code.
origin: TransactionOrigin
Describes how this transaction was created.
subscription_id: Option<SubscriptionID>
Paddle ID of the subscription that this transaction is for, prefixed with sub_
.
invoice_id: Option<InvoiceId>
Paddle ID of the invoice that this transaction is related to, prefixed with inv_
. Used for compatibility with the Paddle Invoice API, which is now deprecated. This field is scheduled to be removed in the next version of the Paddle API.
invoice_number: Option<String>
Invoice number for this transaction. Automatically generated by Paddle when you mark a transaction as billed
where collection_mode
is manual
.
collection_mode: CollectionMode
How payment is collected. automatic
for checkout, manual
for invoices.
discount_id: Option<DiscountID>
Paddle ID of the discount applied to this transaction, prefixed with dsc_
.
billing_details: Option<BillingDetails>
Details for invoicing. Required if collection_mode
is manual
.
billing_period: Option<TimePeriod>
Time period that this transaction is for. Set automatically by Paddle for subscription renewals to describe the period that charges are for.
items: Vec<TransactionItem>
List of items on this transaction. For calculated totals, use details.line_items
.
details: TransactionDetails
Calculated totals for a transaction, including proration, discounts, tax, and currency conversion. Considered the source of truth for totals on a transaction.
payments: Vec<TransactionPaymentAttempt>
List of payment attempts for this transaction, including successful payments. Sorted by created_at
in descending order, so most recent attempts are returned first.
checkout: TransactionCheckout
Paddle Checkout details for this transaction. Returned for automatically-collected transactions and where billing_details.enable_checkout
is true
for manually-collected transactions; null
otherwise.
created_at: DateTime<Utc>
RFC 3339 datetime string of when this entity was created. Set automatically by Paddle.
updated_at: DateTime<Utc>
RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle.
billed_at: Option<DateTime<Utc>>
RFC 3339 datetime string of when this transaction was marked as billed
. null
for transactions that aren’t billed
or completed
. Set automatically by Paddle.
revised_at: Option<DateTime<Utc>>
RFC 3339 datetime string of when a transaction was revised. Revisions describe an update to customer information for a billed or completed transaction. null
if not revised. Set automatically by Paddle.
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more