Documentation ¶
Index ¶
- type AddressCreated
- type AddressImported
- type AddressNotification
- type AddressUpdated
- type AdjustmentAction
- type AdjustmentCreated
- type AdjustmentItem
- type AdjustmentItemTotals
- type AdjustmentNotification
- type AdjustmentStatus
- type AdjustmentTaxRateUsed
- type AdjustmentTaxRateUsedTotals
- type AdjustmentTotals
- type AdjustmentType
- type AdjustmentUpdated
- type BillingDetails
- type BusinessCreated
- type BusinessImported
- type BusinessNotification
- type BusinessUpdated
- type Card
- type CardType
- type CatalogType
- type ChargebackFee
- type Checkout
- type CollectionMode
- type Contacts
- type CountryCode
- type CurrencyCode
- type CurrencyCodeChargebacks
- type CurrencyCodePayouts
- type CustomData
- type CustomerCreated
- type CustomerImported
- type CustomerNotification
- type CustomerUpdated
- type DiscountCreated
- type DiscountImported
- type DiscountNotification
- type DiscountStatus
- type DiscountUpdated
- type Duration
- type ErrorCode
- type EventTypeName
- type GenericNotificationEvent
- type ImportMeta
- type Interval
- type MethodDetails
- type Money
- type NotificationEvent
- type Original
- type PaymentAttemptStatus
- type PaymentMethodType
- type PayoutCreated
- type PayoutNotification
- type PayoutPaid
- type PayoutTotalsAdjustment
- type Price
- type PriceCreated
- type PriceImported
- type PriceNotification
- type PriceQuantity
- type PriceUpdated
- type Product
- type ProductCreated
- type ProductImported
- type ProductNotification
- type ProductUpdated
- type Proration
- type ReportCreated
- type ReportFilters
- type ReportFiltersName
- type ReportFiltersOperator
- type ReportNotification
- type ReportStatus
- type ReportType
- type ReportUpdated
- type ScheduledChangeAction
- type Status
- type SubscriptionActivated
- type SubscriptionCanceled
- type SubscriptionCreated
- type SubscriptionCreatedNotification
- type SubscriptionDiscountTimePeriod
- type SubscriptionImported
- type SubscriptionItem
- type SubscriptionItemStatus
- type SubscriptionNotification
- type SubscriptionPastDue
- type SubscriptionPaused
- type SubscriptionResumed
- type SubscriptionScheduledChange
- type SubscriptionStatus
- type SubscriptionTrialing
- type SubscriptionUpdated
- type TaxCategory
- type TaxMode
- type TaxRatesUsed
- type TimePeriod
- type Totals
- type TransactionBilled
- type TransactionCanceled
- type TransactionCompleted
- type TransactionCreated
- type TransactionDetails
- type TransactionItem
- type TransactionLineItem
- type TransactionNotification
- type TransactionOrigin
- type TransactionPaid
- type TransactionPastDue
- type TransactionPaymentAttempt
- type TransactionPaymentFailed
- type TransactionPayoutTotals
- type TransactionPayoutTotalsAdjusted
- type TransactionReady
- type TransactionStatus
- type TransactionTotals
- type TransactionTotalsAdjusted
- type TransactionUpdated
- type Type
- type UnitPriceOverride
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressCreated ¶
type AddressCreated struct { GenericNotificationEvent Data AddressNotification `json:"data"` }
AddressCreated represents the address.created event. See https://developer.paddle.com/webhooks/overview for more information.
type AddressImported ¶
type AddressImported struct { GenericNotificationEvent Data AddressNotification `json:"data"` }
AddressImported represents the address.imported event. See https://developer.paddle.com/webhooks/overview for more information.
type AddressNotification ¶
type AddressNotification struct { // ID: Unique Paddle ID for this address entity, prefixed with `add_`. ID string `json:"id,omitempty"` // CustomerID: Paddle ID for the customer related to this address, prefixed with `cus_`. CustomerID string `json:"customer_id,omitempty"` // Description: Memorable description for this address. Description *string `json:"description,omitempty"` // FirstLine: First line of this address. FirstLine *string `json:"first_line,omitempty"` // SecondLine: Second line of this address. SecondLine *string `json:"second_line,omitempty"` // City: City of this address. City *string `json:"city,omitempty"` // PostalCode: ZIP or postal code of this address. Required for some countries. PostalCode *string `json:"postal_code,omitempty"` // Region: State, county, or region of this address. Region *string `json:"region,omitempty"` // CountryCode: Supported two-letter ISO 3166-1 alpha-2 country code for this address. CountryCode CountryCode `json:"country_code,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // Status: Whether this entity can be used in Paddle. Status Status `json:"status,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` }
AddressNotification: New or changed entity.
type AddressUpdated ¶
type AddressUpdated struct { GenericNotificationEvent Data AddressNotification `json:"data"` }
AddressUpdated represents the address.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type AdjustmentAction ¶ added in v0.5.0
type AdjustmentAction string
AdjustmentAction: How this adjustment impacts the related transaction..
const ( AdjustmentActionCredit AdjustmentAction = "credit" AdjustmentActionRefund AdjustmentAction = "refund" AdjustmentActionChargeback AdjustmentAction = "chargeback" AdjustmentActionChargebackReverse AdjustmentAction = "chargeback_reverse" AdjustmentActionChargebackWarning AdjustmentAction = "chargeback_warning" AdjustmentActionCreditReverse AdjustmentAction = "credit_reverse" )
type AdjustmentCreated ¶
type AdjustmentCreated struct { GenericNotificationEvent Data AdjustmentNotification `json:"data"` }
AdjustmentCreated represents the adjustment.created event. See https://developer.paddle.com/webhooks/overview for more information.
type AdjustmentItem ¶
type AdjustmentItem struct { // ID: Unique Paddle ID for this adjustment item, prefixed with `adjitm_`. ID string `json:"id,omitempty"` // ItemID: Paddle ID for the transaction item that this adjustment item relates to, prefixed with `txnitm_`. ItemID string `json:"item_id,omitempty"` /* Type: Type of adjustment for this transaction item. `tax` adjustments are automatically created by Paddle. Include `amount` when creating a `partial` adjustment. */ Type AdjustmentType `json:"type,omitempty"` // Amount: Amount adjusted for this transaction item. Required when adjustment type is `partial`. Amount *string `json:"amount,omitempty"` // Proration: How proration was calculated for this adjustment item. Proration *Proration `json:"proration,omitempty"` // Totals: Breakdown of the total for an adjustment item. Totals AdjustmentItemTotals `json:"totals,omitempty"` }
AdjustmentItem: List of items on this adjustment.
type AdjustmentItemTotals ¶
type AdjustmentItemTotals struct { // Subtotal: Amount multiplied by quantity. Subtotal string `json:"subtotal,omitempty"` // Tax: Total tax on the subtotal. Tax string `json:"tax,omitempty"` // Total: Total after tax. Total string `json:"total,omitempty"` }
AdjustmentItemTotals: Breakdown of the total for an adjustment item.
type AdjustmentNotification ¶
type AdjustmentNotification struct { // ID: Unique Paddle ID for this adjustment entity, prefixed with `adj_`. ID string `json:"id,omitempty"` // Action: How this adjustment impacts the related transaction. Action AdjustmentAction `json:"action,omitempty"` // TransactionID: Paddle ID of the transaction that this adjustment is for, prefixed with `txn_`. TransactionID string `json:"transaction_id,omitempty"` /* SubscriptionID: Paddle ID for the subscription related to this adjustment, prefixed with `sub_`. Set automatically by Paddle based on the `subscription_id` of the related transaction. */ SubscriptionID *string `json:"subscription_id,omitempty"` /* CustomerID: Paddle ID for the customer related to this adjustment, prefixed with `ctm_`. Set automatically by Paddle based on the `customer_id` of the related transaction. */ CustomerID string `json:"customer_id,omitempty"` // Reason: Why this adjustment was created. Appears in the Paddle dashboard. Retained for record-keeping purposes. Reason string `json:"reason,omitempty"` /* CreditAppliedToBalance: Whether this adjustment was applied to the related customer's credit balance. Only returned for `credit` adjustments. `false` where the related transaction is `billed`. The adjustment reduces the amount due on the transaction. `true` where the related transaction is `completed`. The amount is added the customer's credit balance and used to pay future transactions. */ CreditAppliedToBalance *bool `json:"credit_applied_to_balance,omitempty"` // CurrencyCode: Three-letter ISO 4217 currency code for this adjustment. Set automatically by Paddle based on the `currency_code` of the related transaction. CurrencyCode CurrencyCode `json:"currency_code,omitempty"` /* Status: Status of this adjustment. Set automatically by Paddle. Most refunds for live accounts are created with the status of `pending_approval` until reviewed by Paddle, but some are automatically approved. For sandbox accounts, Paddle automatically approves refunds every ten minutes. Credit adjustments don't require approval from Paddle, so they're created as `approved`. */ Status AdjustmentStatus `json:"status,omitempty"` // Items: List of items on this adjustment. Items []AdjustmentItem `json:"items,omitempty"` // Totals: Breakdown of the total for an adjustment. Totals AdjustmentTotals `json:"totals,omitempty"` // PayoutTotals: Breakdown of how this adjustment affects your payout balance. PayoutTotals *PayoutTotalsAdjustment `json:"payout_totals,omitempty"` // TaxRatesUsed: List of tax rates applied for this adjustment. TaxRatesUsed []AdjustmentTaxRateUsed `json:"tax_rates_used,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` }
AdjustmentNotification: New or changed entity.
type AdjustmentStatus ¶
type AdjustmentStatus string
AdjustmentStatus: Status of this adjustment. Set automatically by Paddle.
Most refunds for live accounts are created with the status of `pending_approval` until reviewed by Paddle, but some are automatically approved. For sandbox accounts, Paddle automatically approves refunds every ten minutes.
Credit adjustments don't require approval from Paddle, so they're created as `approved`..
const ( AdjustmentStatusPendingApproval AdjustmentStatus = "pending_approval" AdjustmentStatusApproved AdjustmentStatus = "approved" AdjustmentStatusRejected AdjustmentStatus = "rejected" AdjustmentStatusReversed AdjustmentStatus = "reversed" )
type AdjustmentTaxRateUsed ¶ added in v0.5.0
type AdjustmentTaxRateUsed struct { // TaxRate: Rate used to calculate tax for this adjustment. TaxRate string `json:"tax_rate,omitempty"` // Totals: Calculated totals for the tax applied to this adjustment. Totals AdjustmentTaxRateUsedTotals `json:"totals,omitempty"` }
AdjustmentTaxRateUsed: List of tax rates applied for this adjustment.
type AdjustmentTaxRateUsedTotals ¶ added in v0.5.0
type AdjustmentTaxRateUsedTotals struct { // Subtotal: Total before tax. For tax adjustments, the value is 0. Subtotal string `json:"subtotal,omitempty"` // Tax: Total tax on the subtotal. Tax string `json:"tax,omitempty"` // Total: Total after tax. Total string `json:"total,omitempty"` }
AdjustmentTaxRateUsedTotals: Calculated totals for the tax applied to this adjustment.
type AdjustmentTotals ¶
type AdjustmentTotals struct { // Subtotal: Total before tax. For tax adjustments, the value is 0. Subtotal string `json:"subtotal,omitempty"` // Tax: Total tax on the subtotal. Tax string `json:"tax,omitempty"` // Total: Total after tax. Total string `json:"total,omitempty"` // Fee: Total fee taken by Paddle for this adjustment. Fee string `json:"fee,omitempty"` /* Earnings: Total earnings. This is the subtotal minus the Paddle fee. For tax adjustments, this value is negative, which means a positive effect in the transaction earnings. This is because the fee is originally calculated from the transaction total, so if a tax adjustment is made, then the fee portion of it is returned. */ Earnings string `json:"earnings,omitempty"` // CurrencyCode: Three-letter ISO 4217 currency code used for this adjustment. CurrencyCode CurrencyCode `json:"currency_code,omitempty"` }
AdjustmentTotals: Breakdown of the total for an adjustment.
type AdjustmentType ¶
type AdjustmentType string
AdjustmentType: Type of adjustment for this transaction item. `tax` adjustments are automatically created by Paddle. Include `amount` when creating a `partial` adjustment..
const ( AdjustmentTypeFull AdjustmentType = "full" AdjustmentTypePartial AdjustmentType = "partial" AdjustmentTypeTax AdjustmentType = "tax" AdjustmentTypeProration AdjustmentType = "proration" )
type AdjustmentUpdated ¶
type AdjustmentUpdated struct { GenericNotificationEvent Data AdjustmentNotification `json:"data"` }
AdjustmentUpdated represents the adjustment.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type BillingDetails ¶
type BillingDetails struct { // EnableCheckout: Whether the related transaction may be paid using a Paddle Checkout. If omitted when creating a transaction, defaults to `false`. EnableCheckout bool `json:"enable_checkout,omitempty"` // PurchaseOrderNumber: Customer purchase order number. Appears on invoice documents. PurchaseOrderNumber string `json:"purchase_order_number,omitempty"` // AdditionalInformation: Notes or other information to include on this invoice. Appears on invoice documents. AdditionalInformation *string `json:"additional_information,omitempty"` // PaymentTerms: How long a customer has to pay this invoice once issued. PaymentTerms Duration `json:"payment_terms,omitempty"` }
BillingDetails: Details for invoicing. Required if `collection_mode` is `manual`.
type BusinessCreated ¶
type BusinessCreated struct { GenericNotificationEvent Data BusinessNotification `json:"data"` }
BusinessCreated represents the business.created event. See https://developer.paddle.com/webhooks/overview for more information.
type BusinessImported ¶
type BusinessImported struct { GenericNotificationEvent Data BusinessNotification `json:"data"` }
BusinessImported represents the business.imported event. See https://developer.paddle.com/webhooks/overview for more information.
type BusinessNotification ¶
type BusinessNotification struct { // ID: Unique Paddle ID for this business entity, prefixed with `biz_`. ID string `json:"id,omitempty"` // CustomerID: Paddle ID for the customer related to this business, prefixed with `cus_`. CustomerID string `json:"customer_id,omitempty"` // Name: Name of this business. Name string `json:"name,omitempty"` // CompanyNumber: Company number for this business. CompanyNumber *string `json:"company_number,omitempty"` // TaxIdentifier: Tax or VAT Number for this business. TaxIdentifier *string `json:"tax_identifier,omitempty"` // Status: Whether this entity can be used in Paddle. Status Status `json:"status,omitempty"` // Contacts: List of contacts related to this business, typically used for sending invoices. Contacts []Contacts `json:"contacts,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` }
BusinessNotification: New or changed entity.
type BusinessUpdated ¶
type BusinessUpdated struct { GenericNotificationEvent Data BusinessNotification `json:"data"` }
BusinessUpdated represents the business.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type Card ¶
type Card struct { // Type: Type of credit or debit card used to pay. Type CardType `json:"type,omitempty"` // Last4: Last four digits of the card used to pay. Last4 string `json:"last4,omitempty"` // ExpiryMonth: Month of the expiry date of the card used to pay. ExpiryMonth int `json:"expiry_month,omitempty"` // ExpiryYear: Year of the expiry date of the card used to pay. ExpiryYear int `json:"expiry_year,omitempty"` // CardholderName: The name on the card used to pay. CardholderName string `json:"cardholder_name,omitempty"` }
Card: Information about the credit or debit card used to pay. `null` unless `type` is `card`.
type CardType ¶
type CardType string
CardType: Type of credit or debit card used to pay..
const ( CardTypeAmericanExpress CardType = "american_express" CardTypeDinersClub CardType = "diners_club" CardTypeDiscover CardType = "discover" CardTypeJcb CardType = "jcb" CardTypeMada CardType = "mada" CardTypeMaestro CardType = "maestro" CardTypeMastercard CardType = "mastercard" CardTypeUnionPay CardType = "union_pay" CardTypeUnknown CardType = "unknown" CardTypeVisa CardType = "visa" )
type CatalogType ¶
type CatalogType string
CatalogType: Type of item. Standard items are considered part of your catalog and are shown on the Paddle web app..
const ( CatalogTypeCustom CatalogType = "custom" CatalogTypeStandard CatalogType = "standard" )
type ChargebackFee ¶
type ChargebackFee struct { // Amount: Chargeback fee converted into the payout currency. Amount string `json:"amount,omitempty"` // Original: Chargeback fee before conversion to the payout currency. `null` when the chargeback fee is the same as the payout currency. Original *Original `json:"original,omitempty"` }
ChargebackFee: Chargeback fees incurred for this adjustment. Only returned when the adjustment `action` is `chargeback` or `chargeback_warning`.
type Checkout ¶
type Checkout struct { // URL: Paddle Checkout URL for this transaction, composed of the URL passed in the request or your default payment URL + `_?txn=` and the Paddle ID for this transaction. URL *string `json:"url,omitempty"` }
Checkout: 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.
type CollectionMode ¶
type CollectionMode string
CollectionMode: How payment is collected for transactions created for this subscription. `automatic` for checkout, `manual` for invoices..
const ( CollectionModeAutomatic CollectionMode = "automatic" CollectionModeManual CollectionMode = "manual" )
type Contacts ¶
type Contacts struct { // Name: Full name of this contact. Name string `json:"name,omitempty"` // Email: Email address for this contact. Email string `json:"email,omitempty"` }
Contacts: List of contacts related to this business, typically used for sending invoices.
type CountryCode ¶
type CountryCode string
CountryCode: Supported two-letter ISO 3166-1 alpha-2 country code for this address..
const ( CountryCodeAD CountryCode = "AD" CountryCodeAE CountryCode = "AE" CountryCodeAG CountryCode = "AG" CountryCodeAI CountryCode = "AI" CountryCodeAL CountryCode = "AL" CountryCodeAM CountryCode = "AM" CountryCodeAO CountryCode = "AO" CountryCodeAR CountryCode = "AR" CountryCodeAS CountryCode = "AS" CountryCodeAT CountryCode = "AT" CountryCodeAU CountryCode = "AU" CountryCodeAW CountryCode = "AW" CountryCodeAX CountryCode = "AX" CountryCodeAZ CountryCode = "AZ" CountryCodeBA CountryCode = "BA" CountryCodeBB CountryCode = "BB" CountryCodeBD CountryCode = "BD" CountryCodeBE CountryCode = "BE" CountryCodeBF CountryCode = "BF" CountryCodeBG CountryCode = "BG" CountryCodeBH CountryCode = "BH" CountryCodeBI CountryCode = "BI" CountryCodeBJ CountryCode = "BJ" CountryCodeBL CountryCode = "BL" CountryCodeBM CountryCode = "BM" CountryCodeBN CountryCode = "BN" CountryCodeBO CountryCode = "BO" CountryCodeBQ CountryCode = "BQ" CountryCodeBR CountryCode = "BR" CountryCodeBS CountryCode = "BS" CountryCodeBT CountryCode = "BT" CountryCodeBV CountryCode = "BV" CountryCodeBW CountryCode = "BW" CountryCodeBZ CountryCode = "BZ" CountryCodeCA CountryCode = "CA" CountryCodeCC CountryCode = "CC" CountryCodeCG CountryCode = "CG" CountryCodeCH CountryCode = "CH" CountryCodeCI CountryCode = "CI" CountryCodeCK CountryCode = "CK" CountryCodeCL CountryCode = "CL" CountryCodeCM CountryCode = "CM" CountryCodeCN CountryCode = "CN" CountryCodeCO CountryCode = "CO" CountryCodeCR CountryCode = "CR" CountryCodeCV CountryCode = "CV" CountryCodeCW CountryCode = "CW" CountryCodeCX CountryCode = "CX" CountryCodeCY CountryCode = "CY" CountryCodeCZ CountryCode = "CZ" CountryCodeDE CountryCode = "DE" CountryCodeDJ CountryCode = "DJ" CountryCodeDK CountryCode = "DK" CountryCodeDM CountryCode = "DM" CountryCodeDO CountryCode = "DO" CountryCodeDZ CountryCode = "DZ" CountryCodeEC CountryCode = "EC" CountryCodeEE CountryCode = "EE" CountryCodeEG CountryCode = "EG" CountryCodeEH CountryCode = "EH" CountryCodeER CountryCode = "ER" CountryCodeES CountryCode = "ES" CountryCodeET CountryCode = "ET" CountryCodeFI CountryCode = "FI" CountryCodeFJ CountryCode = "FJ" CountryCodeFK CountryCode = "FK" CountryCodeFM CountryCode = "FM" CountryCodeFO CountryCode = "FO" CountryCodeFR CountryCode = "FR" CountryCodeGA CountryCode = "GA" CountryCodeGB CountryCode = "GB" CountryCodeGD CountryCode = "GD" CountryCodeGE CountryCode = "GE" CountryCodeGF CountryCode = "GF" CountryCodeGG CountryCode = "GG" CountryCodeGH CountryCode = "GH" CountryCodeGI CountryCode = "GI" CountryCodeGL CountryCode = "GL" CountryCodeGM CountryCode = "GM" CountryCodeGN CountryCode = "GN" CountryCodeGP CountryCode = "GP" CountryCodeGQ CountryCode = "GQ" CountryCodeGR CountryCode = "GR" CountryCodeGS CountryCode = "GS" CountryCodeGT CountryCode = "GT" CountryCodeGU CountryCode = "GU" CountryCodeGW CountryCode = "GW" CountryCodeGY CountryCode = "GY" CountryCodeHK CountryCode = "HK" CountryCodeHM CountryCode = "HM" CountryCodeHN CountryCode = "HN" CountryCodeHR CountryCode = "HR" CountryCodeHU CountryCode = "HU" CountryCodeID CountryCode = "ID" CountryCodeIE CountryCode = "IE" CountryCodeIL CountryCode = "IL" CountryCodeIM CountryCode = "IM" CountryCodeIN CountryCode = "IN" CountryCodeIO CountryCode = "IO" CountryCodeIQ CountryCode = "IQ" CountryCodeIS CountryCode = "IS" CountryCodeIT CountryCode = "IT" CountryCodeJE CountryCode = "JE" CountryCodeJM CountryCode = "JM" CountryCodeJO CountryCode = "JO" CountryCodeJP CountryCode = "JP" CountryCodeKE CountryCode = "KE" CountryCodeKG CountryCode = "KG" CountryCodeKH CountryCode = "KH" CountryCodeKI CountryCode = "KI" CountryCodeKM CountryCode = "KM" CountryCodeKN CountryCode = "KN" CountryCodeKR CountryCode = "KR" CountryCodeKW CountryCode = "KW" CountryCodeKY CountryCode = "KY" CountryCodeKZ CountryCode = "KZ" CountryCodeLA CountryCode = "LA" CountryCodeLB CountryCode = "LB" CountryCodeLC CountryCode = "LC" CountryCodeLI CountryCode = "LI" CountryCodeLK CountryCode = "LK" CountryCodeLR CountryCode = "LR" CountryCodeLS CountryCode = "LS" CountryCodeLT CountryCode = "LT" CountryCodeLU CountryCode = "LU" CountryCodeLV CountryCode = "LV" CountryCodeMA CountryCode = "MA" CountryCodeMC CountryCode = "MC" CountryCodeMD CountryCode = "MD" CountryCodeME CountryCode = "ME" CountryCodeMF CountryCode = "MF" CountryCodeMG CountryCode = "MG" CountryCodeMH CountryCode = "MH" CountryCodeMK CountryCode = "MK" CountryCodeMN CountryCode = "MN" CountryCodeMO CountryCode = "MO" CountryCodeMP CountryCode = "MP" CountryCodeMQ CountryCode = "MQ" CountryCodeMR CountryCode = "MR" CountryCodeMS CountryCode = "MS" CountryCodeMT CountryCode = "MT" CountryCodeMU CountryCode = "MU" CountryCodeMV CountryCode = "MV" CountryCodeMW CountryCode = "MW" CountryCodeMX CountryCode = "MX" CountryCodeMY CountryCode = "MY" CountryCodeMZ CountryCode = "MZ" CountryCodeNA CountryCode = "NA" CountryCodeNC CountryCode = "NC" CountryCodeNE CountryCode = "NE" CountryCodeNF CountryCode = "NF" CountryCodeNG CountryCode = "NG" CountryCodeNL CountryCode = "NL" CountryCodeNO CountryCode = "NO" CountryCodeNP CountryCode = "NP" CountryCodeNR CountryCode = "NR" CountryCodeNU CountryCode = "NU" CountryCodeNZ CountryCode = "NZ" CountryCodeOM CountryCode = "OM" CountryCodePA CountryCode = "PA" CountryCodePE CountryCode = "PE" CountryCodePF CountryCode = "PF" CountryCodePG CountryCode = "PG" CountryCodePH CountryCode = "PH" CountryCodePK CountryCode = "PK" CountryCodePL CountryCode = "PL" CountryCodePM CountryCode = "PM" CountryCodePN CountryCode = "PN" CountryCodePR CountryCode = "PR" CountryCodePS CountryCode = "PS" CountryCodePT CountryCode = "PT" CountryCodePW CountryCode = "PW" CountryCodePY CountryCode = "PY" CountryCodeQA CountryCode = "QA" CountryCodeRE CountryCode = "RE" CountryCodeRO CountryCode = "RO" CountryCodeRS CountryCode = "RS" CountryCodeRW CountryCode = "RW" CountryCodeSA CountryCode = "SA" CountryCodeSB CountryCode = "SB" CountryCodeSC CountryCode = "SC" CountryCodeSE CountryCode = "SE" CountryCodeSG CountryCode = "SG" CountryCodeSH CountryCode = "SH" CountryCodeSI CountryCode = "SI" CountryCodeSJ CountryCode = "SJ" CountryCodeSK CountryCode = "SK" CountryCodeSL CountryCode = "SL" CountryCodeSM CountryCode = "SM" CountryCodeSN CountryCode = "SN" CountryCodeSR CountryCode = "SR" CountryCodeST CountryCode = "ST" CountryCodeSV CountryCode = "SV" CountryCodeSX CountryCode = "SX" CountryCodeSZ CountryCode = "SZ" CountryCodeTC CountryCode = "TC" CountryCodeTD CountryCode = "TD" CountryCodeTF CountryCode = "TF" CountryCodeTG CountryCode = "TG" CountryCodeTH CountryCode = "TH" CountryCodeTJ CountryCode = "TJ" CountryCodeTK CountryCode = "TK" CountryCodeTL CountryCode = "TL" CountryCodeTM CountryCode = "TM" CountryCodeTN CountryCode = "TN" CountryCodeTO CountryCode = "TO" CountryCodeTR CountryCode = "TR" CountryCodeTT CountryCode = "TT" CountryCodeTV CountryCode = "TV" CountryCodeTW CountryCode = "TW" CountryCodeTZ CountryCode = "TZ" CountryCodeUA CountryCode = "UA" CountryCodeUG CountryCode = "UG" CountryCodeUM CountryCode = "UM" CountryCodeUS CountryCode = "US" CountryCodeUY CountryCode = "UY" CountryCodeUZ CountryCode = "UZ" CountryCodeVA CountryCode = "VA" CountryCodeVC CountryCode = "VC" CountryCodeVG CountryCode = "VG" CountryCodeVI CountryCode = "VI" CountryCodeVN CountryCode = "VN" CountryCodeVU CountryCode = "VU" CountryCodeWF CountryCode = "WF" CountryCodeWS CountryCode = "WS" CountryCodeXK CountryCode = "XK" CountryCodeYT CountryCode = "YT" CountryCodeZA CountryCode = "ZA" CountryCodeZM CountryCode = "ZM" )
type CurrencyCode ¶
type CurrencyCode string
CurrencyCode: Three-letter ISO 4217 currency code for this adjustment. Set automatically by Paddle based on the `currency_code` of the related transaction..
const ( CurrencyCodeUSD CurrencyCode = "USD" CurrencyCodeEUR CurrencyCode = "EUR" CurrencyCodeGBP CurrencyCode = "GBP" CurrencyCodeJPY CurrencyCode = "JPY" CurrencyCodeAUD CurrencyCode = "AUD" CurrencyCodeCAD CurrencyCode = "CAD" CurrencyCodeCHF CurrencyCode = "CHF" CurrencyCodeHKD CurrencyCode = "HKD" CurrencyCodeSGD CurrencyCode = "SGD" CurrencyCodeSEK CurrencyCode = "SEK" CurrencyCodeARS CurrencyCode = "ARS" CurrencyCodeBRL CurrencyCode = "BRL" CurrencyCodeCNY CurrencyCode = "CNY" CurrencyCodeCOP CurrencyCode = "COP" CurrencyCodeCZK CurrencyCode = "CZK" CurrencyCodeDKK CurrencyCode = "DKK" CurrencyCodeHUF CurrencyCode = "HUF" CurrencyCodeILS CurrencyCode = "ILS" CurrencyCodeINR CurrencyCode = "INR" CurrencyCodeKRW CurrencyCode = "KRW" CurrencyCodeMXN CurrencyCode = "MXN" CurrencyCodeNOK CurrencyCode = "NOK" CurrencyCodeNZD CurrencyCode = "NZD" CurrencyCodePLN CurrencyCode = "PLN" CurrencyCodeRUB CurrencyCode = "RUB" CurrencyCodeTHB CurrencyCode = "THB" CurrencyCodeTRY CurrencyCode = "TRY" CurrencyCodeTWD CurrencyCode = "TWD" CurrencyCodeUAH CurrencyCode = "UAH" CurrencyCodeZAR CurrencyCode = "ZAR" )
type CurrencyCodeChargebacks ¶
type CurrencyCodeChargebacks string
CurrencyCodeChargebacks: Three-letter ISO 4217 currency code for the original chargeback fee..
const ( CurrencyCodeChargebacksAUD CurrencyCodeChargebacks = "AUD" CurrencyCodeChargebacksCAD CurrencyCodeChargebacks = "CAD" CurrencyCodeChargebacksEUR CurrencyCodeChargebacks = "EUR" CurrencyCodeChargebacksGBP CurrencyCodeChargebacks = "GBP" CurrencyCodeChargebacksUSD CurrencyCodeChargebacks = "USD" )
type CurrencyCodePayouts ¶
type CurrencyCodePayouts string
CurrencyCodePayouts: Three-letter ISO 4217 currency code used for the payout for this transaction. If your primary currency has changed, this reflects the primary currency at the time the transaction was billed..
const ( CurrencyCodePayoutsAUD CurrencyCodePayouts = "AUD" CurrencyCodePayoutsCAD CurrencyCodePayouts = "CAD" CurrencyCodePayoutsCHF CurrencyCodePayouts = "CHF" CurrencyCodePayoutsCNY CurrencyCodePayouts = "CNY" CurrencyCodePayoutsCZK CurrencyCodePayouts = "CZK" CurrencyCodePayoutsDKK CurrencyCodePayouts = "DKK" CurrencyCodePayoutsEUR CurrencyCodePayouts = "EUR" CurrencyCodePayoutsGBP CurrencyCodePayouts = "GBP" CurrencyCodePayoutsHUF CurrencyCodePayouts = "HUF" CurrencyCodePayoutsPLN CurrencyCodePayouts = "PLN" CurrencyCodePayoutsSEK CurrencyCodePayouts = "SEK" CurrencyCodePayoutsUSD CurrencyCodePayouts = "USD" CurrencyCodePayoutsZAR CurrencyCodePayouts = "ZAR" )
type CustomData ¶
type CustomerCreated ¶
type CustomerCreated struct { GenericNotificationEvent Data CustomerNotification `json:"data"` }
CustomerCreated represents the customer.created event. See https://developer.paddle.com/webhooks/overview for more information.
type CustomerImported ¶
type CustomerImported struct { GenericNotificationEvent Data CustomerNotification `json:"data"` }
CustomerImported represents the customer.imported event. See https://developer.paddle.com/webhooks/overview for more information.
type CustomerNotification ¶
type CustomerNotification struct { // ID: Unique Paddle ID for this customer entity, prefixed with `ctm_`. ID string `json:"id,omitempty"` // Name: Full name of this customer. Required when creating transactions where `collection_mode` is `manual` (invoices). Name *string `json:"name,omitempty"` // Email: Email address for this customer. Email string `json:"email,omitempty"` /* MarketingConsent: Whether this customer opted into marketing from you. `false` unless customers check the marketing consent box when using Paddle Checkout. Set automatically by Paddle. */ MarketingConsent bool `json:"marketing_consent,omitempty"` // Status: Whether this entity can be used in Paddle. Status Status `json:"status,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // Locale: Valid IETF BCP 47 short form locale tag. Locale string `json:"locale,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` }
CustomerNotification: New or changed entity.
type CustomerUpdated ¶
type CustomerUpdated struct { GenericNotificationEvent Data CustomerNotification `json:"data"` }
CustomerUpdated represents the customer.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type DiscountCreated ¶
type DiscountCreated struct { GenericNotificationEvent Data DiscountNotification `json:"data"` }
DiscountCreated represents the discount.created event. See https://developer.paddle.com/webhooks/overview for more information.
type DiscountImported ¶
type DiscountImported struct { GenericNotificationEvent Data DiscountNotification `json:"data"` }
DiscountImported represents the discount.imported event. See https://developer.paddle.com/webhooks/overview for more information.
type DiscountNotification ¶
type DiscountNotification struct { // ID: Unique Paddle ID for this discount, prefixed with `dsc_`. ID string `json:"id,omitempty"` // Status: Whether this entity can be used in Paddle. `expired` and `used` are set automatically by Paddle. Status DiscountStatus `json:"status,omitempty"` // Description: Short description for this discount for your reference. Not shown to customers. Description string `json:"description,omitempty"` // EnabledForCheckout: Whether this discount can be applied by customers at checkout. EnabledForCheckout bool `json:"enabled_for_checkout,omitempty"` // Code: Unique code that customers can use to apply this discount at checkout. Code *string `json:"code,omitempty"` // Type: Type of discount. Determines how this discount impacts the transaction total. Type Type `json:"type,omitempty"` // Amount: Amount to discount by. For `percentage` discounts, must be an amount between `0.01` and `100`. For `flat` and `flat_per_seat` discounts, amount in the lowest denomination for a currency. Amount string `json:"amount,omitempty"` // CurrencyCode: Supported three-letter ISO 4217 currency code. Required where discount type is `flat` or `flat_per_seat`. CurrencyCode *CurrencyCode `json:"currency_code,omitempty"` // Recur: Whether this discount applies for multiple subscription billing periods. Recur bool `json:"recur,omitempty"` // MaximumRecurringIntervals: Amount of subscription billing periods that this discount recurs for. Requires `recur`. `null` if this discount recurs forever. MaximumRecurringIntervals *int `json:"maximum_recurring_intervals,omitempty"` // UsageLimit: Maximum amount of times this discount can be used. This is an overall limit, rather than a per-customer limit. `null` if this discount can be used an unlimited amount of times. UsageLimit *int `json:"usage_limit,omitempty"` // RestrictTo: Product or price IDs that this discount is for. When including a product ID, all prices for that product can be discounted. `null` if this discount applies to all products and prices. RestrictTo []string `json:"restrict_to,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` // ExpiresAt: RFC 3339 datetime string of when this discount expires. Discount can no longer be applied after this date has elapsed. `null` if this discount can be applied forever. ExpiresAt *string `json:"expires_at,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` }
DiscountNotification: New or changed entity.
type DiscountStatus ¶
type DiscountStatus string
DiscountStatus: Whether this entity can be used in Paddle. `expired` and `used` are set automatically by Paddle..
const ( DiscountStatusActive DiscountStatus = "active" DiscountStatusArchived DiscountStatus = "archived" DiscountStatusExpired DiscountStatus = "expired" DiscountStatusUsed DiscountStatus = "used" )
type DiscountUpdated ¶
type DiscountUpdated struct { GenericNotificationEvent Data DiscountNotification `json:"data"` }
DiscountUpdated represents the discount.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type Duration ¶
type Duration struct { // Interval: Unit of time. Interval Interval `json:"interval,omitempty"` // Frequency: Amount of time. Frequency int `json:"frequency,omitempty"` }
Duration: How often this price should be charged. `null` if price is non-recurring (one-time).
type ErrorCode ¶
type ErrorCode string
ErrorCode: Reason why a payment attempt failed. Returns `null` if payment captured successfully..
const ( ErrorCodeAlreadyCanceled ErrorCode = "already_canceled" ErrorCodeAlreadyRefunded ErrorCode = "already_refunded" ErrorCodeAuthenticationFailed ErrorCode = "authentication_failed" ErrorCodeBlockedCard ErrorCode = "blocked_card" ErrorCodeCanceled ErrorCode = "canceled" ErrorCodeDeclined ErrorCode = "declined" ErrorCodeDeclinedNotRetryable ErrorCode = "declined_not_retryable" ErrorCodeExpiredCard ErrorCode = "expired_card" ErrorCodeFraud ErrorCode = "fraud" ErrorCodeInvalidAmount ErrorCode = "invalid_amount" ErrorCodeInvalidPaymentDetails ErrorCode = "invalid_payment_details" ErrorCodeNotEnoughBalance ErrorCode = "not_enough_balance" ErrorCodePspError ErrorCode = "psp_error" ErrorCodeRedactedPaymentMethod ErrorCode = "redacted_payment_method" ErrorCodeSystemError ErrorCode = "system_error" ErrorCodeTransactionNotPermitted ErrorCode = "transaction_not_permitted" ErrorCodeUnknown ErrorCode = "unknown" )
type EventTypeName ¶ added in v0.5.0
type EventTypeName string
EventTypeName: Type of event sent by Paddle, in the format `entity.event_type`..
const ( EventTypeNameAddressCreated EventTypeName = "address.created" EventTypeNameAddressImported EventTypeName = "address.imported" EventTypeNameAddressUpdated EventTypeName = "address.updated" EventTypeNameAdjustmentCreated EventTypeName = "adjustment.created" EventTypeNameAdjustmentUpdated EventTypeName = "adjustment.updated" EventTypeNameBusinessCreated EventTypeName = "business.created" EventTypeNameBusinessImported EventTypeName = "business.imported" EventTypeNameBusinessUpdated EventTypeName = "business.updated" EventTypeNameCustomerCreated EventTypeName = "customer.created" EventTypeNameCustomerImported EventTypeName = "customer.imported" EventTypeNameCustomerUpdated EventTypeName = "customer.updated" EventTypeNameDiscountCreated EventTypeName = "discount.created" EventTypeNameDiscountImported EventTypeName = "discount.imported" EventTypeNameDiscountUpdated EventTypeName = "discount.updated" EventTypeNamePayoutCreated EventTypeName = "payout.created" EventTypeNamePayoutPaid EventTypeName = "payout.paid" EventTypeNamePriceCreated EventTypeName = "price.created" EventTypeNamePriceImported EventTypeName = "price.imported" EventTypeNamePriceUpdated EventTypeName = "price.updated" EventTypeNameProductCreated EventTypeName = "product.created" EventTypeNameProductImported EventTypeName = "product.imported" EventTypeNameProductUpdated EventTypeName = "product.updated" EventTypeNameReportCreated EventTypeName = "report.created" EventTypeNameReportUpdated EventTypeName = "report.updated" EventTypeNameSubscriptionActivated EventTypeName = "subscription.activated" EventTypeNameSubscriptionCanceled EventTypeName = "subscription.canceled" EventTypeNameSubscriptionCreated EventTypeName = "subscription.created" EventTypeNameSubscriptionImported EventTypeName = "subscription.imported" EventTypeNameSubscriptionPastDue EventTypeName = "subscription.past_due" EventTypeNameSubscriptionPaused EventTypeName = "subscription.paused" EventTypeNameSubscriptionResumed EventTypeName = "subscription.resumed" EventTypeNameSubscriptionTrialing EventTypeName = "subscription.trialing" EventTypeNameSubscriptionUpdated EventTypeName = "subscription.updated" EventTypeNameTransactionBilled EventTypeName = "transaction.billed" EventTypeNameTransactionCanceled EventTypeName = "transaction.canceled" EventTypeNameTransactionCompleted EventTypeName = "transaction.completed" EventTypeNameTransactionCreated EventTypeName = "transaction.created" EventTypeNameTransactionPaid EventTypeName = "transaction.paid" EventTypeNameTransactionPastDue EventTypeName = "transaction.past_due" EventTypeNameTransactionPaymentFailed EventTypeName = "transaction.payment_failed" EventTypeNameTransactionReady EventTypeName = "transaction.ready" EventTypeNameTransactionUpdated EventTypeName = "transaction.updated" )
type GenericNotificationEvent ¶ added in v0.7.0
type GenericNotificationEvent struct { NotificationEvent // EventID: Unique Paddle ID for this event, prefixed with `evt_`. EventID string `json:"event_id,omitempty"` // EventType: Type of event sent by Paddle, in the format `entity.event_type`. EventType EventTypeName `json:"event_type,omitempty"` // OccurredAt: RFC 3339 datetime string of when this event occurred. OccurredAt string `json:"occurred_at,omitempty"` // Data: New or changed entity. Data any `json:"data,omitempty"` // NotificationID: Unique Paddle ID for this notification, prefixed with `ntf_`. NotificationID string `json:"notification_id,omitempty"` }
GenericNotificationEvent: Notification payload. Includes the new or changed event.
type ImportMeta ¶
type ImportMeta struct { // ExternalID: Reference or identifier for this entity from the solution where it was imported from. ExternalID *string `json:"external_id,omitempty"` // ImportedFrom: Name of the platform where this entity was imported from. ImportedFrom string `json:"imported_from,omitempty"` }
ImportMeta: Import information for this entity. `null` if this entity is not imported.
type MethodDetails ¶
type MethodDetails struct { // Type: Type of payment method used for this payment attempt. Type PaymentMethodType `json:"type,omitempty"` // Card: Information about the credit or debit card used to pay. `null` unless `type` is `card`. Card *Card `json:"card,omitempty"` }
MethodDetails: Information about the payment method used for a payment attempt.
type Money ¶
type Money struct { // Amount: Amount in the lowest denomination for the currency, e.g. 10 USD = 1000 (cents). Amount string `json:"amount,omitempty"` // CurrencyCode: Supported three-letter ISO 4217 currency code. CurrencyCode CurrencyCode `json:"currency_code,omitempty"` }
Money: Base price. This price applies to all customers, except for customers located in countries where you have `unit_price_overrides`.
type NotificationEvent ¶ added in v0.7.0
type NotificationEvent interface{}
type Original ¶
type Original struct { // Amount: Fee amount for this chargeback in the original currency. Amount string `json:"amount,omitempty"` // CurrencyCode: Three-letter ISO 4217 currency code for the original chargeback fee. CurrencyCode CurrencyCodeChargebacks `json:"currency_code,omitempty"` }
Original: Chargeback fee before conversion to the payout currency. `null` when the chargeback fee is the same as the payout currency.
type PaymentAttemptStatus ¶
type PaymentAttemptStatus string
PaymentAttemptStatus: Status of this payment attempt..
const ( PaymentAttemptStatusAuthorized PaymentAttemptStatus = "authorized" PaymentAttemptStatusAuthorizedFlagged PaymentAttemptStatus = "authorized_flagged" PaymentAttemptStatusCanceled PaymentAttemptStatus = "canceled" PaymentAttemptStatusCaptured PaymentAttemptStatus = "captured" PaymentAttemptStatusError PaymentAttemptStatus = "error" PaymentAttemptStatusActionRequired PaymentAttemptStatus = "action_required" PaymentAttemptStatusPendingNoActionRequired PaymentAttemptStatus = "pending_no_action_required" PaymentAttemptStatusCreated PaymentAttemptStatus = "created" PaymentAttemptStatusUnknown PaymentAttemptStatus = "unknown" PaymentAttemptStatusDropped PaymentAttemptStatus = "dropped" )
type PaymentMethodType ¶
type PaymentMethodType string
PaymentMethodType: Type of payment method used for this payment attempt..
const ( PaymentMethodTypeAlipay PaymentMethodType = "alipay" PaymentMethodTypeApplePay PaymentMethodType = "apple_pay" PaymentMethodTypeBancontact PaymentMethodType = "bancontact" PaymentMethodTypeCard PaymentMethodType = "card" PaymentMethodTypeGooglePay PaymentMethodType = "google_pay" PaymentMethodTypeIdeal PaymentMethodType = "ideal" PaymentMethodTypeOffline PaymentMethodType = "offline" PaymentMethodTypePaypal PaymentMethodType = "paypal" PaymentMethodTypeUnknown PaymentMethodType = "unknown" PaymentMethodTypeWireTransfer PaymentMethodType = "wire_transfer" )
type PayoutCreated ¶
type PayoutCreated struct { GenericNotificationEvent Data PayoutNotification `json:"data"` }
PayoutCreated represents the payout.created event. See https://developer.paddle.com/webhooks/overview for more information.
type PayoutNotification ¶
type PayoutNotification struct { // ID: ID for this payout. ID string `json:"id,omitempty"` // Status: Status of this payout. Status Status `json:"status,omitempty"` // Amount: Amount paid, or scheduled to be paid, for this payout. Amount string `json:"amount,omitempty"` // CurrencyCode: Three-letter ISO 4217 currency code for this payout. CurrencyCode CurrencyCodePayouts `json:"currency_code,omitempty"` }
PayoutNotification: New or changed entity.
type PayoutPaid ¶
type PayoutPaid struct { GenericNotificationEvent Data PayoutNotification `json:"data"` }
PayoutPaid represents the payout.paid event. See https://developer.paddle.com/webhooks/overview for more information.
type PayoutTotalsAdjustment ¶
type PayoutTotalsAdjustment struct { // Subtotal: Adjustment total before tax and fees. Subtotal string `json:"subtotal,omitempty"` // Tax: Total tax on the adjustment subtotal. Tax string `json:"tax,omitempty"` // Total: Adjustment total after tax. Total string `json:"total,omitempty"` // Fee: Adjusted Paddle fee. Fee string `json:"fee,omitempty"` // ChargebackFee: Chargeback fees incurred for this adjustment. Only returned when the adjustment `action` is `chargeback` or `chargeback_warning`. ChargebackFee ChargebackFee `json:"chargeback_fee,omitempty"` // Earnings: Adjusted payout earnings. This is the adjustment total plus adjusted Paddle fees, excluding chargeback fees. Earnings string `json:"earnings,omitempty"` // CurrencyCode: Three-letter ISO 4217 currency code used for the payout for this transaction. If your primary currency has changed, this reflects the primary currency at the time the transaction was billed. CurrencyCode CurrencyCodePayouts `json:"currency_code,omitempty"` }
PayoutTotalsAdjustment: Breakdown of how this adjustment affects your payout balance.
type Price ¶
type Price struct { // ID: Unique Paddle ID for this price, prefixed with `pri_`. ID string `json:"id,omitempty"` // ProductID: Paddle ID for the product that this price is for, prefixed with `pro_`. ProductID string `json:"product_id,omitempty"` // Description: Internal description for this price, not shown to customers. Typically notes for your team. Description string `json:"description,omitempty"` // Type: Type of item. Standard items are considered part of your catalog and are shown on the Paddle web app. Type CatalogType `json:"type,omitempty"` // Name: Name of this price, shown to customers at checkout and on invoices. Typically describes how often the related product bills. Name *string `json:"name,omitempty"` // BillingCycle: How often this price should be charged. `null` if price is non-recurring (one-time). BillingCycle *Duration `json:"billing_cycle,omitempty"` // TrialPeriod: Trial period for the product related to this price. The billing cycle begins once the trial period is over. `null` for no trial period. Requires `billing_cycle`. TrialPeriod *Duration `json:"trial_period,omitempty"` // TaxMode: How tax is calculated for this price. TaxMode TaxMode `json:"tax_mode,omitempty"` // UnitPrice: Base price. This price applies to all customers, except for customers located in countries where you have `unit_price_overrides`. UnitPrice Money `json:"unit_price,omitempty"` // UnitPriceOverrides: List of unit price overrides. Use to override the base price with a custom price and currency for a country or group of countries. UnitPriceOverrides []UnitPriceOverride `json:"unit_price_overrides,omitempty"` // Quantity: Limits on how many times the related product can be purchased at this price. Useful for discount campaigns. Quantity PriceQuantity `json:"quantity,omitempty"` // Status: Whether this entity can be used in Paddle. Status Status `json:"status,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` }
Price: Related price entity for this item. This reflects the price entity at the time it was added to the subscription.
type PriceCreated ¶
type PriceCreated struct { GenericNotificationEvent Data PriceNotification `json:"data"` }
PriceCreated represents the price.created event. See https://developer.paddle.com/webhooks/overview for more information.
type PriceImported ¶
type PriceImported struct { GenericNotificationEvent Data PriceNotification `json:"data"` }
PriceImported represents the price.imported event. See https://developer.paddle.com/webhooks/overview for more information.
type PriceNotification ¶
type PriceNotification struct { // ID: Unique Paddle ID for this price, prefixed with `pri_`. ID string `json:"id,omitempty"` // ProductID: Paddle ID for the product that this price is for, prefixed with `pro_`. ProductID string `json:"product_id,omitempty"` // Description: Internal description for this price, not shown to customers. Typically notes for your team. Description string `json:"description,omitempty"` // Type: Type of item. Standard items are considered part of your catalog and are shown on the Paddle web app. Type CatalogType `json:"type,omitempty"` // Name: Name of this price, shown to customers at checkout and on invoices. Typically describes how often the related product bills. Name *string `json:"name,omitempty"` // BillingCycle: How often this price should be charged. `null` if price is non-recurring (one-time). BillingCycle *Duration `json:"billing_cycle,omitempty"` // TrialPeriod: Trial period for the product related to this price. The billing cycle begins once the trial period is over. `null` for no trial period. Requires `billing_cycle`. TrialPeriod *Duration `json:"trial_period,omitempty"` // TaxMode: How tax is calculated for this price. TaxMode TaxMode `json:"tax_mode,omitempty"` // UnitPrice: Base price. This price applies to all customers, except for customers located in countries where you have `unit_price_overrides`. UnitPrice Money `json:"unit_price,omitempty"` // UnitPriceOverrides: List of unit price overrides. Use to override the base price with a custom price and currency for a country or group of countries. UnitPriceOverrides []UnitPriceOverride `json:"unit_price_overrides,omitempty"` // Quantity: Limits on how many times the related product can be purchased at this price. Useful for discount campaigns. Quantity PriceQuantity `json:"quantity,omitempty"` // Status: Whether this entity can be used in Paddle. Status Status `json:"status,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt *string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt *string `json:"updated_at,omitempty"` }
PriceNotification: Represents a price entity.
type PriceQuantity ¶
type PriceQuantity struct { // Minimum: Minimum quantity of the product related to this price that can be bought. Required if `maximum` set. Minimum int `json:"minimum,omitempty"` // Maximum: Maximum quantity of the product related to this price that can be bought. Required if `minimum` set. Must be greater than or equal to the `minimum` value. Maximum int `json:"maximum,omitempty"` }
PriceQuantity: Limits on how many times the related product can be purchased at this price. Useful for discount campaigns.
type PriceUpdated ¶
type PriceUpdated struct { GenericNotificationEvent Data PriceNotification `json:"data"` }
PriceUpdated represents the price.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type Product ¶
type Product struct { // ID: Unique Paddle ID for this product, prefixed with `pro_`. ID string `json:"id,omitempty"` // Name: Name of this product. Name string `json:"name,omitempty"` // Description: Short description for this product. Description *string `json:"description,omitempty"` // Type: Type of item. Standard items are considered part of your catalog and are shown on the Paddle web app. Type CatalogType `json:"type,omitempty"` // TaxCategory: Tax category for this product. Used for charging the correct rate of tax. Selected tax category must be enabled on your Paddle account. TaxCategory TaxCategory `json:"tax_category,omitempty"` // ImageURL: Image for this product. Included in the checkout and on some customer documents. ImageURL *string `json:"image_url,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // Status: Whether this entity can be used in Paddle. Status Status `json:"status,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` }
Product: Related product entity for this item. This reflects the product entity at the time it was added to the subscription.
type ProductCreated ¶
type ProductCreated struct { GenericNotificationEvent Data ProductNotification `json:"data"` }
ProductCreated represents the product.created event. See https://developer.paddle.com/webhooks/overview for more information.
type ProductImported ¶
type ProductImported struct { GenericNotificationEvent Data ProductNotification `json:"data"` }
ProductImported represents the product.imported event. See https://developer.paddle.com/webhooks/overview for more information.
type ProductNotification ¶
type ProductNotification struct { // ID: Unique Paddle ID for this product, prefixed with `pro_`. ID string `json:"id,omitempty"` // Name: Name of this product. Name string `json:"name,omitempty"` // Description: Short description for this product. Description *string `json:"description,omitempty"` // Type: Type of item. Standard items are considered part of your catalog and are shown on the Paddle web app. Type CatalogType `json:"type,omitempty"` // TaxCategory: Tax category for this product. Used for charging the correct rate of tax. Selected tax category must be enabled on your Paddle account. TaxCategory TaxCategory `json:"tax_category,omitempty"` // ImageURL: Image for this product. Included in the checkout and on some customer documents. ImageURL *string `json:"image_url,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // Status: Whether this entity can be used in Paddle. Status Status `json:"status,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt *string `json:"updated_at,omitempty"` }
ProductNotification: Represents a product entity.
type ProductUpdated ¶
type ProductUpdated struct { GenericNotificationEvent Data ProductNotification `json:"data"` }
ProductUpdated represents the product.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type Proration ¶
type Proration struct { // Rate: Rate used to calculate proration. Rate string `json:"rate,omitempty"` // BillingPeriod: Billing period that proration is based on. BillingPeriod TimePeriod `json:"billing_period,omitempty"` }
Proration: How proration was calculated for this adjustment item.
type ReportCreated ¶
type ReportCreated struct { GenericNotificationEvent Data ReportNotification `json:"data"` }
ReportCreated represents the report.created event. See https://developer.paddle.com/webhooks/overview for more information.
type ReportFilters ¶
type ReportFilters struct { // Name: Field name to filter by. Name ReportFiltersName `json:"name,omitempty"` // Operator: Operator to use when filtering. Valid when filtering by `updated_at`, `null` otherwise. Operator *ReportFiltersOperator `json:"operator,omitempty"` // Value: Value to filter by. Check the allowed values descriptions for the `name` field to see valid values for a field. Value any `json:"value,omitempty"` }
ReportFilters: Filter criteria for this report. If omitted when creating, reports are filtered to include data updated in the last 30 days. This means `updated_at` is greater than or equal to (`gte`) the date 30 days ago from the time the report was generated.
type ReportFiltersName ¶ added in v0.7.0
type ReportFiltersName string
ReportFiltersName: Field name to filter by..
const ( ReportFiltersNameAction ReportFiltersName = "action" ReportFiltersNameCurrencyCode ReportFiltersName = "currency_code" ReportFiltersNameStatus ReportFiltersName = "status" ReportFiltersNameUpdatedAt ReportFiltersName = "updated_at" ReportFiltersNameCollectionMode ReportFiltersName = "collection_mode" ReportFiltersNameOrigin ReportFiltersName = "origin" ReportFiltersNameProductStatus ReportFiltersName = "product_status" ReportFiltersNamePriceStatus ReportFiltersName = "price_status" ReportFiltersNameProductType ReportFiltersName = "product_type" ReportFiltersNamePriceType ReportFiltersName = "price_type" ReportFiltersNameProductUpdatedAt ReportFiltersName = "product_updated_at" ReportFiltersNamePriceUpdatedAt ReportFiltersName = "price_updated_at" ReportFiltersNameType ReportFiltersName = "type" )
type ReportFiltersOperator ¶ added in v0.7.0
type ReportFiltersOperator string
ReportFiltersOperator: Operator to use when filtering. Valid when filtering by `updated_at`, `null` otherwise..
const ( ReportFiltersOperatorLt ReportFiltersOperator = "lt" ReportFiltersOperatorGte ReportFiltersOperator = "gte" )
type ReportNotification ¶
type ReportNotification struct { // ID: Unique Paddle ID for this report, prefixed with `rep_` ID string `json:"id,omitempty"` /* Status: Status of this report. Set automatically by Paddle. Reports are created as `pending` initially, then move to `ready` when they're available to download. */ Status ReportStatus `json:"status,omitempty"` // Rows: Number of records in this report. `null` if the report is `pending`. Rows *int `json:"rows,omitempty"` // ExpiresAt: RFC 3339 datetime string of when this report expires. The report is no longer available to download after this date. ExpiresAt *string `json:"expires_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this report was last updated. UpdatedAt string `json:"updated_at,omitempty"` // CreatedAt: RFC 3339 datetime string of when this report was created. CreatedAt string `json:"created_at,omitempty"` // Type: Type of report to create. Type ReportType `json:"type,omitempty"` // Filters: Filter criteria for this report. If omitted when creating, reports are filtered to include data updated in the last 30 days. This means `updated_at` is greater than or equal to (`gte`) the date 30 days ago from the time the report was generated. Filters []ReportFilters `json:"filters,omitempty"` }
ReportNotification: New or changed entity.
type ReportStatus ¶
type ReportStatus string
ReportStatus: Status of this report. Set automatically by Paddle.
Reports are created as `pending` initially, then move to `ready` when they're available to download..
const ( ReportStatusPending ReportStatus = "pending" ReportStatusReady ReportStatus = "ready" ReportStatusFailed ReportStatus = "failed" ReportStatusExpired ReportStatus = "expired" )
type ReportType ¶ added in v0.7.0
type ReportType string
ReportType: Type of report to create..
const ( ReportTypeAdjustments ReportType = "adjustments" ReportTypeAdjustmentLineItems ReportType = "adjustment_line_items" ReportTypeTransactions ReportType = "transactions" ReportTypeTransactionLineItems ReportType = "transaction_line_items" ReportTypeProductsPrices ReportType = "products_prices" ReportTypeDiscounts ReportType = "discounts" )
type ReportUpdated ¶
type ReportUpdated struct { GenericNotificationEvent Data ReportNotification `json:"data"` }
ReportUpdated represents the report.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type ScheduledChangeAction ¶
type ScheduledChangeAction string
ScheduledChangeAction: Kind of change that's scheduled to be applied to this subscription..
const ( ScheduledChangeActionCancel ScheduledChangeAction = "cancel" ScheduledChangeActionPause ScheduledChangeAction = "pause" ScheduledChangeActionResume ScheduledChangeAction = "resume" )
type SubscriptionActivated ¶
type SubscriptionActivated struct { GenericNotificationEvent Data SubscriptionNotification `json:"data"` }
SubscriptionActivated represents the subscription.activated event. See https://developer.paddle.com/webhooks/overview for more information.
type SubscriptionCanceled ¶
type SubscriptionCanceled struct { GenericNotificationEvent Data SubscriptionNotification `json:"data"` }
SubscriptionCanceled represents the subscription.canceled event. See https://developer.paddle.com/webhooks/overview for more information.
type SubscriptionCreated ¶
type SubscriptionCreated struct { GenericNotificationEvent Data SubscriptionCreatedNotification `json:"data"` }
SubscriptionCreated represents the subscription.created event. See https://developer.paddle.com/webhooks/overview for more information.
type SubscriptionCreatedNotification ¶
type SubscriptionCreatedNotification struct { // ID: Unique Paddle ID for this subscription entity, prefixed with `sub_`. ID string `json:"id,omitempty"` // TransactionID: Paddle ID for the transaction entity that resulted in this subscription being created, prefixed with `txn_`. TransactionID string `json:"transaction_id,omitempty"` // Status: Status of this subscription. Set automatically by Paddle. Use the pause subscription or cancel subscription operations to change. Status SubscriptionStatus `json:"status,omitempty"` // CustomerID: Paddle ID of the customer that this subscription is for, prefixed with `ctm_`. CustomerID string `json:"customer_id,omitempty"` // AddressID: Paddle ID of the address that this subscription is for, prefixed with `add_`. AddressID string `json:"address_id,omitempty"` // BusinessID: Paddle ID of the business that this subscription is for, prefixed with `biz_`. BusinessID *string `json:"business_id,omitempty"` // CurrencyCode: Supported three-letter ISO 4217 currency code. Transactions for this subscription are created in this currency. Must be `USD`, `EUR`, or `GBP` if `collection_mode` is `manual`. CurrencyCode CurrencyCode `json:"currency_code,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` // StartedAt: RFC 3339 datetime string of when this subscription started. This may be different from `first_billed_at` if the subscription started in trial. StartedAt *string `json:"started_at,omitempty"` // FirstBilledAt: RFC 3339 datetime string of when this subscription was first billed. This may be different from `started_at` if the subscription started in trial. FirstBilledAt *string `json:"first_billed_at,omitempty"` // NextBilledAt: RFC 3339 datetime string of when this subscription is next scheduled to be billed. NextBilledAt *string `json:"next_billed_at,omitempty"` // PausedAt: RFC 3339 datetime string of when this subscription was paused. Set automatically by Paddle when the pause subscription operation is used. `null` if not paused. PausedAt *string `json:"paused_at,omitempty"` // CanceledAt: RFC 3339 datetime string of when this subscription was canceled. Set automatically by Paddle when the cancel subscription operation is used. `null` if not canceled. CanceledAt *string `json:"canceled_at,omitempty"` // Discount: Details of the discount applied to this subscription. Discount *SubscriptionDiscountTimePeriod `json:"discount,omitempty"` // CollectionMode: How payment is collected for transactions created for this subscription. `automatic` for checkout, `manual` for invoices. CollectionMode CollectionMode `json:"collection_mode,omitempty"` // BillingDetails: Details for invoicing. Required if `collection_mode` is `manual`. BillingDetails *BillingDetails `json:"billing_details,omitempty"` // CurrentBillingPeriod: Current billing period for this subscription. Set automatically by Paddle based on the billing cycle. `null` for `paused` and `canceled` subscriptions. CurrentBillingPeriod *TimePeriod `json:"current_billing_period,omitempty"` // BillingCycle: How often this subscription renews. Set automatically by Paddle based on the prices on this subscription. BillingCycle Duration `json:"billing_cycle,omitempty"` // ScheduledChange: Change that's scheduled to be applied to a subscription. Use the pause subscription, cancel subscription, and resume subscription operations to create scheduled changes. `null` if no scheduled changes. ScheduledChange *SubscriptionScheduledChange `json:"scheduled_change,omitempty"` // Items: Represents a subscription item. Items []SubscriptionItem `json:"items,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` }
SubscriptionCreatedNotification: New or changed entity.
type SubscriptionDiscountTimePeriod ¶ added in v0.7.0
type SubscriptionDiscountTimePeriod struct { // ID: Unique Paddle ID for this discount, prefixed with `dsc_`. ID string `json:"id,omitempty"` // StartsAt: RFC 3339 datetime string of when this discount was first applied. StartsAt string `json:"starts_at,omitempty"` // EndsAt: RFC 3339 datetime string of when this discount no longer applies. Where a discount has `maximum_recurring_intervals`, this is the date of the last billing period where this discount applies. `null` where a discount recurs forever. EndsAt *string `json:"ends_at,omitempty"` }
SubscriptionDiscountTimePeriod: Details of the discount applied to this subscription.
type SubscriptionImported ¶
type SubscriptionImported struct { GenericNotificationEvent Data SubscriptionNotification `json:"data"` }
SubscriptionImported represents the subscription.imported event. See https://developer.paddle.com/webhooks/overview for more information.
type SubscriptionItem ¶
type SubscriptionItem struct { // Status: Status of this subscription item. Set automatically by Paddle. Status SubscriptionItemStatus `json:"status,omitempty"` // Quantity: Quantity of this item on the subscription. Quantity int `json:"quantity,omitempty"` // Recurring: Whether this is a recurring item. `false` if one-time. Recurring bool `json:"recurring,omitempty"` // CreatedAt: RFC 3339 datetime string of when this item was added to this subscription. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this item was last updated on this subscription. UpdatedAt string `json:"updated_at,omitempty"` // PreviouslyBilledAt: RFC 3339 datetime string of when this item was last billed. PreviouslyBilledAt *string `json:"previously_billed_at,omitempty"` // NextBilledAt: RFC 3339 datetime string of when this item is next scheduled to be billed. NextBilledAt *string `json:"next_billed_at,omitempty"` // TrialDates: Trial dates for this item. TrialDates *TimePeriod `json:"trial_dates,omitempty"` // Price: Related price entity for this item. This reflects the price entity at the time it was added to the subscription. Price Price `json:"price,omitempty"` // Product: Related product entity for this item. This reflects the product entity at the time it was added to the subscription. Product Product `json:"product,omitempty"` }
SubscriptionItem: Represents a subscription item.
type SubscriptionItemStatus ¶
type SubscriptionItemStatus string
SubscriptionItemStatus: Status of this subscription item. Set automatically by Paddle..
const ( SubscriptionItemStatusActive SubscriptionItemStatus = "active" SubscriptionItemStatusInactive SubscriptionItemStatus = "inactive" SubscriptionItemStatusTrialing SubscriptionItemStatus = "trialing" )
type SubscriptionNotification ¶
type SubscriptionNotification struct { // ID: Unique Paddle ID for this subscription entity, prefixed with `sub_`. ID string `json:"id,omitempty"` // Status: Status of this subscription. Set automatically by Paddle. Use the pause subscription or cancel subscription operations to change. Status SubscriptionStatus `json:"status,omitempty"` // CustomerID: Paddle ID of the customer that this subscription is for, prefixed with `ctm_`. CustomerID string `json:"customer_id,omitempty"` // AddressID: Paddle ID of the address that this subscription is for, prefixed with `add_`. AddressID string `json:"address_id,omitempty"` // BusinessID: Paddle ID of the business that this subscription is for, prefixed with `biz_`. BusinessID *string `json:"business_id,omitempty"` // CurrencyCode: Supported three-letter ISO 4217 currency code. Transactions for this subscription are created in this currency. Must be `USD`, `EUR`, or `GBP` if `collection_mode` is `manual`. CurrencyCode CurrencyCode `json:"currency_code,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` // StartedAt: RFC 3339 datetime string of when this subscription started. This may be different from `first_billed_at` if the subscription started in trial. StartedAt *string `json:"started_at,omitempty"` // FirstBilledAt: RFC 3339 datetime string of when this subscription was first billed. This may be different from `started_at` if the subscription started in trial. FirstBilledAt *string `json:"first_billed_at,omitempty"` // NextBilledAt: RFC 3339 datetime string of when this subscription is next scheduled to be billed. NextBilledAt *string `json:"next_billed_at,omitempty"` // PausedAt: RFC 3339 datetime string of when this subscription was paused. Set automatically by Paddle when the pause subscription operation is used. `null` if not paused. PausedAt *string `json:"paused_at,omitempty"` // CanceledAt: RFC 3339 datetime string of when this subscription was canceled. Set automatically by Paddle when the cancel subscription operation is used. `null` if not canceled. CanceledAt *string `json:"canceled_at,omitempty"` // Discount: Details of the discount applied to this subscription. Discount *SubscriptionDiscountTimePeriod `json:"discount,omitempty"` // CollectionMode: How payment is collected for transactions created for this subscription. `automatic` for checkout, `manual` for invoices. CollectionMode CollectionMode `json:"collection_mode,omitempty"` // BillingDetails: Details for invoicing. Required if `collection_mode` is `manual`. BillingDetails *BillingDetails `json:"billing_details,omitempty"` // CurrentBillingPeriod: Current billing period for this subscription. Set automatically by Paddle based on the billing cycle. `null` for `paused` and `canceled` subscriptions. CurrentBillingPeriod *TimePeriod `json:"current_billing_period,omitempty"` // BillingCycle: How often this subscription renews. Set automatically by Paddle based on the prices on this subscription. BillingCycle Duration `json:"billing_cycle,omitempty"` // ScheduledChange: Change that's scheduled to be applied to a subscription. Use the pause subscription, cancel subscription, and resume subscription operations to create scheduled changes. `null` if no scheduled changes. ScheduledChange *SubscriptionScheduledChange `json:"scheduled_change,omitempty"` // Items: Represents a subscription item. Items []SubscriptionItem `json:"items,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // ImportMeta: Import information for this entity. `null` if this entity is not imported. ImportMeta *ImportMeta `json:"import_meta,omitempty"` }
SubscriptionNotification: New or changed entity.
type SubscriptionPastDue ¶
type SubscriptionPastDue struct { GenericNotificationEvent Data SubscriptionNotification `json:"data"` }
SubscriptionPastDue represents the subscription.past_due event. See https://developer.paddle.com/webhooks/overview for more information.
type SubscriptionPaused ¶
type SubscriptionPaused struct { GenericNotificationEvent Data SubscriptionNotification `json:"data"` }
SubscriptionPaused represents the subscription.paused event. See https://developer.paddle.com/webhooks/overview for more information.
type SubscriptionResumed ¶
type SubscriptionResumed struct { GenericNotificationEvent Data SubscriptionNotification `json:"data"` }
SubscriptionResumed represents the subscription.resumed event. See https://developer.paddle.com/webhooks/overview for more information.
type SubscriptionScheduledChange ¶
type SubscriptionScheduledChange struct { // Action: Kind of change that's scheduled to be applied to this subscription. Action ScheduledChangeAction `json:"action,omitempty"` // EffectiveAt: RFC 3339 datetime string of when this scheduled change takes effect. EffectiveAt string `json:"effective_at,omitempty"` // ResumeAt: RFC 3339 datetime string of when a paused subscription should resume. Only used for `pause` scheduled changes. ResumeAt *string `json:"resume_at,omitempty"` }
SubscriptionScheduledChange: Change that's scheduled to be applied to a subscription. Use the pause subscription, cancel subscription, and resume subscription operations to create scheduled changes. `null` if no scheduled changes.
type SubscriptionStatus ¶
type SubscriptionStatus string
SubscriptionStatus: Status of this subscription. Set automatically by Paddle. Use the pause subscription or cancel subscription operations to change..
const ( SubscriptionStatusActive SubscriptionStatus = "active" SubscriptionStatusCanceled SubscriptionStatus = "canceled" SubscriptionStatusPastDue SubscriptionStatus = "past_due" SubscriptionStatusPaused SubscriptionStatus = "paused" SubscriptionStatusTrialing SubscriptionStatus = "trialing" )
type SubscriptionTrialing ¶
type SubscriptionTrialing struct { GenericNotificationEvent Data SubscriptionNotification `json:"data"` }
SubscriptionTrialing represents the subscription.trialing event. See https://developer.paddle.com/webhooks/overview for more information.
type SubscriptionUpdated ¶
type SubscriptionUpdated struct { GenericNotificationEvent Data SubscriptionNotification `json:"data"` }
SubscriptionUpdated represents the subscription.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type TaxCategory ¶
type TaxCategory string
TaxCategory: Tax category for this product. Used for charging the correct rate of tax. Selected tax category must be enabled on your Paddle account..
const ( TaxCategoryDigitalGoods TaxCategory = "digital-goods" TaxCategoryEbooks TaxCategory = "ebooks" TaxCategoryImplementationServices TaxCategory = "implementation-services" TaxCategoryProfessionalServices TaxCategory = "professional-services" TaxCategorySaas TaxCategory = "saas" TaxCategorySoftwareProgrammingServices TaxCategory = "software-programming-services" TaxCategoryStandard TaxCategory = "standard" TaxCategoryTrainingServices TaxCategory = "training-services" TaxCategoryWebsiteHosting TaxCategory = "website-hosting" )
type TaxRatesUsed ¶
type TaxRatesUsed struct { // TaxRate: Rate used to calculate tax for this transaction. TaxRate string `json:"tax_rate,omitempty"` // Totals: Calculated totals for the tax applied to this transaction. Totals Totals `json:"totals,omitempty"` }
TaxRatesUsed: List of tax rates applied for this transaction.
type TimePeriod ¶
type TimePeriod struct { // StartsAt: RFC 3339 datetime string of when this period starts. StartsAt string `json:"starts_at,omitempty"` // EndsAt: RFC 3339 datetime string of when this period ends. EndsAt string `json:"ends_at,omitempty"` }
TimePeriod: Billing period that proration is based on.
type Totals ¶
type Totals struct { // Subtotal: Subtotal before discount, tax, and deductions. If an item, unit price multiplied by quantity. Subtotal string `json:"subtotal,omitempty"` /* Discount: Total discount as a result of any discounts applied. Except for percentage discounts, Paddle applies tax to discounts based on the line item `price.tax_mode`. If `price.tax_mode` for a line item is `internal`, Paddle removes tax from the discount applied. */ Discount string `json:"discount,omitempty"` // Tax: Total tax on the subtotal. Tax string `json:"tax,omitempty"` // Total: Total after discount and tax. Total string `json:"total,omitempty"` }
Totals: Calculated totals for the tax applied to this transaction.
type TransactionBilled ¶
type TransactionBilled struct { GenericNotificationEvent Data TransactionNotification `json:"data"` }
TransactionBilled represents the transaction.billed event. See https://developer.paddle.com/webhooks/overview for more information.
type TransactionCanceled ¶
type TransactionCanceled struct { GenericNotificationEvent Data TransactionNotification `json:"data"` }
TransactionCanceled represents the transaction.canceled event. See https://developer.paddle.com/webhooks/overview for more information.
type TransactionCompleted ¶
type TransactionCompleted struct { GenericNotificationEvent Data TransactionNotification `json:"data"` }
TransactionCompleted represents the transaction.completed event. See https://developer.paddle.com/webhooks/overview for more information.
type TransactionCreated ¶
type TransactionCreated struct { GenericNotificationEvent Data TransactionNotification `json:"data"` }
TransactionCreated represents the transaction.created event. See https://developer.paddle.com/webhooks/overview for more information.
type TransactionDetails ¶
type TransactionDetails struct { // TaxRatesUsed: List of tax rates applied for this transaction. TaxRatesUsed []TaxRatesUsed `json:"tax_rates_used,omitempty"` // Totals: Breakdown of the total for a transaction. These numbers can become negative when dealing with subscription updates that result in credit. Totals TransactionTotals `json:"totals,omitempty"` // AdjustedTotals: Breakdown of the payout totals for a transaction after adjustments. `null` until the transaction is `completed`. AdjustedTotals TransactionTotalsAdjusted `json:"adjusted_totals,omitempty"` // PayoutTotals: Breakdown of the payout total for a transaction. `null` until the transaction is `completed`. Returned in your payout currency. PayoutTotals *TransactionPayoutTotals `json:"payout_totals,omitempty"` // AdjustedPayoutTotals: Breakdown of the payout total for a transaction after adjustments. `null` until the transaction is `completed`. AdjustedPayoutTotals *TransactionPayoutTotalsAdjusted `json:"adjusted_payout_totals,omitempty"` // LineItems: Information about line items for this transaction. Different from transaction `items` as they include totals calculated by Paddle. Considered the source of truth for line item totals. LineItems []TransactionLineItem `json:"line_items,omitempty"` }
TransactionDetails: Calculated totals for a transaction, including proration, discounts, tax, and currency conversion. Considered the source of truth for totals on a transaction.
type TransactionItem ¶
type TransactionItem struct { // PriceID: Paddle ID for the price to add to this transaction, prefixed with `pri_`. PriceID string `json:"price_id,omitempty"` // Price: Represents a price entity. Price Price `json:"price,omitempty"` // Quantity: Quantity of this item on the transaction. Quantity int `json:"quantity,omitempty"` // Proration: How proration was calculated for this item. Populated when a transaction is created from a subscription change, where `proration_billing_mode` was `prorated_immediately` or `prorated_next_billing_period`. Set automatically by Paddle. Proration *Proration `json:"proration,omitempty"` }
TransactionItem: List of items on this transaction. For calculated totals, use `details.line_items`.
type TransactionLineItem ¶
type TransactionLineItem struct { // ID: Unique Paddle ID for this transaction item, prefixed with `txnitm_`. ID string `json:"id,omitempty"` // PriceID: Paddle ID for the price related to this transaction line item, prefixed with `pri_`. PriceID string `json:"price_id,omitempty"` // Quantity: Quantity of this transaction line item. Quantity int `json:"quantity,omitempty"` // Proration: How proration was calculated for this item. Populated when a transaction is created from a subscription change, where `proration_billing_mode` was `prorated_immediately` or `prorated_next_billing_period`. Set automatically by Paddle. Proration *Proration `json:"proration,omitempty"` // TaxRate: Rate used to calculate tax for this transaction line item. TaxRate string `json:"tax_rate,omitempty"` // UnitTotals: Breakdown of the charge for one unit in the lowest denomination of a currency (e.g. cents for USD). UnitTotals Totals `json:"unit_totals,omitempty"` // Totals: Breakdown of a charge in the lowest denomination of a currency (e.g. cents for USD). Totals Totals `json:"totals,omitempty"` // Product: Related product entity for this transaction line item price. Product Product `json:"product,omitempty"` }
TransactionLineItem: Information about line items for this transaction. Different from transaction `items` as they include totals calculated by Paddle. Considered the source of truth for line item totals.
type TransactionNotification ¶
type TransactionNotification struct { // ID: Unique Paddle ID for this transaction entity, prefixed with `txn_`. ID string `json:"id,omitempty"` // Status: 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. Status TransactionStatus `json:"status,omitempty"` // CustomerID: Paddle ID of the customer that this transaction is for, prefixed with `ctm_`. CustomerID *string `json:"customer_id,omitempty"` // AddressID: Paddle ID of the address that this transaction is for, prefixed with `add_`. AddressID *string `json:"address_id,omitempty"` // BusinessID: Paddle ID of the business that this transaction is for, prefixed with `biz_`. BusinessID *string `json:"business_id,omitempty"` // CustomData: Your own structured key-value data. CustomData CustomData `json:"custom_data,omitempty"` // CurrencyCode: Supported three-letter ISO 4217 currency code. Must be `USD`, `EUR`, or `GBP` if `collection_mode` is `manual`. CurrencyCode CurrencyCode `json:"currency_code,omitempty"` // Origin: Describes how this transaction was created. Origin TransactionOrigin `json:"origin,omitempty"` // SubscriptionID: Paddle ID of the subscription that this transaction is for, prefixed with `sub_`. SubscriptionID *string `json:"subscription_id,omitempty"` // 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. InvoiceID *string `json:"invoice_id,omitempty"` // InvoiceNumber: Invoice number for this transaction. Automatically generated by Paddle when you mark a transaction as `billed` where `collection_mode` is `manual`. InvoiceNumber *string `json:"invoice_number,omitempty"` // CollectionMode: How payment is collected for this transaction. `automatic` for checkout, `manual` for invoices. CollectionMode CollectionMode `json:"collection_mode,omitempty"` // DiscountID: Paddle ID of the discount applied to this transaction, prefixed with `dsc_`. DiscountID *string `json:"discount_id,omitempty"` // BillingDetails: Details for invoicing. Required if `collection_mode` is `manual`. BillingDetails *BillingDetails `json:"billing_details,omitempty"` // BillingPeriod: Time period that this transaction is for. Set automatically by Paddle for subscription renewals to describe the period that charges are for. BillingPeriod *TimePeriod `json:"billing_period,omitempty"` // Items: List of items on this transaction. For calculated totals, use `details.line_items`. Items []TransactionItem `json:"items,omitempty"` // Details: Calculated totals for a transaction, including proration, discounts, tax, and currency conversion. Considered the source of truth for totals on a transaction. Details TransactionDetails `json:"details,omitempty"` // Payments: List of payment attempts for this transaction, including successful payments. Sorted by `created_at` in descending order, so most recent attempts are returned first. Payments []TransactionPaymentAttempt `json:"payments,omitempty"` // Checkout: 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. Checkout *Checkout `json:"checkout,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // UpdatedAt: RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle. UpdatedAt string `json:"updated_at,omitempty"` // BilledAt: RFC 3339 datetime string of when this transaction was marked as `billed`. `null` for transactions that are not `billed` or `completed`. Set automatically by Paddle. BilledAt *string `json:"billed_at,omitempty"` }
TransactionNotification: New or changed entity.
type TransactionOrigin ¶
type TransactionOrigin string
TransactionOrigin: Describes how this transaction was created..
const ( TransactionOriginAPI TransactionOrigin = "api" TransactionOriginSubscriptionCharge TransactionOrigin = "subscription_charge" TransactionOriginSubscriptionPaymentMethodChange TransactionOrigin = "subscription_payment_method_change" TransactionOriginSubscriptionRecurring TransactionOrigin = "subscription_recurring" TransactionOriginSubscriptionUpdate TransactionOrigin = "subscription_update" TransactionOriginWeb TransactionOrigin = "web" )
type TransactionPaid ¶
type TransactionPaid struct { GenericNotificationEvent Data TransactionNotification `json:"data"` }
TransactionPaid represents the transaction.paid event. See https://developer.paddle.com/webhooks/overview for more information.
type TransactionPastDue ¶
type TransactionPastDue struct { GenericNotificationEvent Data TransactionNotification `json:"data"` }
TransactionPastDue represents the transaction.past_due event. See https://developer.paddle.com/webhooks/overview for more information.
type TransactionPaymentAttempt ¶
type TransactionPaymentAttempt struct { // PaymentAttemptID: UUID for this payment attempt. PaymentAttemptID string `json:"payment_attempt_id,omitempty"` // StoredPaymentMethodID: UUID for the stored payment method used for this payment attempt. Deprecated - use `payment_method_id` instead. StoredPaymentMethodID string `json:"stored_payment_method_id,omitempty"` // PaymentMethodID: Paddle ID of the payment method used for this payment attempt, prefixed with `paymtd_`. PaymentMethodID string `json:"payment_method_id,omitempty"` // Amount: Amount for collection in the lowest denomination of a currency (e.g. cents for USD). Amount string `json:"amount,omitempty"` // Status: Status of this payment attempt. Status PaymentAttemptStatus `json:"status,omitempty"` // ErrorCode: Reason why a payment attempt failed. Returns `null` if payment captured successfully. ErrorCode *ErrorCode `json:"error_code,omitempty"` // MethodDetails: Information about the payment method used for a payment attempt. MethodDetails MethodDetails `json:"method_details,omitempty"` // CreatedAt: RFC 3339 datetime string of when this entity was created. Set automatically by Paddle. CreatedAt string `json:"created_at,omitempty"` // CapturedAt: RFC 3339 datetime string of when this payment was captured. `null` if `status` is not `captured`. CapturedAt *string `json:"captured_at,omitempty"` }
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.
type TransactionPaymentFailed ¶
type TransactionPaymentFailed struct { GenericNotificationEvent Data TransactionNotification `json:"data"` }
TransactionPaymentFailed represents the transaction.payment_failed event. See https://developer.paddle.com/webhooks/overview for more information.
type TransactionPayoutTotals ¶
type TransactionPayoutTotals struct { // Subtotal: Total before tax and fees. Subtotal string `json:"subtotal,omitempty"` /* Discount: Total discount as a result of any discounts applied. Except for percentage discounts, Paddle applies tax to discounts based on the line item `price.tax_mode`. If `price.tax_mode` for a line item is `internal`, Paddle removes tax from the discount applied. */ Discount string `json:"discount,omitempty"` // Tax: Total tax on the subtotal. Tax string `json:"tax,omitempty"` // Total: Total after tax. Total string `json:"total,omitempty"` // Credit: Total credit applied to this transaction. This includes credits applied using a customer's credit balance and adjustments to a `billed` transaction. Credit string `json:"credit,omitempty"` // CreditToBalance: Additional credit generated from negative `details.line_items`. This credit is added to the customer balance. CreditToBalance string `json:"credit_to_balance,omitempty"` // Balance: Total due on a transaction after credits and any payments. Balance string `json:"balance,omitempty"` // GrandTotal: Total due on a transaction after credits but before any payments. GrandTotal string `json:"grand_total,omitempty"` // Fee: Total fee taken by Paddle for this payout. Fee string `json:"fee,omitempty"` // Earnings: Total earnings for this payout. This is the subtotal minus the Paddle fee. Earnings string `json:"earnings,omitempty"` // CurrencyCode: Three-letter ISO 4217 currency code used for the payout for this transaction. If your primary currency has changed, this reflects the primary currency at the time the transaction was billed. CurrencyCode CurrencyCodePayouts `json:"currency_code,omitempty"` }
TransactionPayoutTotals: Breakdown of the payout total for a transaction. `null` until the transaction is `completed`. Returned in your payout currency.
type TransactionPayoutTotalsAdjusted ¶
type TransactionPayoutTotalsAdjusted struct { // Subtotal: Total before tax and fees. Subtotal string `json:"subtotal,omitempty"` // Tax: Total tax on the subtotal. Tax string `json:"tax,omitempty"` // Total: Total after tax. Total string `json:"total,omitempty"` // Fee: Total fee taken by Paddle for this payout. Fee string `json:"fee,omitempty"` // ChargebackFee: Details of any chargeback fees incurred for this transaction. ChargebackFee ChargebackFee `json:"chargeback_fee,omitempty"` // Earnings: Total earnings for this payout. This is the subtotal minus the Paddle fee, excluding chargeback fees. Earnings string `json:"earnings,omitempty"` // CurrencyCode: Three-letter ISO 4217 currency code used for the payout for this transaction. If your primary currency has changed, this reflects the primary currency at the time the transaction was billed. CurrencyCode CurrencyCodePayouts `json:"currency_code,omitempty"` }
TransactionPayoutTotalsAdjusted: Breakdown of the payout total for a transaction after adjustments. `null` until the transaction is `completed`.
type TransactionReady ¶
type TransactionReady struct { GenericNotificationEvent Data TransactionNotification `json:"data"` }
TransactionReady represents the transaction.ready event. See https://developer.paddle.com/webhooks/overview for more information.
type TransactionStatus ¶
type TransactionStatus string
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..
const ( TransactionStatusDraft TransactionStatus = "draft" TransactionStatusReady TransactionStatus = "ready" TransactionStatusBilled TransactionStatus = "billed" TransactionStatusPaid TransactionStatus = "paid" TransactionStatusCompleted TransactionStatus = "completed" TransactionStatusCanceled TransactionStatus = "canceled" TransactionStatusPastDue TransactionStatus = "past_due" )
type TransactionTotals ¶
type TransactionTotals struct { // Subtotal: Subtotal before discount, tax, and deductions. If an item, unit price multiplied by quantity. Subtotal string `json:"subtotal,omitempty"` /* Discount: Total discount as a result of any discounts applied. Except for percentage discounts, Paddle applies tax to discounts based on the line item `price.tax_mode`. If `price.tax_mode` for a line item is `internal`, Paddle removes tax from the discount applied. */ Discount string `json:"discount,omitempty"` // Tax: Total tax on the subtotal. Tax string `json:"tax,omitempty"` // Total: Total after discount and tax. Total string `json:"total,omitempty"` // Credit: Total credit applied to this transaction. This includes credits applied using a customer's credit balance and adjustments to a `billed` transaction. Credit string `json:"credit,omitempty"` // CreditToBalance: Additional credit generated from negative `details.line_items`. This credit is added to the customer balance. CreditToBalance string `json:"credit_to_balance,omitempty"` // Balance: Total due on a transaction after credits and any payments. Balance string `json:"balance,omitempty"` // GrandTotal: Total due on a transaction after credits but before any payments. GrandTotal string `json:"grand_total,omitempty"` // Fee: Total fee taken by Paddle for this transaction. `null` until the transaction is `completed` and the fee is processed. Fee *string `json:"fee,omitempty"` // Earnings: Total earnings for this transaction. This is the total minus the Paddle fee. `null` until the transaction is `completed` and the fee is processed. Earnings *string `json:"earnings,omitempty"` // CurrencyCode: Three-letter ISO 4217 currency code of the currency used for this transaction. CurrencyCode CurrencyCode `json:"currency_code,omitempty"` }
TransactionTotals: Breakdown of the total for a transaction. These numbers can become negative when dealing with subscription updates that result in credit.
type TransactionTotalsAdjusted ¶
type TransactionTotalsAdjusted struct { // Subtotal: Subtotal before discount, tax, and deductions. If an item, unit price multiplied by quantity. Subtotal string `json:"subtotal,omitempty"` // Tax: Total tax on the subtotal. Tax string `json:"tax,omitempty"` // Total: Total after tax. Total string `json:"total,omitempty"` // GrandTotal: Total due after credits but before any payments. GrandTotal string `json:"grand_total,omitempty"` // Fee: Total fee taken by Paddle for this transaction. `null` until the transaction is `completed` and the fee is processed. Fee *string `json:"fee,omitempty"` /* Earnings: Total earnings for this transaction. This is the total minus the Paddle fee. `null` until the transaction is `completed` and the fee is processed. */ Earnings *string `json:"earnings,omitempty"` // CurrencyCode: Three-letter ISO 4217 currency code of the currency used for this transaction. CurrencyCode CurrencyCode `json:"currency_code,omitempty"` }
TransactionTotalsAdjusted: Breakdown of the payout totals for a transaction after adjustments. `null` until the transaction is `completed`.
type TransactionUpdated ¶
type TransactionUpdated struct { GenericNotificationEvent Data TransactionNotification `json:"data"` }
TransactionUpdated represents the transaction.updated event. See https://developer.paddle.com/webhooks/overview for more information.
type Type ¶
type Type string
Type: Type of discount. Determines how this discount impacts the transaction total..
type UnitPriceOverride ¶
type UnitPriceOverride struct { // CountryCodes: Supported two-letter ISO 3166-1 alpha-2 country code. CountryCodes []CountryCode `json:"country_codes,omitempty"` // UnitPrice: Override price. This price applies to customers located in the countries for this unit price override. UnitPrice Money `json:"unit_price,omitempty"` }
UnitPriceOverride: List of unit price overrides. Use to override the base price with a custom price and currency for a country or group of countries.