Documentation
¶
Overview ¶
Package agentic_checkout provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.
Index ¶
- Constants
- type APIVersion
- type AcceptLanguage
- type Address
- type Adjustment
- type AffiliateAttribution
- func (t AffiliateAttribution) AsAffiliateAttribution0() (AffiliateAttribution0, error)
- func (t AffiliateAttribution) AsAffiliateAttribution1() (AffiliateAttribution1, error)
- func (t *AffiliateAttribution) FromAffiliateAttribution0(v AffiliateAttribution0) error
- func (t *AffiliateAttribution) FromAffiliateAttribution1(v AffiliateAttribution1) error
- func (t AffiliateAttribution) MarshalJSON() ([]byte, error)
- func (t *AffiliateAttribution) MergeAffiliateAttribution0(v AffiliateAttribution0) error
- func (t *AffiliateAttribution) MergeAffiliateAttribution1(v AffiliateAttribution1) error
- func (t *AffiliateAttribution) UnmarshalJSON(b []byte) error
- type AffiliateAttribution0
- type AffiliateAttribution1
- type AffiliateAttributionMetadata
- type AffiliateAttributionMetadata0
- type AffiliateAttributionMetadata1
- type AffiliateAttributionMetadata2
- type AffiliateAttributionMetadata_AdditionalProperties
- func (t AffiliateAttributionMetadata_AdditionalProperties) AsAffiliateAttributionMetadata0() (AffiliateAttributionMetadata0, error)
- func (t AffiliateAttributionMetadata_AdditionalProperties) AsAffiliateAttributionMetadata1() (AffiliateAttributionMetadata1, error)
- func (t AffiliateAttributionMetadata_AdditionalProperties) AsAffiliateAttributionMetadata2() (AffiliateAttributionMetadata2, error)
- func (t *AffiliateAttributionMetadata_AdditionalProperties) FromAffiliateAttributionMetadata0(v AffiliateAttributionMetadata0) error
- func (t *AffiliateAttributionMetadata_AdditionalProperties) FromAffiliateAttributionMetadata1(v AffiliateAttributionMetadata1) error
- func (t *AffiliateAttributionMetadata_AdditionalProperties) FromAffiliateAttributionMetadata2(v AffiliateAttributionMetadata2) error
- func (t AffiliateAttributionMetadata_AdditionalProperties) MarshalJSON() ([]byte, error)
- func (t *AffiliateAttributionMetadata_AdditionalProperties) MergeAffiliateAttributionMetadata0(v AffiliateAttributionMetadata0) error
- func (t *AffiliateAttributionMetadata_AdditionalProperties) MergeAffiliateAttributionMetadata1(v AffiliateAttributionMetadata1) error
- func (t *AffiliateAttributionMetadata_AdditionalProperties) MergeAffiliateAttributionMetadata2(v AffiliateAttributionMetadata2) error
- func (t *AffiliateAttributionMetadata_AdditionalProperties) UnmarshalJSON(b []byte) error
- type AffiliateAttributionSource
- type AffiliateAttributionSourceType
- type AffiliateAttributionTouchpoint
- type AppliedDiscount
- type AppliedDiscountMethod
- type AuthenticationMetadata
- type AuthenticationResult
- type Authorization
- type Buyer
- type BuyerAccountType
- type BuyerAuthenticationStatus
- type CancelCheckoutSessionJSONRequestBody
- type CancelCheckoutSessionParams
- type CancelSessionRequest
- type Capabilities
- type CapabilitiesExtensions0
- type CapabilitiesExtensions1
- type Capabilities_Extensions
- func (t Capabilities_Extensions) AsCapabilitiesExtensions0() (CapabilitiesExtensions0, error)
- func (t Capabilities_Extensions) AsCapabilitiesExtensions1() (CapabilitiesExtensions1, error)
- func (t *Capabilities_Extensions) FromCapabilitiesExtensions0(v CapabilitiesExtensions0) error
- func (t *Capabilities_Extensions) FromCapabilitiesExtensions1(v CapabilitiesExtensions1) error
- func (t Capabilities_Extensions) MarshalJSON() ([]byte, error)
- func (t *Capabilities_Extensions) MergeCapabilitiesExtensions0(v CapabilitiesExtensions0) error
- func (t *Capabilities_Extensions) MergeCapabilitiesExtensions1(v CapabilitiesExtensions1) error
- func (t *Capabilities_Extensions) UnmarshalJSON(b []byte) error
- type CheckoutHandler
- type CheckoutProvider
- type CheckoutSession
- type CheckoutSessionBase
- type CheckoutSessionBaseStatus
- type CheckoutSessionBase_FulfillmentOptions_Item
- func (t CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionDigital() (FulfillmentOptionDigital, error)
- func (t CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionLocalDelivery() (FulfillmentOptionLocalDelivery, error)
- func (t CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionPickup() (FulfillmentOptionPickup, error)
- func (t CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionShipping() (FulfillmentOptionShipping, error)
- func (t *CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionDigital(v FulfillmentOptionDigital) error
- func (t *CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionLocalDelivery(v FulfillmentOptionLocalDelivery) error
- func (t *CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionPickup(v FulfillmentOptionPickup) error
- func (t *CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionShipping(v FulfillmentOptionShipping) error
- func (t CheckoutSessionBase_FulfillmentOptions_Item) MarshalJSON() ([]byte, error)
- func (t *CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionDigital(v FulfillmentOptionDigital) error
- func (t *CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionLocalDelivery(v FulfillmentOptionLocalDelivery) error
- func (t *CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionPickup(v FulfillmentOptionPickup) error
- func (t *CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionShipping(v FulfillmentOptionShipping) error
- func (t *CheckoutSessionBase_FulfillmentOptions_Item) UnmarshalJSON(b []byte) error
- type CheckoutSessionBase_Messages_Item
- func (t CheckoutSessionBase_Messages_Item) AsMessageError() (MessageError, error)
- func (t CheckoutSessionBase_Messages_Item) AsMessageInfo() (MessageInfo, error)
- func (t CheckoutSessionBase_Messages_Item) AsMessageWarning() (MessageWarning, error)
- func (t *CheckoutSessionBase_Messages_Item) FromMessageError(v MessageError) error
- func (t *CheckoutSessionBase_Messages_Item) FromMessageInfo(v MessageInfo) error
- func (t *CheckoutSessionBase_Messages_Item) FromMessageWarning(v MessageWarning) error
- func (t CheckoutSessionBase_Messages_Item) MarshalJSON() ([]byte, error)
- func (t *CheckoutSessionBase_Messages_Item) MergeMessageError(v MessageError) error
- func (t *CheckoutSessionBase_Messages_Item) MergeMessageInfo(v MessageInfo) error
- func (t *CheckoutSessionBase_Messages_Item) MergeMessageWarning(v MessageWarning) error
- func (t *CheckoutSessionBase_Messages_Item) UnmarshalJSON(b []byte) error
- type CheckoutSessionCompleteRequest
- type CheckoutSessionCreateRequest
- type CheckoutSessionUpdateRequest
- type CheckoutSessionWithOrder
- type CheckoutSessionWithOrderStatus
- type CheckoutSessionWithOrder_FulfillmentOptions_Item
- func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionDigital() (FulfillmentOptionDigital, error)
- func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionLocalDelivery() (FulfillmentOptionLocalDelivery, error)
- func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionPickup() (FulfillmentOptionPickup, error)
- func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionShipping() (FulfillmentOptionShipping, error)
- func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionDigital(v FulfillmentOptionDigital) error
- func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionLocalDelivery(v FulfillmentOptionLocalDelivery) error
- func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionPickup(v FulfillmentOptionPickup) error
- func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionShipping(v FulfillmentOptionShipping) error
- func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) MarshalJSON() ([]byte, error)
- func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionDigital(v FulfillmentOptionDigital) error
- func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionLocalDelivery(v FulfillmentOptionLocalDelivery) error
- func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionPickup(v FulfillmentOptionPickup) error
- func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionShipping(v FulfillmentOptionShipping) error
- func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) UnmarshalJSON(b []byte) error
- type CheckoutSessionWithOrder_Messages_Item
- func (t CheckoutSessionWithOrder_Messages_Item) AsMessageError() (MessageError, error)
- func (t CheckoutSessionWithOrder_Messages_Item) AsMessageInfo() (MessageInfo, error)
- func (t CheckoutSessionWithOrder_Messages_Item) AsMessageWarning() (MessageWarning, error)
- func (t *CheckoutSessionWithOrder_Messages_Item) FromMessageError(v MessageError) error
- func (t *CheckoutSessionWithOrder_Messages_Item) FromMessageInfo(v MessageInfo) error
- func (t *CheckoutSessionWithOrder_Messages_Item) FromMessageWarning(v MessageWarning) error
- func (t CheckoutSessionWithOrder_Messages_Item) MarshalJSON() ([]byte, error)
- func (t *CheckoutSessionWithOrder_Messages_Item) MergeMessageError(v MessageError) error
- func (t *CheckoutSessionWithOrder_Messages_Item) MergeMessageInfo(v MessageInfo) error
- func (t *CheckoutSessionWithOrder_Messages_Item) MergeMessageWarning(v MessageWarning) error
- func (t *CheckoutSessionWithOrder_Messages_Item) UnmarshalJSON(b []byte) error
- type CompanyInfo
- type CompleteCheckoutSessionJSONRequestBody
- type CompleteCheckoutSessionParams
- type ContentType
- type Coupon
- type CouponDuration
- type CreateCheckoutSessionJSONRequestBody
- type CreateCheckoutSessionParams
- type CustomAttribute
- type DimensionsInfo
- type DimensionsInfoUnit
- type Disclosure
- type DisclosureContentType
- type DisclosureType
- type DiscountAllocation
- type DiscountDetail
- type DiscountDetailSource
- type DiscountDetailType
- type DiscountErrorCode
- type DiscountsRequest
- type DiscountsResponse
- type Error
- type ErrorType
- type EstimatedDelivery
- type EventData
- type EventDataType
- type ExtensionDeclaration
- type Fulfillment
- type FulfillmentDetails
- type FulfillmentGroup
- type FulfillmentGroupDestinationType
- type FulfillmentOptionDigital
- type FulfillmentOptionLocalDelivery
- type FulfillmentOptionPickup
- type FulfillmentOptionPickupPickupType
- type FulfillmentOptionShipping
- type GetCheckoutSessionParams
- type GiftWrap
- type GiftWrapStyle
- type HandlerError
- type IdempotencyKey
- type IntentTrace
- type IntentTraceMetadata0
- type IntentTraceMetadata1
- type IntentTraceMetadata2
- type IntentTraceReasonCode
- type IntentTrace_Metadata_AdditionalProperties
- func (t IntentTrace_Metadata_AdditionalProperties) AsIntentTraceMetadata0() (IntentTraceMetadata0, error)
- func (t IntentTrace_Metadata_AdditionalProperties) AsIntentTraceMetadata1() (IntentTraceMetadata1, error)
- func (t IntentTrace_Metadata_AdditionalProperties) AsIntentTraceMetadata2() (IntentTraceMetadata2, error)
- func (t *IntentTrace_Metadata_AdditionalProperties) FromIntentTraceMetadata0(v IntentTraceMetadata0) error
- func (t *IntentTrace_Metadata_AdditionalProperties) FromIntentTraceMetadata1(v IntentTraceMetadata1) error
- func (t *IntentTrace_Metadata_AdditionalProperties) FromIntentTraceMetadata2(v IntentTraceMetadata2) error
- func (t IntentTrace_Metadata_AdditionalProperties) MarshalJSON() ([]byte, error)
- func (t *IntentTrace_Metadata_AdditionalProperties) MergeIntentTraceMetadata0(v IntentTraceMetadata0) error
- func (t *IntentTrace_Metadata_AdditionalProperties) MergeIntentTraceMetadata1(v IntentTraceMetadata1) error
- func (t *IntentTrace_Metadata_AdditionalProperties) MergeIntentTraceMetadata2(v IntentTraceMetadata2) error
- func (t *IntentTrace_Metadata_AdditionalProperties) UnmarshalJSON(b []byte) error
- type InterventionCapabilities
- type InterventionCapabilitiesDisplayContext
- type InterventionCapabilitiesEnforcement
- type InterventionCapabilitiesRedirectContext
- type InterventionCapabilitiesRequired
- type InterventionCapabilitiesSupported
- type Item
- type LineItem
- type LineItemAvailabilityStatus
- type Link
- type LinkType
- type LoyaltyInfo
- type MarketplaceSellerDetails
- type MessageError
- type MessageErrorCode
- type MessageErrorContentType
- type MessageErrorSeverity
- type MessageInfo
- type MessageInfoContentType
- type MessageInfoSeverity
- type MessageWarning
- type MessageWarningCode
- type MessageWarningContentType
- type MessageWarningSeverity
- type Order
- type OrderConfirmation
- type OrderCreate
- type OrderLineItem
- type OrderStatus
- type OrderUpdated
- type Payment
- type PaymentData
- func (t PaymentData) AsPaymentData0() (PaymentData0, error)
- func (t PaymentData) AsPaymentData1() (PaymentData1, error)
- func (t *PaymentData) FromPaymentData0(v PaymentData0) error
- func (t *PaymentData) FromPaymentData1(v PaymentData1) error
- func (t PaymentData) MarshalJSON() ([]byte, error)
- func (t *PaymentData) MergePaymentData0(v PaymentData0) error
- func (t *PaymentData) MergePaymentData1(v PaymentData1) error
- func (t *PaymentData) UnmarshalJSON(b []byte) error
- type PaymentData0
- type PaymentData1
- type PaymentDataPaymentTerms
- type PaymentHandler
- type PaymentMethodObject
- type PaymentMethodObjectBrands
- type PaymentMethodObjectFundingTypes
- type PaymentResponse
- type ProtocolVersion
- type RejectedDiscount
- type RequestId
- type RiskSignals
- type SelectedFulfillmentOption
- type SelectedFulfillmentOptionType
- type Signature
- type SplitPayment
- type SupportInfo
- type TaxBreakdownItem
- type TaxExemption
- type TaxExemptionCertificateType
- type Timestamp
- type Total
- type TotalType
- type UpdateCheckoutSessionJSONRequestBody
- type UpdateCheckoutSessionParams
- type UserAgent
- type VariantOption
- type WebhookEventType
- type WebhookOption
- type WebhookSender
- type WeightInfo
- type WeightInfoUnit
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
// City City name
City string `json:"city"`
// Country ISO 3166-1 alpha-2 country code
Country string `json:"country"`
// LineOne Primary street address line
LineOne string `json:"line_one"`
// LineTwo Secondary address line (apartment, suite, etc.)
LineTwo *string `json:"line_two,omitempty"`
// Name Recipient name for this address
Name string `json:"name"`
// PostalCode Postal or ZIP code
PostalCode string `json:"postal_code"`
// State State or province code
State string `json:"state"`
}
Address defines model for Address.
type Adjustment ¶
type AffiliateAttribution ¶
type AffiliateAttribution struct {
// CampaignId Provider-scoped campaign identifier.
CampaignId *string `json:"campaign_id,omitempty"`
// CreativeId Provider-scoped creative identifier.
CreativeId *string `json:"creative_id,omitempty"`
// ExpiresAt RFC3339 timestamp when the attribution token expires.
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// IssuedAt RFC3339 timestamp when the attribution token was issued.
IssuedAt *time.Time `json:"issued_at,omitempty"`
// Metadata Flat key/value map for additional non-sensitive context.
// Keys must be strings; values must be strings, numbers, or booleans.
// Arrays and nested objects are NOT permitted.
Metadata *AffiliateAttributionMetadata `json:"metadata,omitempty"`
// Provider Identifier for the attribution provider / affiliate network namespace (e.g., 'impact.com').
Provider string `json:"provider"`
// PublisherId Provider-scoped affiliate/publisher identifier. Required if token is omitted.
PublisherId *string `json:"publisher_id,omitempty"`
// Source Context about where the attribution originated.
Source *AffiliateAttributionSource `json:"source,omitempty"`
// SubId Provider-scoped sub-tracking identifier.
SubId *string `json:"sub_id,omitempty"`
// Token Opaque provider-issued token for fraud-resistant validation. Treat as secret.
Token *string `json:"token,omitempty"`
// Touchpoint Attribution touchpoint type. Use 'first' when capturing at session creation,
// 'last' when capturing at completion. Enables multi-touch attribution models.
Touchpoint *AffiliateAttributionTouchpoint `json:"touchpoint,omitempty"`
// contains filtered or unexported fields
}
AffiliateAttribution Optional affiliate attribution data for crediting third-party publishers. Write-only: not returned in responses. See RFC: Affiliate Attribution.
Forward compatibility: Servers SHOULD ignore unknown fields to support future extensions (per RFC §8.2).
func (AffiliateAttribution) AsAffiliateAttribution0 ¶
func (t AffiliateAttribution) AsAffiliateAttribution0() (AffiliateAttribution0, error)
AsAffiliateAttribution0 returns the union data inside the AffiliateAttribution as a AffiliateAttribution0
func (AffiliateAttribution) AsAffiliateAttribution1 ¶
func (t AffiliateAttribution) AsAffiliateAttribution1() (AffiliateAttribution1, error)
AsAffiliateAttribution1 returns the union data inside the AffiliateAttribution as a AffiliateAttribution1
func (*AffiliateAttribution) FromAffiliateAttribution0 ¶
func (t *AffiliateAttribution) FromAffiliateAttribution0(v AffiliateAttribution0) error
FromAffiliateAttribution0 overwrites any union data inside the AffiliateAttribution as the provided AffiliateAttribution0
func (*AffiliateAttribution) FromAffiliateAttribution1 ¶
func (t *AffiliateAttribution) FromAffiliateAttribution1(v AffiliateAttribution1) error
FromAffiliateAttribution1 overwrites any union data inside the AffiliateAttribution as the provided AffiliateAttribution1
func (AffiliateAttribution) MarshalJSON ¶
func (t AffiliateAttribution) MarshalJSON() ([]byte, error)
func (*AffiliateAttribution) MergeAffiliateAttribution0 ¶
func (t *AffiliateAttribution) MergeAffiliateAttribution0(v AffiliateAttribution0) error
MergeAffiliateAttribution0 performs a merge with any union data inside the AffiliateAttribution, using the provided AffiliateAttribution0
func (*AffiliateAttribution) MergeAffiliateAttribution1 ¶
func (t *AffiliateAttribution) MergeAffiliateAttribution1(v AffiliateAttribution1) error
MergeAffiliateAttribution1 performs a merge with any union data inside the AffiliateAttribution, using the provided AffiliateAttribution1
func (*AffiliateAttribution) UnmarshalJSON ¶
func (t *AffiliateAttribution) UnmarshalJSON(b []byte) error
type AffiliateAttribution0 ¶
type AffiliateAttribution0 = interface{}
AffiliateAttribution0 defines model for .
type AffiliateAttribution1 ¶
type AffiliateAttribution1 = interface{}
AffiliateAttribution1 defines model for .
type AffiliateAttributionMetadata ¶
type AffiliateAttributionMetadata map[string]AffiliateAttributionMetadata_AdditionalProperties
AffiliateAttributionMetadata Flat key/value map for additional non-sensitive context. Keys must be strings; values must be strings, numbers, or booleans. Arrays and nested objects are NOT permitted.
type AffiliateAttributionMetadata0 ¶
type AffiliateAttributionMetadata0 = string
AffiliateAttributionMetadata0 defines model for .
type AffiliateAttributionMetadata1 ¶
type AffiliateAttributionMetadata1 = float32
AffiliateAttributionMetadata1 defines model for .
type AffiliateAttributionMetadata2 ¶
type AffiliateAttributionMetadata2 = bool
AffiliateAttributionMetadata2 defines model for .
type AffiliateAttributionMetadata_AdditionalProperties ¶
type AffiliateAttributionMetadata_AdditionalProperties struct {
// contains filtered or unexported fields
}
AffiliateAttributionMetadata_AdditionalProperties defines model for AffiliateAttributionMetadata.AdditionalProperties.
func (AffiliateAttributionMetadata_AdditionalProperties) AsAffiliateAttributionMetadata0 ¶
func (t AffiliateAttributionMetadata_AdditionalProperties) AsAffiliateAttributionMetadata0() (AffiliateAttributionMetadata0, error)
AsAffiliateAttributionMetadata0 returns the union data inside the AffiliateAttributionMetadata_AdditionalProperties as a AffiliateAttributionMetadata0
func (AffiliateAttributionMetadata_AdditionalProperties) AsAffiliateAttributionMetadata1 ¶
func (t AffiliateAttributionMetadata_AdditionalProperties) AsAffiliateAttributionMetadata1() (AffiliateAttributionMetadata1, error)
AsAffiliateAttributionMetadata1 returns the union data inside the AffiliateAttributionMetadata_AdditionalProperties as a AffiliateAttributionMetadata1
func (AffiliateAttributionMetadata_AdditionalProperties) AsAffiliateAttributionMetadata2 ¶
func (t AffiliateAttributionMetadata_AdditionalProperties) AsAffiliateAttributionMetadata2() (AffiliateAttributionMetadata2, error)
AsAffiliateAttributionMetadata2 returns the union data inside the AffiliateAttributionMetadata_AdditionalProperties as a AffiliateAttributionMetadata2
func (*AffiliateAttributionMetadata_AdditionalProperties) FromAffiliateAttributionMetadata0 ¶
func (t *AffiliateAttributionMetadata_AdditionalProperties) FromAffiliateAttributionMetadata0(v AffiliateAttributionMetadata0) error
FromAffiliateAttributionMetadata0 overwrites any union data inside the AffiliateAttributionMetadata_AdditionalProperties as the provided AffiliateAttributionMetadata0
func (*AffiliateAttributionMetadata_AdditionalProperties) FromAffiliateAttributionMetadata1 ¶
func (t *AffiliateAttributionMetadata_AdditionalProperties) FromAffiliateAttributionMetadata1(v AffiliateAttributionMetadata1) error
FromAffiliateAttributionMetadata1 overwrites any union data inside the AffiliateAttributionMetadata_AdditionalProperties as the provided AffiliateAttributionMetadata1
func (*AffiliateAttributionMetadata_AdditionalProperties) FromAffiliateAttributionMetadata2 ¶
func (t *AffiliateAttributionMetadata_AdditionalProperties) FromAffiliateAttributionMetadata2(v AffiliateAttributionMetadata2) error
FromAffiliateAttributionMetadata2 overwrites any union data inside the AffiliateAttributionMetadata_AdditionalProperties as the provided AffiliateAttributionMetadata2
func (AffiliateAttributionMetadata_AdditionalProperties) MarshalJSON ¶
func (t AffiliateAttributionMetadata_AdditionalProperties) MarshalJSON() ([]byte, error)
func (*AffiliateAttributionMetadata_AdditionalProperties) MergeAffiliateAttributionMetadata0 ¶
func (t *AffiliateAttributionMetadata_AdditionalProperties) MergeAffiliateAttributionMetadata0(v AffiliateAttributionMetadata0) error
MergeAffiliateAttributionMetadata0 performs a merge with any union data inside the AffiliateAttributionMetadata_AdditionalProperties, using the provided AffiliateAttributionMetadata0
func (*AffiliateAttributionMetadata_AdditionalProperties) MergeAffiliateAttributionMetadata1 ¶
func (t *AffiliateAttributionMetadata_AdditionalProperties) MergeAffiliateAttributionMetadata1(v AffiliateAttributionMetadata1) error
MergeAffiliateAttributionMetadata1 performs a merge with any union data inside the AffiliateAttributionMetadata_AdditionalProperties, using the provided AffiliateAttributionMetadata1
func (*AffiliateAttributionMetadata_AdditionalProperties) MergeAffiliateAttributionMetadata2 ¶
func (t *AffiliateAttributionMetadata_AdditionalProperties) MergeAffiliateAttributionMetadata2(v AffiliateAttributionMetadata2) error
MergeAffiliateAttributionMetadata2 performs a merge with any union data inside the AffiliateAttributionMetadata_AdditionalProperties, using the provided AffiliateAttributionMetadata2
func (*AffiliateAttributionMetadata_AdditionalProperties) UnmarshalJSON ¶
func (t *AffiliateAttributionMetadata_AdditionalProperties) UnmarshalJSON(b []byte) error
type AffiliateAttributionSource ¶
type AffiliateAttributionSource struct {
// Type The type of attribution source.
Type AffiliateAttributionSourceType `json:"type"`
// Url Canonical content URL when type is 'url'.
Url *string `json:"url,omitempty"`
}
AffiliateAttributionSource Context about where the attribution originated.
type AffiliateAttributionSourceType ¶
type AffiliateAttributionSourceType string
AffiliateAttributionSourceType The type of attribution source.
const ( Platform AffiliateAttributionSourceType = "platform" Unknown AffiliateAttributionSourceType = "unknown" Url AffiliateAttributionSourceType = "url" )
Defines values for AffiliateAttributionSourceType.
type AffiliateAttributionTouchpoint ¶
type AffiliateAttributionTouchpoint string
AffiliateAttributionTouchpoint Attribution touchpoint type. Use 'first' when capturing at session creation, 'last' when capturing at completion. Enables multi-touch attribution models.
const ( First AffiliateAttributionTouchpoint = "first" Last AffiliateAttributionTouchpoint = "last" )
Defines values for AffiliateAttributionTouchpoint.
type AppliedDiscount ¶
type AppliedDiscount struct {
// Allocations Breakdown of where this discount was allocated. Sum of allocation amounts equals total amount.
Allocations *[]DiscountAllocation `json:"allocations,omitempty"`
// Amount Total discount amount in minor (cents) currency units.
Amount int `json:"amount"`
// Automatic True if applied automatically by merchant rules (no code required).
Automatic *bool `json:"automatic,omitempty"`
// Code The discount code entered by the user. Omitted for automatic discounts.
Code *string `json:"code,omitempty"`
// Coupon Coupon details describing the discount terms.
Coupon Coupon `json:"coupon"`
// End RFC 3339 timestamp when the discount expires.
End *time.Time `json:"end,omitempty"`
// Id Unique identifier for this applied discount instance.
Id string `json:"id"`
// Method Allocation method. 'each' = applied independently per item. 'across' = split proportionally by value.
Method *AppliedDiscountMethod `json:"method,omitempty"`
// Priority Stacking order for discount calculation. Lower numbers applied first (1 = first).
Priority *int `json:"priority,omitempty"`
// Start RFC 3339 timestamp when the discount became active.
Start *time.Time `json:"start,omitempty"`
}
AppliedDiscount A discount that was successfully applied to the checkout session.
type AppliedDiscountMethod ¶
type AppliedDiscountMethod string
AppliedDiscountMethod Allocation method. 'each' = applied independently per item. 'across' = split proportionally by value.
const ( Across AppliedDiscountMethod = "across" Each AppliedDiscountMethod = "each" )
Defines values for AppliedDiscountMethod.
type AuthenticationMetadata ¶
type AuthenticationMetadata = interface{}
AuthenticationMetadata defines model for AuthenticationMetadata.
type AuthenticationResult ¶
type AuthenticationResult = interface{}
AuthenticationResult defines model for AuthenticationResult.
type Buyer ¶
type Buyer struct {
// AccountType Type of buyer account
AccountType *BuyerAccountType `json:"account_type,omitempty"`
// AuthenticationStatus Buyer's authentication status
AuthenticationStatus *BuyerAuthenticationStatus `json:"authentication_status,omitempty"`
Company *CompanyInfo `json:"company,omitempty"`
// CustomerId Merchant's internal customer identifier
CustomerId *string `json:"customer_id,omitempty"`
// Email Buyer's email address
Email openapi_types.Email `json:"email"`
// FirstName Buyer's first name
FirstName *string `json:"first_name,omitempty"`
// FullName Buyer's full name
FullName *string `json:"full_name,omitempty"`
// LastName Buyer's last name
LastName *string `json:"last_name,omitempty"`
Loyalty *LoyaltyInfo `json:"loyalty,omitempty"`
// PhoneNumber Buyer's phone number
PhoneNumber *string `json:"phone_number,omitempty"`
TaxExemption *TaxExemption `json:"tax_exemption,omitempty"`
}
Buyer defines model for Buyer.
type BuyerAccountType ¶
type BuyerAccountType string
BuyerAccountType Type of buyer account
const ( BuyerAccountTypeBusiness BuyerAccountType = "business" BuyerAccountTypeGuest BuyerAccountType = "guest" BuyerAccountTypeRegistered BuyerAccountType = "registered" )
Defines values for BuyerAccountType.
type BuyerAuthenticationStatus ¶
type BuyerAuthenticationStatus string
BuyerAuthenticationStatus Buyer's authentication status
const ( BuyerAuthenticationStatusAuthenticated BuyerAuthenticationStatus = "authenticated" BuyerAuthenticationStatusGuest BuyerAuthenticationStatus = "guest" BuyerAuthenticationStatusRequiresSignin BuyerAuthenticationStatus = "requires_signin" )
Defines values for BuyerAuthenticationStatus.
type CancelCheckoutSessionJSONRequestBody ¶
type CancelCheckoutSessionJSONRequestBody = CancelSessionRequest
CancelCheckoutSessionJSONRequestBody defines body for CancelCheckoutSession for application/json ContentType.
type CancelCheckoutSessionParams ¶
type CancelCheckoutSessionParams struct {
// Authorization Bearer token for API authentication
Authorization Authorization `json:"Authorization"`
// AcceptLanguage Preferred language for response messages
AcceptLanguage *AcceptLanguage `json:"Accept-Language,omitempty"`
// UserAgent Client application identifier
UserAgent *UserAgent `json:"User-Agent,omitempty"`
// IdempotencyKey Unique key to safely retry requests without duplicate processing
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
// RequestId Unique identifier for request tracking and debugging
RequestId *RequestId `json:"Request-Id,omitempty"`
// Signature HMAC signature for webhook verification
Signature *Signature `json:"Signature,omitempty"`
// Timestamp RFC 3339 date-time string for request timing validation
Timestamp *Timestamp `json:"Timestamp,omitempty"`
// APIVersion API version date in YYYY-MM-DD format
APIVersion APIVersion `json:"API-Version"`
}
CancelCheckoutSessionParams defines parameters for CancelCheckoutSession.
type CancelSessionRequest ¶
type CancelSessionRequest struct {
IntentTrace *IntentTrace `json:"intent_trace,omitempty"`
}
CancelSessionRequest defines model for CancelSessionRequest.
func (CancelSessionRequest) Validate ¶
func (r CancelSessionRequest) Validate() error
Validate performs additional runtime checks when requests are built in Go.
type Capabilities ¶
type Capabilities struct {
// Extensions Extensions supported by the party.
// Requests: array of extension identifiers.
// Responses: array of extension declaration objects.
Extensions *Capabilities_Extensions `json:"extensions,omitempty"`
// Interventions Intervention capabilities.
// Context-specific fields: display_context, redirect_context, max_redirects, max_interaction_depth (requests only).
// required, enforcement (responses only).
// supported field contains intersection in responses.
Interventions *InterventionCapabilities `json:"interventions,omitempty"`
// Payment Payment configuration with handlers
Payment *Payment `json:"payment,omitempty"`
}
Capabilities Capabilities object used in requests and responses. Context determines the party: requests are from Agents, responses are from Sellers. Seller responses contain the intersection of supported interventions.
type CapabilitiesExtensions0 ¶
type CapabilitiesExtensions0 = []string
CapabilitiesExtensions0 Extensions the agent understands (request). Simple identifiers like 'discount'.
type CapabilitiesExtensions1 ¶
type CapabilitiesExtensions1 = []ExtensionDeclaration
CapabilitiesExtensions1 Active extensions for this session (response). Objects with name, extends, schema, spec.
type Capabilities_Extensions ¶
type Capabilities_Extensions struct {
// contains filtered or unexported fields
}
Capabilities_Extensions Extensions supported by the party. Requests: array of extension identifiers. Responses: array of extension declaration objects.
func (Capabilities_Extensions) AsCapabilitiesExtensions0 ¶
func (t Capabilities_Extensions) AsCapabilitiesExtensions0() (CapabilitiesExtensions0, error)
AsCapabilitiesExtensions0 returns the union data inside the Capabilities_Extensions as a CapabilitiesExtensions0
func (Capabilities_Extensions) AsCapabilitiesExtensions1 ¶
func (t Capabilities_Extensions) AsCapabilitiesExtensions1() (CapabilitiesExtensions1, error)
AsCapabilitiesExtensions1 returns the union data inside the Capabilities_Extensions as a CapabilitiesExtensions1
func (*Capabilities_Extensions) FromCapabilitiesExtensions0 ¶
func (t *Capabilities_Extensions) FromCapabilitiesExtensions0(v CapabilitiesExtensions0) error
FromCapabilitiesExtensions0 overwrites any union data inside the Capabilities_Extensions as the provided CapabilitiesExtensions0
func (*Capabilities_Extensions) FromCapabilitiesExtensions1 ¶
func (t *Capabilities_Extensions) FromCapabilitiesExtensions1(v CapabilitiesExtensions1) error
FromCapabilitiesExtensions1 overwrites any union data inside the Capabilities_Extensions as the provided CapabilitiesExtensions1
func (Capabilities_Extensions) MarshalJSON ¶
func (t Capabilities_Extensions) MarshalJSON() ([]byte, error)
func (*Capabilities_Extensions) MergeCapabilitiesExtensions0 ¶
func (t *Capabilities_Extensions) MergeCapabilitiesExtensions0(v CapabilitiesExtensions0) error
MergeCapabilitiesExtensions0 performs a merge with any union data inside the Capabilities_Extensions, using the provided CapabilitiesExtensions0
func (*Capabilities_Extensions) MergeCapabilitiesExtensions1 ¶
func (t *Capabilities_Extensions) MergeCapabilitiesExtensions1(v CapabilitiesExtensions1) error
MergeCapabilitiesExtensions1 performs a merge with any union data inside the Capabilities_Extensions, using the provided CapabilitiesExtensions1
func (*Capabilities_Extensions) UnmarshalJSON ¶
func (t *Capabilities_Extensions) UnmarshalJSON(b []byte) error
type CheckoutHandler ¶
type CheckoutHandler struct {
// contains filtered or unexported fields
}
CheckoutHandler wires ACP checkout routes to a CheckoutProvider.
func NewCheckoutHandler ¶
func NewCheckoutHandler(service CheckoutProvider) *CheckoutHandler
func (*CheckoutHandler) GetWebhookSender ¶
func (h *CheckoutHandler) GetWebhookSender(endpoint, merchantName string, secret []byte, opts ...WebhookOption) (WebhookSender, error)
GetWebhookSender returns a configued WebhookSender that allows your implementation to deliver webhooks back to the agent.
Parameters:
- endpoint is the absolute URL provided by OpenAI for receiving webhook events.
- merchantName controls the signature header name (the header name is Merchant_Name-Signature).
- secret is the HMAC secret provided by OpenAI for signing webhook payloads.
func (*CheckoutHandler) ServeHTTP ¶
func (h *CheckoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type CheckoutProvider ¶
type CheckoutProvider interface {
CreateSession(ctx context.Context, req CheckoutSessionCreateRequest) (*CheckoutSessionBase, error)
UpdateSession(ctx context.Context, id string, req CheckoutSessionUpdateRequest) (*CheckoutSessionBase, error)
GetSession(ctx context.Context, id string) (*CheckoutSessionBase, error)
CompleteSession(ctx context.Context, id string, req CheckoutSessionCompleteRequest) (CheckoutSessionWithOrder, error)
CancelSession(ctx context.Context, id string, req *CancelSessionRequest) (*CheckoutSessionBase, error)
}
CheckoutProvider is implemented by business logic that owns checkout sessions.
type CheckoutSession ¶
type CheckoutSession = CheckoutSessionBase
CheckoutSession defines model for CheckoutSession.
type CheckoutSessionBase ¶
type CheckoutSessionBase struct {
// AuthenticationMetadata Seller-provided authentication metadata for 3DS flows.
AuthenticationMetadata *AuthenticationMetadata `json:"authentication_metadata,omitempty"`
Buyer *Buyer `json:"buyer,omitempty"`
// Capabilities Capabilities object used in requests and responses.
// Context determines the party: requests are from Agents, responses are from Sellers.
// Seller responses contain the intersection of supported interventions.
Capabilities Capabilities `json:"capabilities"`
// ContinueUrl URL to continue or resume the checkout session
ContinueUrl *string `json:"continue_url,omitempty"`
// CreatedAt RFC 3339 timestamp when the session was created
CreatedAt *time.Time `json:"created_at,omitempty"`
// Currency ISO 4217 settlement currency code
Currency string `json:"currency"`
// Discounts Discount codes input and applied discounts output in checkout responses.
Discounts *DiscountsResponse `json:"discounts,omitempty"`
// ExchangeRate Exchange rate from presentment to settlement currency
ExchangeRate *float32 `json:"exchange_rate,omitempty"`
// ExchangeRateTimestamp RFC 3339 timestamp when exchange rate was determined
ExchangeRateTimestamp *time.Time `json:"exchange_rate_timestamp,omitempty"`
// ExpiresAt RFC 3339 timestamp when the session expires
ExpiresAt *time.Time `json:"expires_at,omitempty"`
FulfillmentDetails *FulfillmentDetails `json:"fulfillment_details,omitempty"`
// FulfillmentGroups Grouping of line items by fulfillment method
FulfillmentGroups *[]FulfillmentGroup `json:"fulfillment_groups,omitempty"`
// FulfillmentOptions Available fulfillment options
FulfillmentOptions []CheckoutSessionBase_FulfillmentOptions_Item `json:"fulfillment_options"`
// Id Unique identifier for the checkout session
Id string `json:"id"`
// LineItems Line items in the checkout session
LineItems []LineItem `json:"line_items"`
// Links Relevant links (terms, policies, support)
Links []Link `json:"links"`
// Locale Locale code (e.g., 'en-US') for localizing content
Locale *string `json:"locale,omitempty"`
// Messages Messages to communicate with the buyer (info, warnings, errors)
Messages []CheckoutSessionBase_Messages_Item `json:"messages"`
// Metadata Arbitrary metadata for merchant use
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// PresentmentCurrency ISO 4217 presentment currency code if different from settlement currency
PresentmentCurrency *string `json:"presentment_currency,omitempty"`
// Protocol Protocol metadata included in checkout responses. Indicates the ACP version.
Protocol *ProtocolVersion `json:"protocol,omitempty"`
// QuoteExpiresAt RFC 3339 timestamp when the quote expires
QuoteExpiresAt *time.Time `json:"quote_expires_at,omitempty"`
// QuoteId Quote identifier if this session is based on a quote
QuoteId *string `json:"quote_id,omitempty"`
// SelectedFulfillmentOptions Currently selected fulfillment options
SelectedFulfillmentOptions *[]SelectedFulfillmentOption `json:"selected_fulfillment_options,omitempty"`
// Status Current status of the checkout session
Status CheckoutSessionBaseStatus `json:"status"`
// Timezone IANA timezone identifier (e.g., 'America/New_York')
Timezone *string `json:"timezone,omitempty"`
// Totals Cart-level totals breakdown
Totals []Total `json:"totals"`
// UpdatedAt RFC 3339 timestamp of last update
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
CheckoutSessionBase defines model for CheckoutSessionBase.
type CheckoutSessionBaseStatus ¶
type CheckoutSessionBaseStatus string
CheckoutSessionBaseStatus Current status of the checkout session
const ( CheckoutSessionBaseStatusAuthenticationRequired CheckoutSessionBaseStatus = "authentication_required" CheckoutSessionBaseStatusCanceled CheckoutSessionBaseStatus = "canceled" CheckoutSessionBaseStatusCompleteInProgress CheckoutSessionBaseStatus = "complete_in_progress" CheckoutSessionBaseStatusCompleted CheckoutSessionBaseStatus = "completed" CheckoutSessionBaseStatusExpired CheckoutSessionBaseStatus = "expired" CheckoutSessionBaseStatusInProgress CheckoutSessionBaseStatus = "in_progress" CheckoutSessionBaseStatusIncomplete CheckoutSessionBaseStatus = "incomplete" CheckoutSessionBaseStatusNotReadyForPayment CheckoutSessionBaseStatus = "not_ready_for_payment" CheckoutSessionBaseStatusPendingApproval CheckoutSessionBaseStatus = "pending_approval" CheckoutSessionBaseStatusReadyForPayment CheckoutSessionBaseStatus = "ready_for_payment" CheckoutSessionBaseStatusRequiresEscalation CheckoutSessionBaseStatus = "requires_escalation" )
Defines values for CheckoutSessionBaseStatus.
type CheckoutSessionBase_FulfillmentOptions_Item ¶
type CheckoutSessionBase_FulfillmentOptions_Item struct {
// contains filtered or unexported fields
}
CheckoutSessionBase_FulfillmentOptions_Item defines model for CheckoutSessionBase.fulfillment_options.Item.
func (CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionDigital ¶
func (t CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionDigital() (FulfillmentOptionDigital, error)
AsFulfillmentOptionDigital returns the union data inside the CheckoutSessionBase_FulfillmentOptions_Item as a FulfillmentOptionDigital
func (CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionLocalDelivery ¶
func (t CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionLocalDelivery() (FulfillmentOptionLocalDelivery, error)
AsFulfillmentOptionLocalDelivery returns the union data inside the CheckoutSessionBase_FulfillmentOptions_Item as a FulfillmentOptionLocalDelivery
func (CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionPickup ¶
func (t CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionPickup() (FulfillmentOptionPickup, error)
AsFulfillmentOptionPickup returns the union data inside the CheckoutSessionBase_FulfillmentOptions_Item as a FulfillmentOptionPickup
func (CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionShipping ¶
func (t CheckoutSessionBase_FulfillmentOptions_Item) AsFulfillmentOptionShipping() (FulfillmentOptionShipping, error)
AsFulfillmentOptionShipping returns the union data inside the CheckoutSessionBase_FulfillmentOptions_Item as a FulfillmentOptionShipping
func (*CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionDigital ¶
func (t *CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionDigital(v FulfillmentOptionDigital) error
FromFulfillmentOptionDigital overwrites any union data inside the CheckoutSessionBase_FulfillmentOptions_Item as the provided FulfillmentOptionDigital
func (*CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionLocalDelivery ¶
func (t *CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionLocalDelivery(v FulfillmentOptionLocalDelivery) error
FromFulfillmentOptionLocalDelivery overwrites any union data inside the CheckoutSessionBase_FulfillmentOptions_Item as the provided FulfillmentOptionLocalDelivery
func (*CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionPickup ¶
func (t *CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionPickup(v FulfillmentOptionPickup) error
FromFulfillmentOptionPickup overwrites any union data inside the CheckoutSessionBase_FulfillmentOptions_Item as the provided FulfillmentOptionPickup
func (*CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionShipping ¶
func (t *CheckoutSessionBase_FulfillmentOptions_Item) FromFulfillmentOptionShipping(v FulfillmentOptionShipping) error
FromFulfillmentOptionShipping overwrites any union data inside the CheckoutSessionBase_FulfillmentOptions_Item as the provided FulfillmentOptionShipping
func (CheckoutSessionBase_FulfillmentOptions_Item) MarshalJSON ¶
func (t CheckoutSessionBase_FulfillmentOptions_Item) MarshalJSON() ([]byte, error)
func (*CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionDigital ¶
func (t *CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionDigital(v FulfillmentOptionDigital) error
MergeFulfillmentOptionDigital performs a merge with any union data inside the CheckoutSessionBase_FulfillmentOptions_Item, using the provided FulfillmentOptionDigital
func (*CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionLocalDelivery ¶
func (t *CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionLocalDelivery(v FulfillmentOptionLocalDelivery) error
MergeFulfillmentOptionLocalDelivery performs a merge with any union data inside the CheckoutSessionBase_FulfillmentOptions_Item, using the provided FulfillmentOptionLocalDelivery
func (*CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionPickup ¶
func (t *CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionPickup(v FulfillmentOptionPickup) error
MergeFulfillmentOptionPickup performs a merge with any union data inside the CheckoutSessionBase_FulfillmentOptions_Item, using the provided FulfillmentOptionPickup
func (*CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionShipping ¶
func (t *CheckoutSessionBase_FulfillmentOptions_Item) MergeFulfillmentOptionShipping(v FulfillmentOptionShipping) error
MergeFulfillmentOptionShipping performs a merge with any union data inside the CheckoutSessionBase_FulfillmentOptions_Item, using the provided FulfillmentOptionShipping
func (*CheckoutSessionBase_FulfillmentOptions_Item) UnmarshalJSON ¶
func (t *CheckoutSessionBase_FulfillmentOptions_Item) UnmarshalJSON(b []byte) error
type CheckoutSessionBase_Messages_Item ¶
type CheckoutSessionBase_Messages_Item struct {
// contains filtered or unexported fields
}
CheckoutSessionBase_Messages_Item defines model for CheckoutSessionBase.messages.Item.
func (CheckoutSessionBase_Messages_Item) AsMessageError ¶
func (t CheckoutSessionBase_Messages_Item) AsMessageError() (MessageError, error)
AsMessageError returns the union data inside the CheckoutSessionBase_Messages_Item as a MessageError
func (CheckoutSessionBase_Messages_Item) AsMessageInfo ¶
func (t CheckoutSessionBase_Messages_Item) AsMessageInfo() (MessageInfo, error)
AsMessageInfo returns the union data inside the CheckoutSessionBase_Messages_Item as a MessageInfo
func (CheckoutSessionBase_Messages_Item) AsMessageWarning ¶
func (t CheckoutSessionBase_Messages_Item) AsMessageWarning() (MessageWarning, error)
AsMessageWarning returns the union data inside the CheckoutSessionBase_Messages_Item as a MessageWarning
func (*CheckoutSessionBase_Messages_Item) FromMessageError ¶
func (t *CheckoutSessionBase_Messages_Item) FromMessageError(v MessageError) error
FromMessageError overwrites any union data inside the CheckoutSessionBase_Messages_Item as the provided MessageError
func (*CheckoutSessionBase_Messages_Item) FromMessageInfo ¶
func (t *CheckoutSessionBase_Messages_Item) FromMessageInfo(v MessageInfo) error
FromMessageInfo overwrites any union data inside the CheckoutSessionBase_Messages_Item as the provided MessageInfo
func (*CheckoutSessionBase_Messages_Item) FromMessageWarning ¶
func (t *CheckoutSessionBase_Messages_Item) FromMessageWarning(v MessageWarning) error
FromMessageWarning overwrites any union data inside the CheckoutSessionBase_Messages_Item as the provided MessageWarning
func (CheckoutSessionBase_Messages_Item) MarshalJSON ¶
func (t CheckoutSessionBase_Messages_Item) MarshalJSON() ([]byte, error)
func (*CheckoutSessionBase_Messages_Item) MergeMessageError ¶
func (t *CheckoutSessionBase_Messages_Item) MergeMessageError(v MessageError) error
MergeMessageError performs a merge with any union data inside the CheckoutSessionBase_Messages_Item, using the provided MessageError
func (*CheckoutSessionBase_Messages_Item) MergeMessageInfo ¶
func (t *CheckoutSessionBase_Messages_Item) MergeMessageInfo(v MessageInfo) error
MergeMessageInfo performs a merge with any union data inside the CheckoutSessionBase_Messages_Item, using the provided MessageInfo
func (*CheckoutSessionBase_Messages_Item) MergeMessageWarning ¶
func (t *CheckoutSessionBase_Messages_Item) MergeMessageWarning(v MessageWarning) error
MergeMessageWarning performs a merge with any union data inside the CheckoutSessionBase_Messages_Item, using the provided MessageWarning
func (*CheckoutSessionBase_Messages_Item) UnmarshalJSON ¶
func (t *CheckoutSessionBase_Messages_Item) UnmarshalJSON(b []byte) error
type CheckoutSessionCompleteRequest ¶
type CheckoutSessionCompleteRequest struct {
// AffiliateAttribution Optional affiliate attribution data for crediting third-party publishers.
// Write-only: not returned in responses. See RFC: Affiliate Attribution.
//
// Forward compatibility: Servers SHOULD ignore unknown fields to support future extensions (per RFC §8.2).
AffiliateAttribution *AffiliateAttribution `json:"affiliate_attribution,omitempty"`
// AuthenticationResult Agent-provided authentication results returned to the seller for card-based 3D Secure.
AuthenticationResult *AuthenticationResult `json:"authentication_result,omitempty"`
Buyer *Buyer `json:"buyer,omitempty"`
PaymentData PaymentData `json:"payment_data"`
RiskSignals *RiskSignals `json:"risk_signals,omitempty"`
}
CheckoutSessionCompleteRequest defines model for CheckoutSessionCompleteRequest.
func (CheckoutSessionCompleteRequest) Validate ¶
func (r CheckoutSessionCompleteRequest) Validate() error
Validate performs additional runtime checks when requests are built in Go.
type CheckoutSessionCreateRequest ¶
type CheckoutSessionCreateRequest struct {
// AffiliateAttribution Optional affiliate attribution data for crediting third-party publishers.
// Write-only: not returned in responses. See RFC: Affiliate Attribution.
//
// Forward compatibility: Servers SHOULD ignore unknown fields to support future extensions (per RFC §8.2).
AffiliateAttribution *AffiliateAttribution `json:"affiliate_attribution,omitempty"`
Buyer *Buyer `json:"buyer,omitempty"`
// Capabilities Capabilities object used in requests and responses.
// Context determines the party: requests are from Agents, responses are from Sellers.
// Seller responses contain the intersection of supported interventions.
Capabilities Capabilities `json:"capabilities"`
// Coupons DEPRECATED: Use discounts.codes instead. Discount codes to apply.
Coupons *[]string `json:"coupons,omitempty"`
// Currency ISO 4217 currency code
Currency string `json:"currency"`
// Discounts Discount codes input for checkout create/update requests.
Discounts *DiscountsRequest `json:"discounts,omitempty"`
FulfillmentDetails *FulfillmentDetails `json:"fulfillment_details,omitempty"`
// FulfillmentGroups Grouping of items by fulfillment method
FulfillmentGroups *[]FulfillmentGroup `json:"fulfillment_groups,omitempty"`
// LineItems Items to add to the checkout session
LineItems []Item `json:"line_items"`
// Locale Locale code for localizing content (e.g., 'en-US')
Locale *string `json:"locale,omitempty"`
// Metadata Arbitrary metadata for merchant use
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// QuoteId Quote identifier if this session is based on a quote
QuoteId *string `json:"quote_id,omitempty"`
// Timezone IANA timezone identifier (e.g., 'America/New_York')
Timezone *string `json:"timezone,omitempty"`
}
CheckoutSessionCreateRequest defines model for CheckoutSessionCreateRequest.
func (CheckoutSessionCreateRequest) Validate ¶
func (r CheckoutSessionCreateRequest) Validate() error
Validate performs additional runtime checks when requests are built in Go (JSON unmarshalling already enforces schema constraints).
type CheckoutSessionUpdateRequest ¶
type CheckoutSessionUpdateRequest struct {
Buyer *Buyer `json:"buyer,omitempty"`
// Coupons DEPRECATED: Use discounts.codes instead. Discount codes to apply.
Coupons *[]string `json:"coupons,omitempty"`
// Discounts Discount codes input for checkout create/update requests.
Discounts *DiscountsRequest `json:"discounts,omitempty"`
FulfillmentDetails *FulfillmentDetails `json:"fulfillment_details,omitempty"`
// FulfillmentGroups Updated fulfillment groupings
FulfillmentGroups *[]FulfillmentGroup `json:"fulfillment_groups,omitempty"`
// LineItems Items to update in the checkout session
LineItems *[]Item `json:"line_items,omitempty"`
// SelectedFulfillmentOptions Fulfillment option selected by the buyer
SelectedFulfillmentOptions *[]SelectedFulfillmentOption `json:"selected_fulfillment_options,omitempty"`
}
CheckoutSessionUpdateRequest defines model for CheckoutSessionUpdateRequest.
func (CheckoutSessionUpdateRequest) Validate ¶
func (r CheckoutSessionUpdateRequest) Validate() error
Validate performs additional runtime checks when requests are built in Go.
type CheckoutSessionWithOrder ¶
type CheckoutSessionWithOrder struct {
// AuthenticationMetadata Seller-provided authentication metadata for 3DS flows.
AuthenticationMetadata *AuthenticationMetadata `json:"authentication_metadata,omitempty"`
Buyer *Buyer `json:"buyer,omitempty"`
// Capabilities Capabilities object used in requests and responses.
// Context determines the party: requests are from Agents, responses are from Sellers.
// Seller responses contain the intersection of supported interventions.
Capabilities Capabilities `json:"capabilities"`
// ContinueUrl URL to continue or resume the checkout session
ContinueUrl *string `json:"continue_url,omitempty"`
// CreatedAt RFC 3339 timestamp when the session was created
CreatedAt *time.Time `json:"created_at,omitempty"`
// Currency ISO 4217 settlement currency code
Currency string `json:"currency"`
// Discounts Discount codes input and applied discounts output in checkout responses.
Discounts *DiscountsResponse `json:"discounts,omitempty"`
// ExchangeRate Exchange rate from presentment to settlement currency
ExchangeRate *float32 `json:"exchange_rate,omitempty"`
// ExchangeRateTimestamp RFC 3339 timestamp when exchange rate was determined
ExchangeRateTimestamp *time.Time `json:"exchange_rate_timestamp,omitempty"`
// ExpiresAt RFC 3339 timestamp when the session expires
ExpiresAt *time.Time `json:"expires_at,omitempty"`
FulfillmentDetails *FulfillmentDetails `json:"fulfillment_details,omitempty"`
// FulfillmentGroups Grouping of line items by fulfillment method
FulfillmentGroups *[]FulfillmentGroup `json:"fulfillment_groups,omitempty"`
// FulfillmentOptions Available fulfillment options
FulfillmentOptions []CheckoutSessionWithOrder_FulfillmentOptions_Item `json:"fulfillment_options"`
// Id Unique identifier for the checkout session
Id string `json:"id"`
// LineItems Line items in the checkout session
LineItems []LineItem `json:"line_items"`
// Links Relevant links (terms, policies, support)
Links []Link `json:"links"`
// Locale Locale code (e.g., 'en-US') for localizing content
Locale *string `json:"locale,omitempty"`
// Messages Messages to communicate with the buyer (info, warnings, errors)
Messages []CheckoutSessionWithOrder_Messages_Item `json:"messages"`
// Metadata Arbitrary metadata for merchant use
Metadata *map[string]interface{} `json:"metadata,omitempty"`
Order Order `json:"order"`
// PresentmentCurrency ISO 4217 presentment currency code if different from settlement currency
PresentmentCurrency *string `json:"presentment_currency,omitempty"`
// Protocol Protocol metadata included in checkout responses. Indicates the ACP version.
Protocol *ProtocolVersion `json:"protocol,omitempty"`
// QuoteExpiresAt RFC 3339 timestamp when the quote expires
QuoteExpiresAt *time.Time `json:"quote_expires_at,omitempty"`
// QuoteId Quote identifier if this session is based on a quote
QuoteId *string `json:"quote_id,omitempty"`
// SelectedFulfillmentOptions Currently selected fulfillment options
SelectedFulfillmentOptions *[]SelectedFulfillmentOption `json:"selected_fulfillment_options,omitempty"`
// Status Current status of the checkout session
Status CheckoutSessionWithOrderStatus `json:"status"`
// Timezone IANA timezone identifier (e.g., 'America/New_York')
Timezone *string `json:"timezone,omitempty"`
// Totals Cart-level totals breakdown
Totals []Total `json:"totals"`
// UpdatedAt RFC 3339 timestamp of last update
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
CheckoutSessionWithOrder defines model for CheckoutSessionWithOrder.
type CheckoutSessionWithOrderStatus ¶
type CheckoutSessionWithOrderStatus string
CheckoutSessionWithOrderStatus Current status of the checkout session
const ( CheckoutSessionWithOrderStatusAuthenticationRequired CheckoutSessionWithOrderStatus = "authentication_required" CheckoutSessionWithOrderStatusCanceled CheckoutSessionWithOrderStatus = "canceled" CheckoutSessionWithOrderStatusCompleteInProgress CheckoutSessionWithOrderStatus = "complete_in_progress" CheckoutSessionWithOrderStatusCompleted CheckoutSessionWithOrderStatus = "completed" CheckoutSessionWithOrderStatusExpired CheckoutSessionWithOrderStatus = "expired" CheckoutSessionWithOrderStatusInProgress CheckoutSessionWithOrderStatus = "in_progress" CheckoutSessionWithOrderStatusIncomplete CheckoutSessionWithOrderStatus = "incomplete" CheckoutSessionWithOrderStatusNotReadyForPayment CheckoutSessionWithOrderStatus = "not_ready_for_payment" CheckoutSessionWithOrderStatusPendingApproval CheckoutSessionWithOrderStatus = "pending_approval" CheckoutSessionWithOrderStatusReadyForPayment CheckoutSessionWithOrderStatus = "ready_for_payment" CheckoutSessionWithOrderStatusRequiresEscalation CheckoutSessionWithOrderStatus = "requires_escalation" )
Defines values for CheckoutSessionWithOrderStatus.
type CheckoutSessionWithOrder_FulfillmentOptions_Item ¶
type CheckoutSessionWithOrder_FulfillmentOptions_Item struct {
// contains filtered or unexported fields
}
CheckoutSessionWithOrder_FulfillmentOptions_Item defines model for CheckoutSessionWithOrder.fulfillment_options.Item.
func (CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionDigital ¶
func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionDigital() (FulfillmentOptionDigital, error)
AsFulfillmentOptionDigital returns the union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item as a FulfillmentOptionDigital
func (CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionLocalDelivery ¶
func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionLocalDelivery() (FulfillmentOptionLocalDelivery, error)
AsFulfillmentOptionLocalDelivery returns the union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item as a FulfillmentOptionLocalDelivery
func (CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionPickup ¶
func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionPickup() (FulfillmentOptionPickup, error)
AsFulfillmentOptionPickup returns the union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item as a FulfillmentOptionPickup
func (CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionShipping ¶
func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) AsFulfillmentOptionShipping() (FulfillmentOptionShipping, error)
AsFulfillmentOptionShipping returns the union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item as a FulfillmentOptionShipping
func (*CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionDigital ¶
func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionDigital(v FulfillmentOptionDigital) error
FromFulfillmentOptionDigital overwrites any union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item as the provided FulfillmentOptionDigital
func (*CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionLocalDelivery ¶
func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionLocalDelivery(v FulfillmentOptionLocalDelivery) error
FromFulfillmentOptionLocalDelivery overwrites any union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item as the provided FulfillmentOptionLocalDelivery
func (*CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionPickup ¶
func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionPickup(v FulfillmentOptionPickup) error
FromFulfillmentOptionPickup overwrites any union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item as the provided FulfillmentOptionPickup
func (*CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionShipping ¶
func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) FromFulfillmentOptionShipping(v FulfillmentOptionShipping) error
FromFulfillmentOptionShipping overwrites any union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item as the provided FulfillmentOptionShipping
func (CheckoutSessionWithOrder_FulfillmentOptions_Item) MarshalJSON ¶
func (t CheckoutSessionWithOrder_FulfillmentOptions_Item) MarshalJSON() ([]byte, error)
func (*CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionDigital ¶
func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionDigital(v FulfillmentOptionDigital) error
MergeFulfillmentOptionDigital performs a merge with any union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item, using the provided FulfillmentOptionDigital
func (*CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionLocalDelivery ¶
func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionLocalDelivery(v FulfillmentOptionLocalDelivery) error
MergeFulfillmentOptionLocalDelivery performs a merge with any union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item, using the provided FulfillmentOptionLocalDelivery
func (*CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionPickup ¶
func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionPickup(v FulfillmentOptionPickup) error
MergeFulfillmentOptionPickup performs a merge with any union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item, using the provided FulfillmentOptionPickup
func (*CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionShipping ¶
func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) MergeFulfillmentOptionShipping(v FulfillmentOptionShipping) error
MergeFulfillmentOptionShipping performs a merge with any union data inside the CheckoutSessionWithOrder_FulfillmentOptions_Item, using the provided FulfillmentOptionShipping
func (*CheckoutSessionWithOrder_FulfillmentOptions_Item) UnmarshalJSON ¶
func (t *CheckoutSessionWithOrder_FulfillmentOptions_Item) UnmarshalJSON(b []byte) error
type CheckoutSessionWithOrder_Messages_Item ¶
type CheckoutSessionWithOrder_Messages_Item struct {
// contains filtered or unexported fields
}
CheckoutSessionWithOrder_Messages_Item defines model for CheckoutSessionWithOrder.messages.Item.
func (CheckoutSessionWithOrder_Messages_Item) AsMessageError ¶
func (t CheckoutSessionWithOrder_Messages_Item) AsMessageError() (MessageError, error)
AsMessageError returns the union data inside the CheckoutSessionWithOrder_Messages_Item as a MessageError
func (CheckoutSessionWithOrder_Messages_Item) AsMessageInfo ¶
func (t CheckoutSessionWithOrder_Messages_Item) AsMessageInfo() (MessageInfo, error)
AsMessageInfo returns the union data inside the CheckoutSessionWithOrder_Messages_Item as a MessageInfo
func (CheckoutSessionWithOrder_Messages_Item) AsMessageWarning ¶
func (t CheckoutSessionWithOrder_Messages_Item) AsMessageWarning() (MessageWarning, error)
AsMessageWarning returns the union data inside the CheckoutSessionWithOrder_Messages_Item as a MessageWarning
func (*CheckoutSessionWithOrder_Messages_Item) FromMessageError ¶
func (t *CheckoutSessionWithOrder_Messages_Item) FromMessageError(v MessageError) error
FromMessageError overwrites any union data inside the CheckoutSessionWithOrder_Messages_Item as the provided MessageError
func (*CheckoutSessionWithOrder_Messages_Item) FromMessageInfo ¶
func (t *CheckoutSessionWithOrder_Messages_Item) FromMessageInfo(v MessageInfo) error
FromMessageInfo overwrites any union data inside the CheckoutSessionWithOrder_Messages_Item as the provided MessageInfo
func (*CheckoutSessionWithOrder_Messages_Item) FromMessageWarning ¶
func (t *CheckoutSessionWithOrder_Messages_Item) FromMessageWarning(v MessageWarning) error
FromMessageWarning overwrites any union data inside the CheckoutSessionWithOrder_Messages_Item as the provided MessageWarning
func (CheckoutSessionWithOrder_Messages_Item) MarshalJSON ¶
func (t CheckoutSessionWithOrder_Messages_Item) MarshalJSON() ([]byte, error)
func (*CheckoutSessionWithOrder_Messages_Item) MergeMessageError ¶
func (t *CheckoutSessionWithOrder_Messages_Item) MergeMessageError(v MessageError) error
MergeMessageError performs a merge with any union data inside the CheckoutSessionWithOrder_Messages_Item, using the provided MessageError
func (*CheckoutSessionWithOrder_Messages_Item) MergeMessageInfo ¶
func (t *CheckoutSessionWithOrder_Messages_Item) MergeMessageInfo(v MessageInfo) error
MergeMessageInfo performs a merge with any union data inside the CheckoutSessionWithOrder_Messages_Item, using the provided MessageInfo
func (*CheckoutSessionWithOrder_Messages_Item) MergeMessageWarning ¶
func (t *CheckoutSessionWithOrder_Messages_Item) MergeMessageWarning(v MessageWarning) error
MergeMessageWarning performs a merge with any union data inside the CheckoutSessionWithOrder_Messages_Item, using the provided MessageWarning
func (*CheckoutSessionWithOrder_Messages_Item) UnmarshalJSON ¶
func (t *CheckoutSessionWithOrder_Messages_Item) UnmarshalJSON(b []byte) error
type CompanyInfo ¶
type CompanyInfo struct {
// CostCenter Cost center code for internal accounting
CostCenter *string `json:"cost_center,omitempty"`
// Department Department within the organization
Department *string `json:"department,omitempty"`
// Name Company or organization name
Name string `json:"name"`
// TaxId Business tax identification number
TaxId *string `json:"tax_id,omitempty"`
}
CompanyInfo defines model for CompanyInfo.
type CompleteCheckoutSessionJSONRequestBody ¶
type CompleteCheckoutSessionJSONRequestBody = CheckoutSessionCompleteRequest
CompleteCheckoutSessionJSONRequestBody defines body for CompleteCheckoutSession for application/json ContentType.
type CompleteCheckoutSessionParams ¶
type CompleteCheckoutSessionParams struct {
// Authorization Bearer token for API authentication
Authorization Authorization `json:"Authorization"`
// ContentType Must be application/json for requests with a body
ContentType ContentType `json:"Content-Type"`
// AcceptLanguage Preferred language for response messages
AcceptLanguage *AcceptLanguage `json:"Accept-Language,omitempty"`
// UserAgent Client application identifier
UserAgent *UserAgent `json:"User-Agent,omitempty"`
// IdempotencyKey Unique key to safely retry requests without duplicate processing
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
// RequestId Unique identifier for request tracking and debugging
RequestId *RequestId `json:"Request-Id,omitempty"`
// Signature HMAC signature for webhook verification
Signature *Signature `json:"Signature,omitempty"`
// Timestamp RFC 3339 date-time string for request timing validation
Timestamp *Timestamp `json:"Timestamp,omitempty"`
// APIVersion API version date in YYYY-MM-DD format
APIVersion APIVersion `json:"API-Version"`
}
CompleteCheckoutSessionParams defines parameters for CompleteCheckoutSession.
type Coupon ¶
type Coupon struct {
// AmountOff Fixed discount amount in minor currency units. Mutually exclusive with percent_off.
AmountOff *int `json:"amount_off,omitempty"`
// Currency ISO 4217 currency code for amount_off. Required if amount_off is set.
Currency *string `json:"currency,omitempty"`
// Duration How long the discount applies. 'once' = single use, 'repeating' = multiple billing periods, 'forever' = indefinitely.
Duration *CouponDuration `json:"duration,omitempty"`
// DurationInMonths Number of months the coupon applies if duration is 'repeating'.
DurationInMonths *int `json:"duration_in_months,omitempty"`
// Id Unique identifier for the coupon.
Id string `json:"id"`
// MaxRedemptions Maximum number of times this coupon can be redeemed across all customers.
MaxRedemptions *int `json:"max_redemptions,omitempty"`
// Metadata Arbitrary key-value metadata attached to the coupon.
Metadata *map[string]string `json:"metadata,omitempty"`
// Name Human-readable coupon name (e.g., 'Summer Sale 20% Off').
Name string `json:"name"`
// PercentOff Percentage discount (0-100). Mutually exclusive with amount_off.
PercentOff *float32 `json:"percent_off,omitempty"`
// TimesRedeemed Number of times this coupon has been redeemed.
TimesRedeemed *int `json:"times_redeemed,omitempty"`
}
Coupon Coupon details describing the discount terms.
type CouponDuration ¶
type CouponDuration string
CouponDuration How long the discount applies. 'once' = single use, 'repeating' = multiple billing periods, 'forever' = indefinitely.
const ( Forever CouponDuration = "forever" Once CouponDuration = "once" Repeating CouponDuration = "repeating" )
Defines values for CouponDuration.
type CreateCheckoutSessionJSONRequestBody ¶
type CreateCheckoutSessionJSONRequestBody = CheckoutSessionCreateRequest
CreateCheckoutSessionJSONRequestBody defines body for CreateCheckoutSession for application/json ContentType.
type CreateCheckoutSessionParams ¶
type CreateCheckoutSessionParams struct {
// Authorization Bearer token for API authentication
Authorization Authorization `json:"Authorization"`
// ContentType Must be application/json for requests with a body
ContentType ContentType `json:"Content-Type"`
// AcceptLanguage Preferred language for response messages
AcceptLanguage *AcceptLanguage `json:"Accept-Language,omitempty"`
// UserAgent Client application identifier
UserAgent *UserAgent `json:"User-Agent,omitempty"`
// IdempotencyKey Unique key to safely retry requests without duplicate processing
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
// RequestId Unique identifier for request tracking and debugging
RequestId *RequestId `json:"Request-Id,omitempty"`
// Signature HMAC signature for webhook verification
Signature *Signature `json:"Signature,omitempty"`
// Timestamp RFC 3339 date-time string for request timing validation
Timestamp *Timestamp `json:"Timestamp,omitempty"`
// APIVersion API version date in YYYY-MM-DD format
APIVersion APIVersion `json:"API-Version"`
}
CreateCheckoutSessionParams defines parameters for CreateCheckoutSession.
type CustomAttribute ¶
type CustomAttribute struct {
// DisplayName Human-readable label for the attribute
DisplayName string `json:"display_name"`
// Value Attribute value
Value string `json:"value"`
}
CustomAttribute defines model for CustomAttribute.
type DimensionsInfo ¶
type DimensionsInfo struct {
// Height Height dimension
Height float32 `json:"height"`
// Length Length dimension
Length float32 `json:"length"`
// Unit Unit of measurement for dimensions
Unit DimensionsInfoUnit `json:"unit"`
// Width Width dimension
Width float32 `json:"width"`
}
DimensionsInfo defines model for DimensionsInfo.
type DimensionsInfoUnit ¶
type DimensionsInfoUnit string
DimensionsInfoUnit Unit of measurement for dimensions
const ( Cm DimensionsInfoUnit = "cm" In DimensionsInfoUnit = "in" )
Defines values for DimensionsInfoUnit.
type Disclosure ¶
type Disclosure struct {
// Content The disclosure text content
Content string `json:"content"`
// ContentType Format of the disclosure content
ContentType DisclosureContentType `json:"content_type"`
// Type Type of disclosure
Type DisclosureType `json:"type"`
}
Disclosure defines model for Disclosure.
type DisclosureContentType ¶
type DisclosureContentType string
DisclosureContentType Format of the disclosure content
const ( DisclosureContentTypeMarkdown DisclosureContentType = "markdown" DisclosureContentTypePlain DisclosureContentType = "plain" )
Defines values for DisclosureContentType.
type DisclosureType ¶
type DisclosureType string
DisclosureType Type of disclosure
const (
Disclaimer DisclosureType = "disclaimer"
)
Defines values for DisclosureType.
type DiscountAllocation ¶
type DiscountAllocation struct {
// Amount Amount allocated to this target in minor (cents) currency units.
Amount int `json:"amount"`
// Path JSONPath to the allocation target (e.g., '$.line_items[0]', '$.totals.shipping').
Path string `json:"path"`
}
DiscountAllocation Breakdown of how a discount amount was allocated to a specific target.
type DiscountDetail ¶
type DiscountDetail struct {
// Amount Discount amount in minor currency units (e.g. 100 cents for $1.00 or 100 for ¥100)
Amount int `json:"amount"`
// Code Discount code if applicable
Code *string `json:"code,omitempty"`
// Description Human-readable discount description
Description *string `json:"description,omitempty"`
// Source Source of the discount
Source *DiscountDetailSource `json:"source,omitempty"`
// Type Type of discount
Type DiscountDetailType `json:"type"`
}
DiscountDetail defines model for DiscountDetail.
type DiscountDetailSource ¶
type DiscountDetailSource string
DiscountDetailSource Source of the discount
const ( DiscountDetailSourceAutomatic DiscountDetailSource = "automatic" DiscountDetailSourceCoupon DiscountDetailSource = "coupon" DiscountDetailSourceLoyalty DiscountDetailSource = "loyalty" )
Defines values for DiscountDetailSource.
type DiscountDetailType ¶
type DiscountDetailType string
DiscountDetailType Type of discount
const ( Bogo DiscountDetailType = "bogo" Fixed DiscountDetailType = "fixed" Percentage DiscountDetailType = "percentage" Volume DiscountDetailType = "volume" )
Defines values for DiscountDetailType.
type DiscountErrorCode ¶
type DiscountErrorCode string
DiscountErrorCode Error codes for rejected discount codes, used in messages[].code.
const ( DiscountErrorCodeDiscountCodeAlreadyApplied DiscountErrorCode = "discount_code_already_applied" DiscountErrorCodeDiscountCodeCombinationDisallowed DiscountErrorCode = "discount_code_combination_disallowed" DiscountErrorCodeDiscountCodeExpired DiscountErrorCode = "discount_code_expired" DiscountErrorCodeDiscountCodeInvalid DiscountErrorCode = "discount_code_invalid" DiscountErrorCodeDiscountCodeMinimumNotMet DiscountErrorCode = "discount_code_minimum_not_met" DiscountErrorCodeDiscountCodeUsageLimitReached DiscountErrorCode = "discount_code_usage_limit_reached" DiscountErrorCodeDiscountCodeUserIneligible DiscountErrorCode = "discount_code_user_ineligible" DiscountErrorCodeDiscountCodeUserNotLoggedIn DiscountErrorCode = "discount_code_user_not_logged_in" )
Defines values for DiscountErrorCode.
type DiscountsRequest ¶
type DiscountsRequest struct {
// Codes Discount codes to apply. Case-insensitive. Replaces previously submitted codes. Send empty array to clear.
Codes *[]string `json:"codes,omitempty"`
}
DiscountsRequest Discount codes input for checkout create/update requests.
type DiscountsResponse ¶
type DiscountsResponse struct {
// Applied Discounts successfully applied (code-based and automatic).
Applied *[]AppliedDiscount `json:"applied,omitempty"`
// Codes Echo of submitted discount codes.
Codes *[]string `json:"codes,omitempty"`
// Rejected Discount codes that could not be applied, with reasons.
Rejected *[]RejectedDiscount `json:"rejected,omitempty"`
}
DiscountsResponse Discount codes input and applied discounts output in checkout responses.
type Error ¶
type Error struct {
// Code Implementation-defined error code
Code string `json:"code"`
// Message Human-readable error message
Message string `json:"message"`
// Param RFC 9535 JSONPath (optional)
Param *string `json:"param,omitempty"`
// Type Error type indicating the category of protocol-level error
Type ErrorType `json:"type"`
}
Error Protocol-level error returned in 4xx/5xx responses when the server cannot return a valid CheckoutSession at all (e.g. malformed request or unexpected failure). Use Error—not MessageError—when there is no valid session state to return. type semantics: invalid_request — malformed request, missing required fields, or invalid JSON; request_not_idempotent — idempotency violation; processing_error — unexpected server-side failure; service_unavailable — temporary unavailability.
type ErrorType ¶
type ErrorType string
ErrorType Error type indicating the category of protocol-level error
type EstimatedDelivery ¶
type EstimatedDelivery struct {
// Earliest RFC 3339 timestamp for earliest expected delivery
Earliest time.Time `json:"earliest"`
// Latest RFC 3339 timestamp for latest expected delivery
Latest time.Time `json:"latest"`
}
EstimatedDelivery defines model for EstimatedDelivery.
type EventData ¶
type EventData interface {
// contains filtered or unexported methods
}
EventData is implemented by webhook payloads.
type EventDataType ¶
type EventDataType string
EventDataType labels the payload for a webhook event.
const ( // EventDataTypeOrder indicates the webhook data payload is an order object. EventDataTypeOrder EventDataType = "order" )
type ExtensionDeclaration ¶
type ExtensionDeclaration struct {
// Extends JSONPath expressions identifying the schema fields added by this extension.
// Format: $.<SchemaName>.<fieldName> (e.g., $.CheckoutSession.discounts).
Extends *[]string `json:"extends,omitempty"`
// Name Unique identifier for the extension.
Name string `json:"name"`
// Schema URL to the extension's JSON Schema definition.
Schema *string `json:"schema,omitempty"`
// Spec URL to the extension's specification document.
Spec *string `json:"spec,omitempty"`
}
ExtensionDeclaration Extension declaration in capabilities.extensions (response). Describes an active extension and which schema fields it adds.
type Fulfillment ¶
type FulfillmentDetails ¶
type FulfillmentDetails struct {
Address *Address `json:"address,omitempty"`
// Email Contact email address
Email *openapi_types.Email `json:"email,omitempty"`
// Name Full name for fulfillment contact
Name *string `json:"name,omitempty"`
// PhoneNumber Contact phone number
PhoneNumber *string `json:"phone_number,omitempty"`
}
FulfillmentDetails defines model for FulfillmentDetails.
type FulfillmentGroup ¶
type FulfillmentGroup struct {
// DestinationType Type of fulfillment for this group
DestinationType FulfillmentGroupDestinationType `json:"destination_type"`
FulfillmentDetails *FulfillmentDetails `json:"fulfillment_details,omitempty"`
// Id Unique identifier for this fulfillment group
Id string `json:"id"`
// Instructions Special fulfillment instructions
Instructions *string `json:"instructions,omitempty"`
// ItemIds List of line item IDs in this fulfillment group
ItemIds []string `json:"item_ids"`
// LocationId Location identifier for pickup or local delivery
LocationId *string `json:"location_id,omitempty"`
}
FulfillmentGroup defines model for FulfillmentGroup.
type FulfillmentGroupDestinationType ¶
type FulfillmentGroupDestinationType string
FulfillmentGroupDestinationType Type of fulfillment for this group
const ( FulfillmentGroupDestinationTypeDigital FulfillmentGroupDestinationType = "digital" FulfillmentGroupDestinationTypeLocalDelivery FulfillmentGroupDestinationType = "local_delivery" FulfillmentGroupDestinationTypePickup FulfillmentGroupDestinationType = "pickup" FulfillmentGroupDestinationTypeShipping FulfillmentGroupDestinationType = "shipping" )
Defines values for FulfillmentGroupDestinationType.
type FulfillmentOptionDigital ¶
type FulfillmentOptionDigital struct {
// Description Additional details about digital delivery method
Description *string `json:"description,omitempty"`
// Id Unique identifier for this fulfillment option
Id string `json:"id"`
// Title Display title for this digital delivery option
Title string `json:"title"`
// Totals Cost breakdown for this fulfillment option
Totals []Total `json:"totals"`
// Type Fulfillment type discriminator
Type string `json:"type"`
}
FulfillmentOptionDigital defines model for FulfillmentOptionDigital.
type FulfillmentOptionLocalDelivery ¶
type FulfillmentOptionLocalDelivery struct {
// DeliveryWindow Expected delivery time window
DeliveryWindow *struct {
// End RFC 3339 timestamp for delivery window end
End time.Time `json:"end"`
// Start RFC 3339 timestamp for delivery window start
Start time.Time `json:"start"`
} `json:"delivery_window,omitempty"`
// Description Additional details about this delivery option
Description *string `json:"description,omitempty"`
// Id Unique identifier for this fulfillment option
Id string `json:"id"`
// ServiceArea Geographic service area for local delivery
ServiceArea *struct {
// CenterPostalCode Center point postal code for delivery radius
CenterPostalCode *string `json:"center_postal_code,omitempty"`
// RadiusMiles Delivery radius in miles
RadiusMiles *float32 `json:"radius_miles,omitempty"`
} `json:"service_area,omitempty"`
// Title Display title for this local delivery option
Title string `json:"title"`
// Totals Cost breakdown for this fulfillment option
Totals []Total `json:"totals"`
// Type Fulfillment type discriminator
Type string `json:"type"`
}
FulfillmentOptionLocalDelivery defines model for FulfillmentOptionLocalDelivery.
type FulfillmentOptionPickup ¶
type FulfillmentOptionPickup struct {
// Description Additional details about this pickup option
Description *string `json:"description,omitempty"`
// Id Unique identifier for this fulfillment option
Id string `json:"id"`
// Location Pickup location details
Location struct {
Address Address `json:"address"`
// Instructions Special pickup instructions
Instructions *string `json:"instructions,omitempty"`
// Name Location name
Name string `json:"name"`
// Phone Location phone number
Phone *string `json:"phone,omitempty"`
} `json:"location"`
// PickupBy RFC 3339 timestamp by which order must be picked up
PickupBy *time.Time `json:"pickup_by,omitempty"`
// PickupType Type of pickup method
PickupType *FulfillmentOptionPickupPickupType `json:"pickup_type,omitempty"`
// ReadyBy RFC 3339 timestamp when order will be ready for pickup
ReadyBy *time.Time `json:"ready_by,omitempty"`
// Title Display title for this pickup option
Title string `json:"title"`
// Totals Cost breakdown for this fulfillment option
Totals []Total `json:"totals"`
// Type Fulfillment type discriminator
Type string `json:"type"`
}
FulfillmentOptionPickup defines model for FulfillmentOptionPickup.
type FulfillmentOptionPickupPickupType ¶
type FulfillmentOptionPickupPickupType string
FulfillmentOptionPickupPickupType Type of pickup method
const ( Curbside FulfillmentOptionPickupPickupType = "curbside" InStore FulfillmentOptionPickupPickupType = "in_store" Locker FulfillmentOptionPickupPickupType = "locker" )
Defines values for FulfillmentOptionPickupPickupType.
type FulfillmentOptionShipping ¶
type FulfillmentOptionShipping struct {
// Carrier Shipping carrier name (e.g., 'USPS', 'FedEx')
Carrier *string `json:"carrier,omitempty"`
// Description Additional details about this shipping option
Description *string `json:"description,omitempty"`
// EarliestDeliveryTime RFC 3339 timestamp for earliest expected delivery
EarliestDeliveryTime *time.Time `json:"earliest_delivery_time,omitempty"`
// Id Unique identifier for this fulfillment option
Id string `json:"id"`
// LatestDeliveryTime RFC 3339 timestamp for latest expected delivery
LatestDeliveryTime *time.Time `json:"latest_delivery_time,omitempty"`
// Title Display title for this shipping option (e.g., 'Standard Shipping', 'Express')
Title string `json:"title"`
// Totals Cost breakdown for this fulfillment option
Totals []Total `json:"totals"`
// Type Fulfillment type discriminator
Type string `json:"type"`
}
FulfillmentOptionShipping defines model for FulfillmentOptionShipping.
type GetCheckoutSessionParams ¶
type GetCheckoutSessionParams struct {
// Authorization Bearer token for API authentication
Authorization Authorization `json:"Authorization"`
// AcceptLanguage Preferred language for response messages
AcceptLanguage *AcceptLanguage `json:"Accept-Language,omitempty"`
// UserAgent Client application identifier
UserAgent *UserAgent `json:"User-Agent,omitempty"`
// IdempotencyKey Unique key to safely retry requests without duplicate processing
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
// RequestId Unique identifier for request tracking and debugging
RequestId *RequestId `json:"Request-Id,omitempty"`
// Signature HMAC signature for webhook verification
Signature *Signature `json:"Signature,omitempty"`
// Timestamp RFC 3339 date-time string for request timing validation
Timestamp *Timestamp `json:"Timestamp,omitempty"`
// APIVersion API version date in YYYY-MM-DD format
APIVersion APIVersion `json:"API-Version"`
}
GetCheckoutSessionParams defines parameters for GetCheckoutSession.
type GiftWrap ¶
type GiftWrap struct {
// Charge Additional charge for gift wrapping in minor currency units (e.g. 100 cents for $1.00 or 100 for ¥100)
Charge *int `json:"charge,omitempty"`
// Enabled Whether gift wrapping is enabled for this order
Enabled bool `json:"enabled"`
// Style Gift wrap style selected
Style *GiftWrapStyle `json:"style,omitempty"`
}
GiftWrap defines model for GiftWrap.
type GiftWrapStyle ¶
type GiftWrapStyle string
GiftWrapStyle Gift wrap style selected
const ( Birthday GiftWrapStyle = "birthday" Elegant GiftWrapStyle = "elegant" Holiday GiftWrapStyle = "holiday" )
Defines values for GiftWrapStyle.
type HandlerError ¶
func (*HandlerError) Error ¶
func (e *HandlerError) Error() string
type IntentTrace ¶
type IntentTrace struct {
Metadata *map[string]IntentTrace_Metadata_AdditionalProperties `json:"metadata,omitempty"`
// ReasonCode Reason for abandonment. This enum is extensible: servers SHOULD accept
// unrecognized values and treat them as "other" (see RFC Section 7.2).
// Validators SHOULD be configured for lenient enum handling.
ReasonCode IntentTraceReasonCode `json:"reason_code"`
// TraceSummary A generated summary of the specific objection or negotiation gap.
TraceSummary *string `json:"trace_summary,omitempty"`
}
IntentTrace defines model for IntentTrace.
type IntentTraceMetadata0 ¶
type IntentTraceMetadata0 = string
IntentTraceMetadata0 defines model for .
type IntentTraceMetadata1 ¶
type IntentTraceMetadata1 = float32
IntentTraceMetadata1 defines model for .
type IntentTraceMetadata2 ¶
type IntentTraceMetadata2 = bool
IntentTraceMetadata2 defines model for .
type IntentTraceReasonCode ¶
type IntentTraceReasonCode string
IntentTraceReasonCode Reason for abandonment. This enum is extensible: servers SHOULD accept unrecognized values and treat them as "other" (see RFC Section 7.2). Validators SHOULD be configured for lenient enum handling.
const ( Comparison IntentTraceReasonCode = "comparison" Other IntentTraceReasonCode = "other" PaymentOptions IntentTraceReasonCode = "payment_options" PriceSensitivity IntentTraceReasonCode = "price_sensitivity" ProductFit IntentTraceReasonCode = "product_fit" ReturnsPolicy IntentTraceReasonCode = "returns_policy" ShippingCost IntentTraceReasonCode = "shipping_cost" ShippingSpeed IntentTraceReasonCode = "shipping_speed" TimingDeferred IntentTraceReasonCode = "timing_deferred" TrustSecurity IntentTraceReasonCode = "trust_security" )
Defines values for IntentTraceReasonCode.
type IntentTrace_Metadata_AdditionalProperties ¶
type IntentTrace_Metadata_AdditionalProperties struct {
// contains filtered or unexported fields
}
IntentTrace_Metadata_AdditionalProperties defines model for IntentTrace.metadata.AdditionalProperties.
func (IntentTrace_Metadata_AdditionalProperties) AsIntentTraceMetadata0 ¶
func (t IntentTrace_Metadata_AdditionalProperties) AsIntentTraceMetadata0() (IntentTraceMetadata0, error)
AsIntentTraceMetadata0 returns the union data inside the IntentTrace_Metadata_AdditionalProperties as a IntentTraceMetadata0
func (IntentTrace_Metadata_AdditionalProperties) AsIntentTraceMetadata1 ¶
func (t IntentTrace_Metadata_AdditionalProperties) AsIntentTraceMetadata1() (IntentTraceMetadata1, error)
AsIntentTraceMetadata1 returns the union data inside the IntentTrace_Metadata_AdditionalProperties as a IntentTraceMetadata1
func (IntentTrace_Metadata_AdditionalProperties) AsIntentTraceMetadata2 ¶
func (t IntentTrace_Metadata_AdditionalProperties) AsIntentTraceMetadata2() (IntentTraceMetadata2, error)
AsIntentTraceMetadata2 returns the union data inside the IntentTrace_Metadata_AdditionalProperties as a IntentTraceMetadata2
func (*IntentTrace_Metadata_AdditionalProperties) FromIntentTraceMetadata0 ¶
func (t *IntentTrace_Metadata_AdditionalProperties) FromIntentTraceMetadata0(v IntentTraceMetadata0) error
FromIntentTraceMetadata0 overwrites any union data inside the IntentTrace_Metadata_AdditionalProperties as the provided IntentTraceMetadata0
func (*IntentTrace_Metadata_AdditionalProperties) FromIntentTraceMetadata1 ¶
func (t *IntentTrace_Metadata_AdditionalProperties) FromIntentTraceMetadata1(v IntentTraceMetadata1) error
FromIntentTraceMetadata1 overwrites any union data inside the IntentTrace_Metadata_AdditionalProperties as the provided IntentTraceMetadata1
func (*IntentTrace_Metadata_AdditionalProperties) FromIntentTraceMetadata2 ¶
func (t *IntentTrace_Metadata_AdditionalProperties) FromIntentTraceMetadata2(v IntentTraceMetadata2) error
FromIntentTraceMetadata2 overwrites any union data inside the IntentTrace_Metadata_AdditionalProperties as the provided IntentTraceMetadata2
func (IntentTrace_Metadata_AdditionalProperties) MarshalJSON ¶
func (t IntentTrace_Metadata_AdditionalProperties) MarshalJSON() ([]byte, error)
func (*IntentTrace_Metadata_AdditionalProperties) MergeIntentTraceMetadata0 ¶
func (t *IntentTrace_Metadata_AdditionalProperties) MergeIntentTraceMetadata0(v IntentTraceMetadata0) error
MergeIntentTraceMetadata0 performs a merge with any union data inside the IntentTrace_Metadata_AdditionalProperties, using the provided IntentTraceMetadata0
func (*IntentTrace_Metadata_AdditionalProperties) MergeIntentTraceMetadata1 ¶
func (t *IntentTrace_Metadata_AdditionalProperties) MergeIntentTraceMetadata1(v IntentTraceMetadata1) error
MergeIntentTraceMetadata1 performs a merge with any union data inside the IntentTrace_Metadata_AdditionalProperties, using the provided IntentTraceMetadata1
func (*IntentTrace_Metadata_AdditionalProperties) MergeIntentTraceMetadata2 ¶
func (t *IntentTrace_Metadata_AdditionalProperties) MergeIntentTraceMetadata2(v IntentTraceMetadata2) error
MergeIntentTraceMetadata2 performs a merge with any union data inside the IntentTrace_Metadata_AdditionalProperties, using the provided IntentTraceMetadata2
func (*IntentTrace_Metadata_AdditionalProperties) UnmarshalJSON ¶
func (t *IntentTrace_Metadata_AdditionalProperties) UnmarshalJSON(b []byte) error
type InterventionCapabilities ¶
type InterventionCapabilities struct {
// DisplayContext How the Agent presents interventions (agent only).
DisplayContext *InterventionCapabilitiesDisplayContext `json:"display_context,omitempty"`
// Enforcement When required interventions are enforced (seller only).
Enforcement *InterventionCapabilitiesEnforcement `json:"enforcement,omitempty"`
// MaxInteractionDepth Maximum depth of nested interactions the Agent can handle (agent only).
MaxInteractionDepth *int `json:"max_interaction_depth,omitempty"`
// MaxRedirects Maximum number of redirects the Agent can handle (agent only).
MaxRedirects *int `json:"max_redirects,omitempty"`
// RedirectContext How the Agent handles redirects (agent only).
RedirectContext *InterventionCapabilitiesRedirectContext `json:"redirect_context,omitempty"`
// Required Intervention methods required for this session (seller only).
Required *[]InterventionCapabilitiesRequired `json:"required,omitempty"`
// Supported Intervention types supported.
// - Agent request: Interventions the agent can handle
// - Seller response: Intersection of supported interventions
Supported *[]InterventionCapabilitiesSupported `json:"supported,omitempty"`
}
InterventionCapabilities Intervention capabilities. Context-specific fields: display_context, redirect_context, max_redirects, max_interaction_depth (requests only). required, enforcement (responses only). supported field contains intersection in responses.
type InterventionCapabilitiesDisplayContext ¶
type InterventionCapabilitiesDisplayContext string
InterventionCapabilitiesDisplayContext How the Agent presents interventions (agent only).
const ( Modal InterventionCapabilitiesDisplayContext = "modal" Native InterventionCapabilitiesDisplayContext = "native" Redirect InterventionCapabilitiesDisplayContext = "redirect" Webview InterventionCapabilitiesDisplayContext = "webview" )
Defines values for InterventionCapabilitiesDisplayContext.
type InterventionCapabilitiesEnforcement ¶
type InterventionCapabilitiesEnforcement string
InterventionCapabilitiesEnforcement When required interventions are enforced (seller only).
const ( Always InterventionCapabilitiesEnforcement = "always" Conditional InterventionCapabilitiesEnforcement = "conditional" Optional InterventionCapabilitiesEnforcement = "optional" )
Defines values for InterventionCapabilitiesEnforcement.
type InterventionCapabilitiesRedirectContext ¶
type InterventionCapabilitiesRedirectContext string
InterventionCapabilitiesRedirectContext How the Agent handles redirects (agent only).
const ( ExternalBrowser InterventionCapabilitiesRedirectContext = "external_browser" InApp InterventionCapabilitiesRedirectContext = "in_app" None InterventionCapabilitiesRedirectContext = "none" )
Defines values for InterventionCapabilitiesRedirectContext.
type InterventionCapabilitiesRequired ¶
type InterventionCapabilitiesRequired string
InterventionCapabilitiesRequired defines model for InterventionCapabilities.Required.
const ( InterventionCapabilitiesRequiredBiometric InterventionCapabilitiesRequired = "biometric" InterventionCapabilitiesRequiredN3ds InterventionCapabilitiesRequired = "3ds" )
Defines values for InterventionCapabilitiesRequired.
type InterventionCapabilitiesSupported ¶
type InterventionCapabilitiesSupported string
InterventionCapabilitiesSupported defines model for InterventionCapabilities.Supported.
const ( InterventionCapabilitiesSupportedAddressVerification InterventionCapabilitiesSupported = "address_verification" InterventionCapabilitiesSupportedBiometric InterventionCapabilitiesSupported = "biometric" InterventionCapabilitiesSupportedN3ds InterventionCapabilitiesSupported = "3ds" )
Defines values for InterventionCapabilitiesSupported.
type Item ¶
type Item struct {
// Id Unique identifier for the item
Id string `json:"id"`
// Name Display name of the item
Name *string `json:"name,omitempty"`
// UnitAmount Price per unit in minor currency units (e.g. 100 cents for $1.00 or 100 for ¥100)
UnitAmount *int `json:"unit_amount,omitempty"`
}
Item defines model for Item.
type LineItem ¶
type LineItem struct {
// AvailabilityStatus Current availability status of the item
AvailabilityStatus *LineItemAvailabilityStatus `json:"availability_status,omitempty"`
// AvailableQuantity Quantity currently available for purchase
AvailableQuantity *int `json:"available_quantity,omitempty"`
// Category Product category
Category *string `json:"category,omitempty"`
// CustomAttributes Custom attributes specific to this line item
CustomAttributes *[]CustomAttribute `json:"custom_attributes,omitempty"`
// Description Detailed description of the line item
Description *string `json:"description,omitempty"`
Dimensions *DimensionsInfo `json:"dimensions,omitempty"`
// Disclosures Legal disclosures or disclaimers for this item
Disclosures *[]Disclosure `json:"disclosures,omitempty"`
// DiscountDetails Line-item level discount details
DiscountDetails *[]DiscountDetail `json:"discount_details,omitempty"`
// FulfillableOn RFC 3339 timestamp when item becomes available for fulfillment
FulfillableOn *time.Time `json:"fulfillable_on,omitempty"`
// Id Unique identifier for the line item
Id string `json:"id"`
// Images Array of image URLs for this line item
Images *[]string `json:"images,omitempty"`
Item Item `json:"item"`
MarketplaceSellerDetails *MarketplaceSellerDetails `json:"marketplace_seller_details,omitempty"`
// MaxQuantityPerOrder Maximum quantity allowed per order
MaxQuantityPerOrder *int `json:"max_quantity_per_order,omitempty"`
// Name Display name of the line item
Name *string `json:"name,omitempty"`
// ParentId Reference to parent line item for bundled products
ParentId *string `json:"parent_id,omitempty"`
// ProductId Merchant's product identifier
ProductId *string `json:"product_id,omitempty"`
// Quantity Number of units for this line item
Quantity int `json:"quantity"`
// Sku Stock keeping unit identifier
Sku *string `json:"sku,omitempty"`
// Tags Product tags or labels
Tags *[]string `json:"tags,omitempty"`
// TaxExempt Whether this line item is tax exempt
TaxExempt *bool `json:"tax_exempt,omitempty"`
// TaxExemptionReason Reason for tax exemption if applicable
TaxExemptionReason *string `json:"tax_exemption_reason,omitempty"`
// Totals Line-item level totals breakdown including base_amount, discount, subtotal, tax, and total
Totals []Total `json:"totals"`
// UnitAmount Price per unit in minor currency units (e.g. 100 cents for $1.00 or 100 for ¥100)
UnitAmount *int `json:"unit_amount,omitempty"`
// VariantId Product variant identifier
VariantId *string `json:"variant_id,omitempty"`
// VariantOptions Selected product variant options (e.g., size, color)
VariantOptions *[]VariantOption `json:"variant_options,omitempty"`
Weight *WeightInfo `json:"weight,omitempty"`
}
LineItem defines model for LineItem.
type LineItemAvailabilityStatus ¶
type LineItemAvailabilityStatus string
LineItemAvailabilityStatus Current availability status of the item
const ( LineItemAvailabilityStatusBackorder LineItemAvailabilityStatus = "backorder" LineItemAvailabilityStatusInStock LineItemAvailabilityStatus = "in_stock" LineItemAvailabilityStatusLowStock LineItemAvailabilityStatus = "low_stock" LineItemAvailabilityStatusOutOfStock LineItemAvailabilityStatus = "out_of_stock" LineItemAvailabilityStatusPreOrder LineItemAvailabilityStatus = "pre_order" )
Defines values for LineItemAvailabilityStatus.
type Link ¶
type Link struct {
// Title Display text for the link
Title *string `json:"title,omitempty"`
// Type Type of link
Type LinkType `json:"type"`
// Url URL destination
Url string `json:"url"`
}
Link defines model for Link.
type LinkType ¶
type LinkType string
LinkType Type of link
const ( AboutUs LinkType = "about_us" ContactUs LinkType = "contact_us" Faq LinkType = "faq" PrivacyPolicy LinkType = "privacy_policy" ReturnPolicy LinkType = "return_policy" ShippingPolicy LinkType = "shipping_policy" Support LinkType = "support" TermsOfUse LinkType = "terms_of_use" )
Defines values for LinkType.
type LoyaltyInfo ¶
type LoyaltyInfo struct {
// MemberSince RFC 3339 timestamp when the customer joined the loyalty program
MemberSince *time.Time `json:"member_since,omitempty"`
// PointsBalance Current loyalty points balance
PointsBalance *int `json:"points_balance,omitempty"`
// Tier Loyalty program tier level
Tier *string `json:"tier,omitempty"`
}
LoyaltyInfo defines model for LoyaltyInfo.
type MarketplaceSellerDetails ¶
type MarketplaceSellerDetails struct {
// Name Name of the marketplace seller or vendor
Name string `json:"name"`
}
MarketplaceSellerDetails defines model for MarketplaceSellerDetails.
type MessageError ¶
type MessageError struct {
// Code Error code indicating the type of error
Code MessageErrorCode `json:"code"`
// Content Error message text
Content string `json:"content"`
// ContentType Format of the error message content
ContentType MessageErrorContentType `json:"content_type"`
// Param RFC 9535 JSONPath
Param *string `json:"param"`
// Severity Severity level of this error
Severity *MessageErrorSeverity `json:"severity,omitempty"`
// Type Message type discriminator
Type string `json:"type"`
}
MessageError Business-logic error within a valid CheckoutSession response. Used in messages[] on 2xx responses when the session is valid but has actionable issues (e.g. status "not_ready_for_payment"). The agent can respond by asking the buyer for corrections or trying alternatives. Use MessageError—not Error—when you can return a valid CheckoutSession and the problem is conversational (e.g. invalid email → code "invalid" and param "$.buyer.email"; out of stock → code "out_of_stock" and param "$.items[0]").
type MessageErrorCode ¶
type MessageErrorCode string
MessageErrorCode Error code indicating the type of error
const ( MessageErrorCodeAgeVerificationRequired MessageErrorCode = "age_verification_required" MessageErrorCodeApprovalRequired MessageErrorCode = "approval_required" MessageErrorCodeConflict MessageErrorCode = "conflict" MessageErrorCodeCouponExpired MessageErrorCode = "coupon_expired" MessageErrorCodeCouponInvalid MessageErrorCode = "coupon_invalid" MessageErrorCodeExpired MessageErrorCode = "expired" MessageErrorCodeInterventionRequired MessageErrorCode = "intervention_required" MessageErrorCodeInvalid MessageErrorCode = "invalid" MessageErrorCodeLowStock MessageErrorCode = "low_stock" MessageErrorCodeMaximumExceeded MessageErrorCode = "maximum_exceeded" MessageErrorCodeMinimumNotMet MessageErrorCode = "minimum_not_met" MessageErrorCodeMissing MessageErrorCode = "missing" MessageErrorCodeNotFound MessageErrorCode = "not_found" MessageErrorCodeOutOfStock MessageErrorCode = "out_of_stock" MessageErrorCodePaymentDeclined MessageErrorCode = "payment_declined" MessageErrorCodeQuantityExceeded MessageErrorCode = "quantity_exceeded" MessageErrorCodeRateLimited MessageErrorCode = "rate_limited" MessageErrorCodeRegionRestricted MessageErrorCode = "region_restricted" MessageErrorCodeRequires3ds MessageErrorCode = "requires_3ds" MessageErrorCodeRequiresSignIn MessageErrorCode = "requires_sign_in" MessageErrorCodeUnsupported MessageErrorCode = "unsupported" )
Defines values for MessageErrorCode.
type MessageErrorContentType ¶
type MessageErrorContentType string
MessageErrorContentType Format of the error message content
const ( MessageErrorContentTypeMarkdown MessageErrorContentType = "markdown" MessageErrorContentTypePlain MessageErrorContentType = "plain" )
Defines values for MessageErrorContentType.
type MessageErrorSeverity ¶
type MessageErrorSeverity string
MessageErrorSeverity Severity level of this error
const ( MessageErrorSeverityCritical MessageErrorSeverity = "critical" MessageErrorSeverityHigh MessageErrorSeverity = "high" MessageErrorSeverityInfo MessageErrorSeverity = "info" MessageErrorSeverityLow MessageErrorSeverity = "low" MessageErrorSeverityMedium MessageErrorSeverity = "medium" )
Defines values for MessageErrorSeverity.
type MessageInfo ¶
type MessageInfo struct {
// Content Informational message text
Content string `json:"content"`
// ContentType Format of the message content
ContentType MessageInfoContentType `json:"content_type"`
// Param RFC 9535 JSONPath to the related field
Param *string `json:"param,omitempty"`
// Severity Severity level of this informational message
Severity *MessageInfoSeverity `json:"severity,omitempty"`
// Type Message type discriminator
Type string `json:"type"`
}
MessageInfo defines model for MessageInfo.
type MessageInfoContentType ¶
type MessageInfoContentType string
MessageInfoContentType Format of the message content
const ( MessageInfoContentTypeMarkdown MessageInfoContentType = "markdown" MessageInfoContentTypePlain MessageInfoContentType = "plain" )
Defines values for MessageInfoContentType.
type MessageInfoSeverity ¶
type MessageInfoSeverity string
MessageInfoSeverity Severity level of this informational message
const ( MessageInfoSeverityCritical MessageInfoSeverity = "critical" MessageInfoSeverityHigh MessageInfoSeverity = "high" MessageInfoSeverityInfo MessageInfoSeverity = "info" MessageInfoSeverityLow MessageInfoSeverity = "low" MessageInfoSeverityMedium MessageInfoSeverity = "medium" )
Defines values for MessageInfoSeverity.
type MessageWarning ¶
type MessageWarning struct {
// Code Warning code indicating the type of warning
Code MessageWarningCode `json:"code"`
// Content Warning message text
Content string `json:"content"`
// ContentType Format of the warning message content
ContentType MessageWarningContentType `json:"content_type"`
// Param RFC 9535 JSONPath to the related field
Param *string `json:"param,omitempty"`
// Severity Severity level of this warning
Severity *MessageWarningSeverity `json:"severity,omitempty"`
// Type Message type discriminator
Type string `json:"type"`
}
MessageWarning defines model for MessageWarning.
type MessageWarningCode ¶
type MessageWarningCode string
MessageWarningCode Warning code indicating the type of warning
const ( MessageWarningCodeDiscountCodeAlreadyApplied MessageWarningCode = "discount_code_already_applied" MessageWarningCodeDiscountCodeCombinationDisallowed MessageWarningCode = "discount_code_combination_disallowed" MessageWarningCodeDiscountCodeExpired MessageWarningCode = "discount_code_expired" MessageWarningCodeDiscountCodeInvalid MessageWarningCode = "discount_code_invalid" MessageWarningCodeDiscountCodeMinimumNotMet MessageWarningCode = "discount_code_minimum_not_met" MessageWarningCodeDiscountCodeUsageLimitReached MessageWarningCode = "discount_code_usage_limit_reached" MessageWarningCodeDiscountCodeUserIneligible MessageWarningCode = "discount_code_user_ineligible" MessageWarningCodeDiscountCodeUserNotLoggedIn MessageWarningCode = "discount_code_user_not_logged_in" MessageWarningCodeExpiringPromotion MessageWarningCode = "expiring_promotion" MessageWarningCodeHighDemand MessageWarningCode = "high_demand" MessageWarningCodeLimitedAvailability MessageWarningCode = "limited_availability" MessageWarningCodeLowStock MessageWarningCode = "low_stock" MessageWarningCodePriceChange MessageWarningCode = "price_change" MessageWarningCodeShippingDelay MessageWarningCode = "shipping_delay" )
Defines values for MessageWarningCode.
type MessageWarningContentType ¶
type MessageWarningContentType string
MessageWarningContentType Format of the warning message content
const ( MessageWarningContentTypeMarkdown MessageWarningContentType = "markdown" MessageWarningContentTypePlain MessageWarningContentType = "plain" )
Defines values for MessageWarningContentType.
type MessageWarningSeverity ¶
type MessageWarningSeverity string
MessageWarningSeverity Severity level of this warning
const ( Critical MessageWarningSeverity = "critical" High MessageWarningSeverity = "high" Info MessageWarningSeverity = "info" Low MessageWarningSeverity = "low" Medium MessageWarningSeverity = "medium" )
Defines values for MessageWarningSeverity.
type Order ¶
type Order struct {
// CheckoutSessionId ID of the checkout session that created this order
CheckoutSessionId string `json:"checkout_session_id"`
Confirmation *OrderConfirmation `json:"confirmation,omitempty"`
EstimatedDelivery *EstimatedDelivery `json:"estimated_delivery,omitempty"`
// Id Unique identifier for the order
Id string `json:"id"`
// OrderNumber Human-readable order number
OrderNumber *string `json:"order_number,omitempty"`
// PermalinkUrl Permanent URL where the customer can view order details
PermalinkUrl string `json:"permalink_url"`
// Status Current order status
Status *OrderStatus `json:"status,omitempty"`
Support *SupportInfo `json:"support,omitempty"`
}
Order defines model for Order.
type OrderConfirmation ¶
type OrderConfirmation struct {
// ConfirmationEmailSent Whether a confirmation email has been sent
ConfirmationEmailSent *bool `json:"confirmation_email_sent,omitempty"`
// ConfirmationNumber Order confirmation number
ConfirmationNumber *string `json:"confirmation_number,omitempty"`
// InvoiceNumber Invoice number if generated
InvoiceNumber *string `json:"invoice_number,omitempty"`
// ReceiptUrl URL to the order receipt
ReceiptUrl *string `json:"receipt_url,omitempty"`
}
OrderConfirmation defines model for OrderConfirmation.
type OrderCreate ¶
type OrderCreate struct {
// Type is the webhook payload discriminator and is always "order".
Type EventDataType `json:"type"`
// ID is the order identifier.
ID *string `json:"id,omitempty"`
// CheckoutSessionID identifies the checkout session that produced this order.
CheckoutSessionID string `json:"checkout_session_id"`
// OrderNumber is a human-readable order reference.
OrderNumber *string `json:"order_number,omitempty"`
// PermalinkURL is the buyer-facing order URL.
PermalinkURL string `json:"permalink_url"`
// Status is the order lifecycle state at event emission time.
Status OrderStatus `json:"status"`
// EstimatedDelivery is the expected delivery window.
EstimatedDelivery *EstimatedDelivery `json:"estimated_delivery,omitempty"`
// Confirmation contains receipt and confirmation metadata.
Confirmation *OrderConfirmation `json:"confirmation,omitempty"`
// Support contains merchant support contact details.
Support *SupportInfo `json:"support,omitempty"`
// LineItems describes ordered items and item-level fulfillment progress.
LineItems []OrderLineItem `json:"line_items,omitempty"`
// Fulfillments describes shipping/pickup/digital delivery state.
Fulfillments []Fulfillment `json:"fulfillments,omitempty"`
// Adjustments describes refunds, credits, returns, and disputes.
Adjustments []Adjustment `json:"adjustments,omitempty"`
// Totals is an order-level totals breakdown.
Totals []Total `json:"totals,omitempty"`
}
OrderCreate emits order data after the order is created.
type OrderLineItem ¶
type OrderStatus ¶
type OrderStatus string
OrderStatus Current order status
const ( Confirmed OrderStatus = "confirmed" Delivered OrderStatus = "delivered" Processing OrderStatus = "processing" Shipped OrderStatus = "shipped" )
Defines values for OrderStatus.
type OrderUpdated ¶
type OrderUpdated struct {
// Type is the webhook payload discriminator and is always "order".
Type EventDataType `json:"type"`
// ID is the order identifier.
ID *string `json:"id,omitempty"`
// CheckoutSessionID identifies the checkout session that produced this order.
CheckoutSessionID string `json:"checkout_session_id"`
// OrderNumber is a human-readable order reference.
OrderNumber *string `json:"order_number,omitempty"`
// PermalinkURL is the buyer-facing order URL.
PermalinkURL string `json:"permalink_url"`
// Status is the order lifecycle state at event emission time.
Status OrderStatus `json:"status"`
// EstimatedDelivery is the expected delivery window.
EstimatedDelivery *EstimatedDelivery `json:"estimated_delivery,omitempty"`
// Confirmation contains receipt and confirmation metadata.
Confirmation *OrderConfirmation `json:"confirmation,omitempty"`
// Support contains merchant support contact details.
Support *SupportInfo `json:"support,omitempty"`
// LineItems describes ordered items and item-level fulfillment progress.
LineItems []OrderLineItem `json:"line_items,omitempty"`
// Fulfillments describes shipping/pickup/digital delivery state.
Fulfillments []Fulfillment `json:"fulfillments,omitempty"`
// Adjustments describes refunds, credits, returns, and disputes.
Adjustments []Adjustment `json:"adjustments,omitempty"`
// Totals is an order-level totals breakdown.
Totals []Total `json:"totals,omitempty"`
}
OrderUpdated emits order data whenever the order status changes.
type Payment ¶
type Payment struct {
// Handlers Available payment handlers
Handlers []PaymentHandler `json:"handlers"`
}
Payment Payment configuration with handlers
type PaymentData ¶
type PaymentData struct {
// ApprovalRequired Whether this payment requires approval
ApprovalRequired *bool `json:"approval_required,omitempty"`
BillingAddress *Address `json:"billing_address,omitempty"`
// DueDate RFC 3339 timestamp when payment is due
DueDate *time.Time `json:"due_date,omitempty"`
// HandlerId ID of the payment handler to use
HandlerId *string `json:"handler_id,omitempty"`
// Instrument Payment instrument details
Instrument *struct {
// Credential Payment credential
Credential struct {
// Token Credential token value
Token string `json:"token"`
// Type Credential type (e.g., spt, wallet_token)
Type string `json:"type"`
} `json:"credential"`
// Type Instrument type (e.g., card, wallet_token)
Type string `json:"type"`
} `json:"instrument,omitempty"`
// PaymentTerms Payment terms for B2B transactions
PaymentTerms *PaymentDataPaymentTerms `json:"payment_terms,omitempty"`
// PurchaseOrderNumber Purchase order number
PurchaseOrderNumber *string `json:"purchase_order_number,omitempty"`
// contains filtered or unexported fields
}
PaymentData defines model for PaymentData.
func (PaymentData) AsPaymentData0 ¶
func (t PaymentData) AsPaymentData0() (PaymentData0, error)
AsPaymentData0 returns the union data inside the PaymentData as a PaymentData0
func (PaymentData) AsPaymentData1 ¶
func (t PaymentData) AsPaymentData1() (PaymentData1, error)
AsPaymentData1 returns the union data inside the PaymentData as a PaymentData1
func (*PaymentData) FromPaymentData0 ¶
func (t *PaymentData) FromPaymentData0(v PaymentData0) error
FromPaymentData0 overwrites any union data inside the PaymentData as the provided PaymentData0
func (*PaymentData) FromPaymentData1 ¶
func (t *PaymentData) FromPaymentData1(v PaymentData1) error
FromPaymentData1 overwrites any union data inside the PaymentData as the provided PaymentData1
func (PaymentData) MarshalJSON ¶
func (t PaymentData) MarshalJSON() ([]byte, error)
func (*PaymentData) MergePaymentData0 ¶
func (t *PaymentData) MergePaymentData0(v PaymentData0) error
MergePaymentData0 performs a merge with any union data inside the PaymentData, using the provided PaymentData0
func (*PaymentData) MergePaymentData1 ¶
func (t *PaymentData) MergePaymentData1(v PaymentData1) error
MergePaymentData1 performs a merge with any union data inside the PaymentData, using the provided PaymentData1
func (*PaymentData) UnmarshalJSON ¶
func (t *PaymentData) UnmarshalJSON(b []byte) error
type PaymentDataPaymentTerms ¶
type PaymentDataPaymentTerms string
PaymentDataPaymentTerms Payment terms for B2B transactions
const ( Immediate PaymentDataPaymentTerms = "immediate" Net15 PaymentDataPaymentTerms = "net_15" Net30 PaymentDataPaymentTerms = "net_30" Net60 PaymentDataPaymentTerms = "net_60" Net90 PaymentDataPaymentTerms = "net_90" )
Defines values for PaymentDataPaymentTerms.
type PaymentHandler ¶
type PaymentHandler struct {
// Config Handler-specific configuration
Config map[string]interface{} `json:"config"`
// ConfigSchema URL to JSON Schema for handler configuration
ConfigSchema string `json:"config_schema"`
// Id Seller-defined handler identifier
Id string `json:"id"`
// InstrumentSchemas URLs to JSON Schemas for payment instruments
InstrumentSchemas []string `json:"instrument_schemas"`
// Name Handler name in reverse-DNS format (e.g., dev.acp.tokenized.card)
Name string `json:"name"`
// Psp Payment Service Provider identifier
Psp string `json:"psp"`
// RequiresDelegatePayment Whether this handler requires using delegate_payment API
RequiresDelegatePayment bool `json:"requires_delegate_payment"`
// RequiresPciCompliance Whether this handler routes PCI DSS sensitive data
RequiresPciCompliance bool `json:"requires_pci_compliance"`
// Spec URL to handler specification
Spec string `json:"spec"`
// Version Handler version in YYYY-MM-DD format
Version string `json:"version"`
}
PaymentHandler Payment handler configuration and capabilities
type PaymentMethodObject ¶
type PaymentMethodObject struct {
// Brands Specific card brands/networks accepted
Brands *[]PaymentMethodObjectBrands `json:"brands,omitempty"`
// FundingTypes For card methods, funding types accepted
FundingTypes *[]PaymentMethodObjectFundingTypes `json:"funding_types,omitempty"`
// Method The payment method identifier
Method string `json:"method"`
// Providers Optional PSP routing information
Providers *[]string `json:"providers,omitempty"`
}
PaymentMethodObject Payment method with additional constraints (e.g., card brands, PSP routing)
type PaymentMethodObjectBrands ¶
type PaymentMethodObjectBrands string
PaymentMethodObjectBrands defines model for PaymentMethodObject.Brands.
const ( Amex PaymentMethodObjectBrands = "amex" Diners PaymentMethodObjectBrands = "diners" Discover PaymentMethodObjectBrands = "discover" Eftpos PaymentMethodObjectBrands = "eftpos" Interac PaymentMethodObjectBrands = "interac" Jcb PaymentMethodObjectBrands = "jcb" Mastercard PaymentMethodObjectBrands = "mastercard" Unionpay PaymentMethodObjectBrands = "unionpay" Visa PaymentMethodObjectBrands = "visa" )
Defines values for PaymentMethodObjectBrands.
type PaymentMethodObjectFundingTypes ¶
type PaymentMethodObjectFundingTypes string
PaymentMethodObjectFundingTypes defines model for PaymentMethodObject.FundingTypes.
const ( Credit PaymentMethodObjectFundingTypes = "credit" Debit PaymentMethodObjectFundingTypes = "debit" Prepaid PaymentMethodObjectFundingTypes = "prepaid" )
Defines values for PaymentMethodObjectFundingTypes.
type PaymentResponse ¶
type PaymentResponse struct {
// Handlers Available payment handlers
Handlers *[]map[string]interface{} `json:"handlers,omitempty"`
// Instruments Available payment instruments
Instruments *[]map[string]interface{} `json:"instruments,omitempty"`
// Provider Payment provider identifier
Provider *string `json:"provider,omitempty"`
}
PaymentResponse defines model for PaymentResponse.
type ProtocolVersion ¶
type ProtocolVersion struct {
// Version ACP protocol version in YYYY-MM-DD format.
Version string `json:"version"`
}
ProtocolVersion Protocol metadata included in checkout responses. Indicates the ACP version.
type RejectedDiscount ¶
type RejectedDiscount struct {
// Code The discount code that was rejected.
Code string `json:"code"`
// Message Human-readable explanation of why the code was rejected.
Message *string `json:"message,omitempty"`
// Reason Error codes for rejected discount codes, used in messages[].code.
Reason DiscountErrorCode `json:"reason"`
}
RejectedDiscount A discount code that could not be applied, with the reason.
type RiskSignals ¶
type RiskSignals struct {
// AcceptLanguage Accept-Language header from the buyer's browser
AcceptLanguage *string `json:"accept_language,omitempty"`
// DeviceFingerprint Device fingerprint for fraud detection
DeviceFingerprint *string `json:"device_fingerprint,omitempty"`
// IpAddress IP address of the buyer
IpAddress *string `json:"ip_address,omitempty"`
// SessionId Session identifier for the buyer
SessionId *string `json:"session_id,omitempty"`
// UserAgent User agent string of the buyer's browser
UserAgent *string `json:"user_agent,omitempty"`
}
RiskSignals defines model for RiskSignals.
type SelectedFulfillmentOption ¶
type SelectedFulfillmentOption struct {
// ItemIds List of line item IDs associated with this fulfillment option
ItemIds []string `json:"item_ids"`
// OptionId ID of the selected fulfillment option
OptionId string `json:"option_id"`
// Type Type of fulfillment option selected
Type SelectedFulfillmentOptionType `json:"type"`
}
SelectedFulfillmentOption defines model for SelectedFulfillmentOption.
type SelectedFulfillmentOptionType ¶
type SelectedFulfillmentOptionType string
SelectedFulfillmentOptionType Type of fulfillment option selected
const ( SelectedFulfillmentOptionTypeDigital SelectedFulfillmentOptionType = "digital" SelectedFulfillmentOptionTypeLocalDelivery SelectedFulfillmentOptionType = "local_delivery" SelectedFulfillmentOptionTypePickup SelectedFulfillmentOptionType = "pickup" SelectedFulfillmentOptionTypeShipping SelectedFulfillmentOptionType = "shipping" )
Defines values for SelectedFulfillmentOptionType.
type SplitPayment ¶
type SplitPayment struct {
// Amount Payment amount in minor currency units (e.g. 100 cents for $1.00 or 100 for ¥100) for this split
Amount int `json:"amount"`
}
SplitPayment defines model for SplitPayment.
type SupportInfo ¶
type SupportInfo struct {
// Email Support contact email
Email *openapi_types.Email `json:"email,omitempty"`
// HelpCenterUrl URL to merchant's help center
HelpCenterUrl *string `json:"help_center_url,omitempty"`
// Hours Support hours of operation
Hours *string `json:"hours,omitempty"`
// Phone Support contact phone number
Phone *string `json:"phone,omitempty"`
}
SupportInfo defines model for SupportInfo.
type TaxBreakdownItem ¶
type TaxBreakdownItem struct {
// Amount Tax amount in minor currency units (e.g. 100 cents for $1.00 or 100 for ¥100)
Amount int `json:"amount"`
// Jurisdiction Tax jurisdiction name (e.g., 'California State Tax', 'City of San Francisco')
Jurisdiction string `json:"jurisdiction"`
// Rate Tax rate as a decimal (e.g., 0.0875 for 8.75%)
Rate float32 `json:"rate"`
}
TaxBreakdownItem defines model for TaxBreakdownItem.
type TaxExemption ¶
type TaxExemption struct {
// CertificateId Unique identifier for the tax exemption certificate
CertificateId string `json:"certificate_id"`
// CertificateType Type of tax exemption certificate
CertificateType TaxExemptionCertificateType `json:"certificate_type"`
// ExemptRegions List of regions where the exemption applies (e.g., state codes)
ExemptRegions *[]string `json:"exempt_regions,omitempty"`
// ExpiresAt RFC 3339 timestamp when the exemption certificate expires
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
TaxExemption defines model for TaxExemption.
type TaxExemptionCertificateType ¶
type TaxExemptionCertificateType string
TaxExemptionCertificateType Type of tax exemption certificate
const ( ExemptOrganization TaxExemptionCertificateType = "exempt_organization" Government TaxExemptionCertificateType = "government" Resale TaxExemptionCertificateType = "resale" )
Defines values for TaxExemptionCertificateType.
type Total ¶
type Total struct {
// Amount Amount in minor currency units (e.g. 100 cents for $1.00 or 100 for ¥100)
Amount int `json:"amount"`
// Breakdown Detailed breakdown for tax totals
Breakdown *[]TaxBreakdownItem `json:"breakdown,omitempty"`
// Description Additional descriptive text for this total
Description *string `json:"description,omitempty"`
// DisplayText Localized display text for this total
DisplayText string `json:"display_text"`
// PresentmentAmount Amount in presentment currency minor units if different from settlement currency
PresentmentAmount *int `json:"presentment_amount,omitempty"`
// Type Type of total line item
Type TotalType `json:"type"`
}
Total defines model for Total.
type TotalType ¶
type TotalType string
TotalType Type of total line item
const ( TotalTypeDiscount TotalType = "discount" TotalTypeFee TotalType = "fee" TotalTypeFulfillment TotalType = "fulfillment" TotalTypeGiftWrap TotalType = "gift_wrap" TotalTypeItemsBaseAmount TotalType = "items_base_amount" TotalTypeItemsDiscount TotalType = "items_discount" TotalTypeStoreCredit TotalType = "store_credit" TotalTypeSubtotal TotalType = "subtotal" TotalTypeTax TotalType = "tax" TotalTypeTip TotalType = "tip" TotalTypeTotal TotalType = "total" )
Defines values for TotalType.
type UpdateCheckoutSessionJSONRequestBody ¶
type UpdateCheckoutSessionJSONRequestBody = CheckoutSessionUpdateRequest
UpdateCheckoutSessionJSONRequestBody defines body for UpdateCheckoutSession for application/json ContentType.
type UpdateCheckoutSessionParams ¶
type UpdateCheckoutSessionParams struct {
// Authorization Bearer token for API authentication
Authorization Authorization `json:"Authorization"`
// AcceptLanguage Preferred language for response messages
AcceptLanguage *AcceptLanguage `json:"Accept-Language,omitempty"`
// UserAgent Client application identifier
UserAgent *UserAgent `json:"User-Agent,omitempty"`
// IdempotencyKey Unique key to safely retry requests without duplicate processing
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
// RequestId Unique identifier for request tracking and debugging
RequestId *RequestId `json:"Request-Id,omitempty"`
// Signature HMAC signature for webhook verification
Signature *Signature `json:"Signature,omitempty"`
// Timestamp RFC 3339 date-time string for request timing validation
Timestamp *Timestamp `json:"Timestamp,omitempty"`
// APIVersion API version date in YYYY-MM-DD format
APIVersion APIVersion `json:"API-Version"`
}
UpdateCheckoutSessionParams defines parameters for UpdateCheckoutSession.
type VariantOption ¶
type VariantOption struct {
// Name Variant attribute name (e.g., 'Size', 'Color')
Name string `json:"name"`
// Value Variant attribute value (e.g., 'Large', 'Blue')
Value string `json:"value"`
}
VariantOption defines model for VariantOption.
type WebhookEventType ¶
type WebhookEventType string
WebhookEventType enumerates the supported checkout webhook events.
const ( // WebhookEventTypeOrderCreated is emitted when an order is first created. WebhookEventTypeOrderCreated WebhookEventType = "order_create" // WebhookEventTypeOrderUpdated is emitted when an existing order changes. WebhookEventTypeOrderUpdated WebhookEventType = "order_update" )
type WebhookOption ¶
type WebhookOption func(*webhookSender)
func WebhookWithClient ¶
func WebhookWithClient(client *http.Client) WebhookOption
WebhookWithClient allows overriding the HTTP client used for delivering webhook events.
type WebhookSender ¶
type WebhookSender interface {
// Send sends webhook to the configured webhook endpoint.
Send(context.Context, EventData) error
}
WebhookSender is an interface of a webhook delivery implementation.
type WeightInfo ¶
type WeightInfo struct {
// Unit Unit of measurement for weight
Unit WeightInfoUnit `json:"unit"`
// Value Numeric weight value
Value float32 `json:"value"`
}
WeightInfo defines model for WeightInfo.
type WeightInfoUnit ¶
type WeightInfoUnit string
WeightInfoUnit Unit of measurement for weight
const ( G WeightInfoUnit = "g" Kg WeightInfoUnit = "kg" Lb WeightInfoUnit = "lb" Oz WeightInfoUnit = "oz" )
Defines values for WeightInfoUnit.